Changeset 10189 for code/trunk/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.h
- Timestamp:
- Jan 11, 2015, 3:40:41 PM (9 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.h
r10184 r10189 23 23 * Reto Grieder 24 24 * Co-authors: 25 * ...25 * Fabian 'x3n' Landau 26 26 * 27 27 */ 28 28 29 29 /** 30 @file ConeCollisionShape.h31 @brief Definition of the ConeCollisionShape class.30 @file AbstractRadiusHeightCollisionShape.h 31 @brief Definition of the AbstractRadiusHeightCollisionShape class. 32 32 @ingroup Collisionshapes 33 33 */ 34 34 35 #ifndef _ ConeCollisionShape_H__36 #define _ ConeCollisionShape_H__35 #ifndef _AbstractRadiusHeightCollisionShape_H__ 36 #define _AbstractRadiusHeightCollisionShape_H__ 37 37 38 38 #include "objects/ObjectsPrereqs.h" … … 44 44 /** 45 45 @brief 46 Wrapper for the bullet co ne collision shape class btConeShape.46 Wrapper for the bullet collision shapes with radius and height. 47 47 48 @author49 Reto Grieder50 51 @see btConeShape52 48 @ingroup Collisionshapes 53 49 */ 54 class _ObjectsExport ConeCollisionShape : public CollisionShape50 class _ObjectsExport AbstractRadiusHeightCollisionShape : public CollisionShape 55 51 { 56 52 public: 57 ConeCollisionShape(Context* context); 58 virtual ~ConeCollisionShape(); 53 AbstractRadiusHeightCollisionShape(Context* context); 59 54 60 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 61 56 62 57 /** 63 @brief Set the radius of the ConeCollisionShape.58 @brief Set the radius of the AbstractRadiusHeightCollisionShape. 64 59 If the radius changes, this causes the internal collision shape to be recreated. 65 60 @param value The radius to be set. … … 69 64 { if(this->radius_ == value) return false; this->radius_ = value; updateShape(); return true; } 70 65 /** 71 @brief Get the radius of the ConeCollisionShape.72 @return Returns the radius of the ConeCollisionShape.66 @brief Get the radius of the AbstractRadiusHeightCollisionShape. 67 @return Returns the radius of the AbstractRadiusHeightCollisionShape. 73 68 */ 74 69 inline float getRadius() const … … 76 71 77 72 /** 78 @brief Set the height of the ConeCollisionShape.73 @brief Set the height of the AbstractRadiusHeightCollisionShape. 79 74 If the height changes, this causes the internal collision shape to be recreated. 80 75 @param value The height to be set. … … 84 79 { if(this->height_ == value) return false; this->height_ = value; updateShape(); return true; } 85 80 /** 86 @brief Get the height of the ConeCollisionShape.87 @return Returns the height of the ConeCollisionShape.81 @brief Get the height of the AbstractRadiusHeightCollisionShape. 82 @return Returns the height of the AbstractRadiusHeightCollisionShape. 88 83 */ 89 84 inline float getHeight() const 90 85 { return this->height_; } 91 86 92 virtual void changedScale(); // Is called when the scale of the ConeCollisionShape has changed.87 virtual void changedScale(); // Is called when the scale of the AbstractRadiusHeightCollisionShape has changed. 93 88 94 89 private: 95 90 void registerVariables(); 96 91 97 btCollisionShape* createNewShape() const; // Creates a new internal collision shape for the ConeCollisionShape. 98 99 float radius_; //!< The radius of the ConeCollisionShape. 100 float height_; //!< The height of the ConeCollisionShape. 92 float radius_; //!< The radius of the AbstractRadiusHeightCollisionShape. 93 float height_; //!< The height of the AbstractRadiusHeightCollisionShape. 101 94 }; 102 95 } 103 96 104 #endif /* _ ConeCollisionShape_H__ */97 #endif /* _AbstractRadiusHeightCollisionShape_H__ */
Note: See TracChangeset
for help on using the changeset viewer.