Changeset 8397 for code/trunk/src/modules/objects/ForceField.h
- Timestamp:
- May 3, 2011, 9:46:30 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/objects/ForceField.h
r7801 r8397 24 24 * Co-authors: 25 25 * Damian 'Mozork' Frick 26 * Kevin Young 26 27 * 27 28 */ … … 55 56 tube, //!< The ForceField has a tube shape. 56 57 sphere, //!< The ForceField has a spherical shape. 57 invertedSphere //!< The ForceField has a spherical shape but "inverted" behavior. 58 invertedSphere, //!< The ForceField has a spherical shape but "inverted" behavior. 59 newtonianGravity //!< The ForceField imitates Newtonian gravitation for use in stellar bodies. 58 60 }; 59 61 } … … 106 108 107 109 /** 108 @brief Set the diameter of the ForceField. 110 @brief Set the diameter of the ForceField. In mode StellarBody this stands for the outer radius. 109 111 @param diam The diameter to be set. 110 112 */ … … 112 114 { this->radius_ = diam/2; } 113 115 /** 114 @brief Get the diameter of the ForceField. 116 @brief Get the diameter of the ForceField. In mode StellarBody this stands for the outer radius. 115 117 @return Returns the diameter of the ForceField. 116 118 */ 117 119 inline float getDiameter() 118 120 { return this->radius_*2; } 121 122 /** 123 @brief Set the diameter of the stellar body for the Newtonian ForceField. 124 @param massDiam The diameter of the stellar body. 125 */ 126 inline void setMassDiameter(float massDiam) 127 { this->massRadius_ = massDiam/2; } 128 129 /** 130 @brief Get the diameter of the stellar body for the Newtonian ForceField. 131 @return float Returns the diameter of the stellar body. 132 */ 133 inline float getMassDiameter() 134 { return this->massRadius_*2; } 119 135 120 136 /** … … 139 155 static const std::string modeSphere_s; 140 156 static const std::string modeInvertedSphere_s; 157 static const std::string modeNewtonianGravity_s; 141 158 142 159 float velocity_; //!< The velocity of the ForceField. 143 160 float radius_; //!< The radius of the ForceField. 161 float massRadius_; //!< The radius of the stellar body for the Newtonian ForceField. 144 162 float halfLength_; //!< Half of the length of the ForceField. 145 163 int mode_; //!< The mode of the ForceField. 164 165 //! Gravitational constant for Newtonian ForceFields. 166 static const float gravConstant_; 167 //! Attenuation factor for Newtonian ForceFields 168 static const float attenFactor_; 146 169 }; 147 170 }
Note: See TracChangeset
for help on using the changeset viewer.