Changeset 8556 for code/branches/presentation/src/modules/objects/collisionshapes/ConeCollisionShape.h
- Timestamp:
- May 23, 2011, 11:40:58 PM (13 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation
- Property svn:mergeinfo changed
/code/branches/pickup (added) merged: 8255,8375,8381,8422,8433,8486,8489,8502,8534-8536,8543,8554-8555
- Property svn:mergeinfo changed
-
code/branches/presentation/src/modules/objects/collisionshapes/ConeCollisionShape.h
r7601 r8556 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 @see btConeShape 52 @ingroup Collisionshapes 53 */ 43 54 class _ObjectsExport ConeCollisionShape : public CollisionShape 44 55 { … … 49 60 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 50 61 51 inline void setRadius(float value) 52 { this->radius_ = value; updateShape(); } 62 /** 63 @brief Set the radius of the ConeCollisionShape. 64 If the radius changes, this causes the internal collision shape to be recreated. 65 @param value The radius to be set. 66 @return Returns true if the radius has changed, false if not. 67 */ 68 inline bool setRadius(float value) 69 { if(this->radius_ == value) return false; this->radius_ = value; updateShape(); return true; } 70 /** 71 @brief Get the radius of the ConeCollisionShape. 72 @return Returns the radius of the ConeCollisionShape. 73 */ 53 74 inline float getRadius() const 54 75 { return radius_; } 55 76 56 inline void setHeight(float value) 57 { this->height_ = value; updateShape(); } 77 /** 78 @brief Set the height of the ConeCollisionShape. 79 If the height changes, this causes the internal collision shape to be recreated. 80 @param value The height to be set. 81 @return Returns true if the height has changed, false if not. 82 */ 83 inline bool setHeight(float value) 84 { if(this->height_ == value) return false; this->height_ = value; updateShape(); return true; } 85 /** 86 @brief Get the height of the ConeCollisionShape. 87 @return Returns the height of the ConeCollisionShape. 88 */ 58 89 inline float getHeight() const 59 90 { return this->height_; } 91 92 virtual void changedScale(); // Is called when the scale of the ConeCollisionShape has changed. 60 93 61 94 private: 62 95 void registerVariables(); 63 96 64 btCollisionShape* createNewShape() const; 97 btCollisionShape* createNewShape() const; // Creates a new internal collision shape for the ConeCollisionShape. 65 98 66 float radius_; 67 float height_; 99 float radius_; //!< The radius of the ConeCollisionShape. 100 float height_; //!< The height of the ConeCollisionShape. 68 101 }; 69 102 }
Note: See TracChangeset
for help on using the changeset viewer.