- Timestamp:
- May 8, 2011, 11:45:32 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup/src/modules/objects/collisionshapes/ConeCollisionShape.h
r7601 r8422 41 41 namespace orxonox 42 42 { 43 44 /** 45 @brief 46 Wrapper for the bullet cone collision shape class btConeShape. 47 48 @author 49 Reto Grieder 50 51 @ingroup Collisionshapes. 52 */ 43 53 class _ObjectsExport ConeCollisionShape : public CollisionShape 44 54 { … … 49 59 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 50 60 51 inline void setRadius(float value) 52 { this->radius_ = value; updateShape(); } 61 /** 62 @brief Set the radius of the ConeCollisionShape. 63 If the radius changes, this causes the internal collision shape to be recreated. 64 @param value The radius to be set. 65 @return Returns true if the radius has changed, false if not. 66 */ 67 inline bool setRadius(float value) 68 { if(this->radius_ == value) return false; this->radius_ = value; updateShape(); return true; } 69 /** 70 @brief Get the radius of the ConeCollisionShape. 71 @return Returns the radius of the ConeCollisionShape. 72 */ 53 73 inline float getRadius() const 54 74 { return radius_; } 55 75 56 inline void setHeight(float value) 57 { this->height_ = value; updateShape(); } 76 /** 77 @brief Set the height of the ConeCollisionShape. 78 If the height changes, this causes the internal collision shape to be recreated. 79 @param value The height to be set. 80 @return Returns true if the height has changed, false if not. 81 */ 82 inline bool setHeight(float value) 83 { if(this->height_ == value) return false; this->height_ = value; updateShape(); return true; } 84 /** 85 @brief Get the height of the ConeCollisionShape. 86 @return Returns the height of the ConeCollisionShape. 87 */ 58 88 inline float getHeight() const 59 89 { return this->height_; } 90 91 virtual void changedScale(); // Is called when the scale of the ConeCollisionShape has changed. 60 92 61 93 private: 62 94 void registerVariables(); 63 95 64 btCollisionShape* createNewShape() const; 96 btCollisionShape* createNewShape() const; // Creates a new internal collision shape for the ConeCollisionShape. 65 97 66 float radius_; 67 float height_; 98 float radius_; //!< The radius of the ConeCollisionShape. 99 float height_; //!< The height of the ConeCollisionShape. 68 100 }; 69 101 }
Note: See TracChangeset
for help on using the changeset viewer.