Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 23, 2011, 11:40:58 PM (13 years ago)
Author:
dafrick
Message:

Merging pickup branch into presentation branch.

Location:
code/branches/presentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/modules/objects/collisionshapes/SphereCollisionShape.h

    r7601 r8556  
    4141namespace orxonox
    4242{
     43
     44    /**
     45    @brief
     46        Wrapper for the bullet sphere collision shape class btSphereShape.
     47
     48    @author
     49        Reto Grieder
     50
     51    @see btSphereShape
     52    @ingroup Collisionshapes
     53    */
    4354    class _ObjectsExport SphereCollisionShape : public CollisionShape
    4455    {
     
    4960            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5061
    51             inline void setRadius(float radius)
    52                 { this->radius_ = radius; updateShape(); }
     62            /**
     63            @brief Set the radius of the SphereCollisionShape.
     64                   If the radius changes, this causes the internal collision shape to be recreated.
     65            @param radius The radius to be set.
     66            @return Returns true if the radius has changed, false if not.
     67            */
     68            inline bool setRadius(float radius)
     69                { if(this->radius_ == radius) return false; this->radius_ = radius; updateShape(); return true; }
     70            /**
     71            @brief Get the radius of the SphereCollisionShape.
     72            @return Returns the radius of the SphereCollisionShape.
     73            */
    5374            inline float getRadius() const
    5475                { return this->radius_; }
     76
     77            virtual void changedScale(); // Is called when the scale of the SphereCollisionShape has changed.
    5578
    5679        private:
     
    5982            btCollisionShape* createNewShape() const;
    6083
    61             float radius_;
     84            float radius_; //!< The radius of the SphereCollisionShape.
    6285    };
    6386}
Note: See TracChangeset for help on using the changeset viewer.