- 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/PlaneCollisionShape.h
r7601 r8422 43 43 namespace orxonox 44 44 { 45 46 /** 47 @brief 48 Wrapper for the bullet plane collision shape class btStaticPlaneShape. 49 50 @author 51 Martin Stypinski 52 53 @ingroup Collisionshapes 54 */ 45 55 class _ObjectsExport PlaneCollisionShape : public CollisionShape 46 56 { … … 51 61 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 52 62 53 inline void setNormal(const Vector3& normal) 54 { this->normal_ = normal; updateShape(); } 55 inline const Vector3& getNormal() 63 /** 64 @brief Set the normal of the PlaneCollisionShape. 65 If the normal changes, this causes the internal collision shape to be recreated. 66 @param normal The normal vector to be set. 67 @return Returns true if the normal has changed, false if not. 68 */ 69 inline bool setNormal(const Vector3& normal) 70 { if(this->normal_ == normal) return false; this->normal_ = normal; updateShape(); return true; } 71 /** 72 @brief Get the normal of the PlaneCollisionShape. 73 @return Returns the normal vector of the PlaneCollisionShape. 74 */ 75 inline const Vector3& getNormal() const 56 76 { return normal_;} 57 77 58 inline void setOffset(float offset) 59 { this->offset_ = offset; updateShape(); } 60 inline float getOffset() 78 /** 79 @brief Set the offset of the PlaneCollisionShape. 80 If the offset changes, this causes the internal collision shape to be recreated. 81 @param offset The offset to be set. 82 @return Returns true if the offset has changed, false if not. 83 */ 84 inline bool setOffset(float offset) 85 { if(this->offset_ == offset) return false; this->offset_ = offset; updateShape(); return true; } 86 /** 87 @brief Get the offset of the PlaneCollisionShape. 88 @return Returns the offset of the PlaneCollisionShape. 89 */ 90 inline float getOffset() const 61 91 { return this->offset_;} 92 93 virtual void changedScale(); // Is called when the scale of the PlaneCollisionShape has changed. 62 94 63 95 private: 64 96 void registerVariables(); 65 97 66 btCollisionShape* createNewShape() const;98 btCollisionShape* createNewShape() const; // Creates a new internal collision shape for the PlaneCollisionShape. 67 99 68 Vector3 normal_; 69 float offset_; 100 Vector3 normal_; //!< The normal vector of the PlaneCollisionShape. 101 float offset_; //!< The offset of the PlaneCollisionShape. 70 102 }; 71 103 }
Note: See TracChangeset
for help on using the changeset viewer.