Changeset 11667 for code/branches/AsteroidMining_HS17/src/modules/asteroidmining/SpicedAsteroidBelt.h
- Timestamp:
- Dec 12, 2017, 8:29:52 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AsteroidMining_HS17/src/modules/asteroidmining/SpicedAsteroidBelt.h
r11665 r11667 23 23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 * ...26 25 * 27 26 */ … … 29 28 /** 30 29 31 @file SpicedAsteroidBelt.h 30 @file 31 @author remartin 32 32 @brief Asteroid belt with lots of parameters. Derived from asteroidField.lua 33 33 34 Generates a ring of asteroids by calling SpicedAsteroidField multiple times. 35 It's in the xy-plane at default, orientation can be changed with tiltAt 36 (angle where it gets elevated/lowered the most) and TiltBy (angle at z-axis). 37 This doesn't work very well and could probably implemented differently with 38 relative coordinates (attach etc, stuff in WorldEntity). 34 39 40 It is required to wait until all XML-arguments are set. That's why the actual 41 generation happens when tick() gets called for the first time. 42 35 43 */ 36 44 … … 72 80 inline Vector3 getPosition(){return this->position;} 73 81 74 // inline void setYaw(float y){this->yaw = y;}75 // inline float getYaw(){return this->yaw;}76 77 // inline void setPitch(float p){this->pitch = p;}78 // inline float getPitch(){return this->pitch;}79 80 82 inline void setSegments(int s){this->segments = s;} 81 83 inline int getSegments(){return this->segments;} … … 99 101 inline float getFogDensity(){return this->fogDensity;} 100 102 103 inline void setTiltAt(float ta){this->tiltAt = ta;} 104 inline void setTiltBy(float tb){this->tiltBy = tb;} 105 inline float getTiltAt(){return this->tiltAt;} 106 inline float getTiltBy(){return this->tiltBy;} 107 101 108 102 109 protected: … … 104 111 Context* context; 105 112 106 float count; 107 float mDensity; // Mineral density,between 0 and 1;113 float count; //!< Approximate number of asteroids 114 float mDensity; //!< Approximate commonness of asteroids that yield stuff, value between 0 and 1; 108 115 109 116 Vector3 position; 110 117 111 // float yaw; 112 // float pitch; 113 int segments; 118 int segments; //!< Number of asteroidFields that get generated. 114 119 115 int maxSize; 116 int minSize; 120 int maxSize; //!< Most obese asteroid possible 121 int minSize; //!< Most meagre asteroid possible 117 122 118 float radius0; 119 float radius1; 123 float radius0; //!< Inner radius 124 float radius1; //!< Outer radius 120 125 121 bool foggy; 126 bool foggy; //!< Whether there's fog arount the asteroids 122 127 float fogDensity; 123 128 124 virtual void create(); 129 float tiltAt; //!< Orientation: Angle where it gets elevated/lowered the most 130 float tiltBy; //!< angle at z-axis 125 131 126 132 private: 127 133 void registerVariables(); 134 135 virtual void create(); 128 136 129 137 }; // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.