- Timestamp:
- Jan 11, 2015, 3:40:41 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.h
r9667 r10189 37 37 38 38 #include "objects/ObjectsPrereqs.h" 39 #include " collisionshapes/CollisionShape.h"39 #include "AbstractRadiusHeightCollisionShape.h" 40 40 41 41 namespace orxonox … … 52 52 @ingroup Collisionshapes 53 53 */ 54 class _ObjectsExport ConeCollisionShape : public CollisionShape54 class _ObjectsExport ConeCollisionShape : public AbstractRadiusHeightCollisionShape 55 55 { 56 56 public: … … 58 58 virtual ~ConeCollisionShape(); 59 59 60 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);61 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 */74 inline float getRadius() const75 { return radius_; }76 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 */89 inline float getHeight() const90 { return this->height_; }91 92 virtual void changedScale(); // Is called when the scale of the ConeCollisionShape has changed.93 94 60 private: 95 void registerVariables();96 97 61 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.101 62 }; 102 63 }
Note: See TracChangeset
for help on using the changeset viewer.