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