Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 11, 2015, 3:40:41 PM (9 years ago)
Author:
landauf
Message:

added new collision shape (cylinder)

File:
1 copied

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.h

    r10184 r10189  
    2323 *      Reto Grieder
    2424 *   Co-authors:
    25  *      ...
     25 *      Fabian 'x3n' Landau
    2626 *
    2727 */
    2828
    2929/**
    30     @file ConeCollisionShape.h
    31     @brief Definition of the ConeCollisionShape class.
     30    @file AbstractRadiusHeightCollisionShape.h
     31    @brief Definition of the AbstractRadiusHeightCollisionShape class.
    3232    @ingroup Collisionshapes
    3333*/
    3434
    35 #ifndef _ConeCollisionShape_H__
    36 #define _ConeCollisionShape_H__
     35#ifndef _AbstractRadiusHeightCollisionShape_H__
     36#define _AbstractRadiusHeightCollisionShape_H__
    3737
    3838#include "objects/ObjectsPrereqs.h"
     
    4444    /**
    4545    @brief
    46         Wrapper for the bullet cone collision shape class btConeShape.
     46        Wrapper for the bullet collision shapes with radius and height.
    4747
    48     @author
    49         Reto Grieder
    50 
    51     @see btConeShape
    5248    @ingroup Collisionshapes
    5349    */
    54     class _ObjectsExport ConeCollisionShape : public CollisionShape
     50    class _ObjectsExport AbstractRadiusHeightCollisionShape : public CollisionShape
    5551    {
    5652        public:
    57             ConeCollisionShape(Context* context);
    58             virtual ~ConeCollisionShape();
     53            AbstractRadiusHeightCollisionShape(Context* context);
    5954
    6055            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    6156
    6257            /**
    63             @brief Set the radius of the ConeCollisionShape.
     58            @brief Set the radius of the AbstractRadiusHeightCollisionShape.
    6459                   If the radius changes, this causes the internal collision shape to be recreated.
    6560            @param value The radius to be set.
     
    6964                { if(this->radius_ == value) return false; this->radius_ = value; updateShape(); return true; }
    7065            /**
    71             @brief Get the radius of the ConeCollisionShape.
    72             @return Returns the radius of the ConeCollisionShape.
     66            @brief Get the radius of the AbstractRadiusHeightCollisionShape.
     67            @return Returns the radius of the AbstractRadiusHeightCollisionShape.
    7368            */
    7469            inline float getRadius() const
     
    7671
    7772            /**
    78             @brief Set the height of the ConeCollisionShape.
     73            @brief Set the height of the AbstractRadiusHeightCollisionShape.
    7974                   If the height changes, this causes the internal collision shape to be recreated.
    8075            @param value The height to be set.
     
    8479                { if(this->height_ == value) return false; this->height_ = value; updateShape(); return true; }
    8580            /**
    86             @brief Get the height of the ConeCollisionShape.
    87             @return Returns the height of the ConeCollisionShape.
     81            @brief Get the height of the AbstractRadiusHeightCollisionShape.
     82            @return Returns the height of the AbstractRadiusHeightCollisionShape.
    8883            */
    8984            inline float getHeight() const
    9085                { return this->height_; }
    9186
    92             virtual void changedScale(); // Is called when the scale of the ConeCollisionShape has changed.
     87            virtual void changedScale(); // Is called when the scale of the AbstractRadiusHeightCollisionShape has changed.
    9388
    9489        private:
    9590            void registerVariables();
    9691
    97             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.
     92            float radius_; //!< The radius of the AbstractRadiusHeightCollisionShape.
     93            float height_; //!< The height of the AbstractRadiusHeightCollisionShape.
    10194     };
    10295}
    10396
    104 #endif /* _ConeCollisionShape_H__ */
     97#endif /* _AbstractRadiusHeightCollisionShape_H__ */
Note: See TracChangeset for help on using the changeset viewer.