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/ConeCollisionShape.h

    r7601 r8556  
    4141namespace orxonox
    4242{
     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    */
    4354    class _ObjectsExport ConeCollisionShape : public CollisionShape
    4455    {
     
    4960            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5061
    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            */
    5374            inline float getRadius() const
    5475                { return radius_; }
    5576
    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            */
    5889            inline float getHeight() const
    5990                { return this->height_; }
     91
     92            virtual void changedScale(); // Is called when the scale of the ConeCollisionShape has changed.
    6093
    6194        private:
    6295            void registerVariables();
    6396
    64             btCollisionShape* createNewShape() const;
     97            btCollisionShape* createNewShape() const; // Creates a new internal collision shape for the ConeCollisionShape.
    6598
    66             float radius_;
    67             float height_;
     99            float radius_; //!< The radius of the ConeCollisionShape.
     100            float height_; //!< The height of the ConeCollisionShape.
    68101     };
    69102}
Note: See TracChangeset for help on using the changeset viewer.