PixelLightAPI  .
SNMPhysicsBodyCylinder.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: SNMPhysicsBodyCylinder.h                       *
00003  *
00004  *  Copyright (C) 2002-2011 The PixelLight Team (http://www.pixellight.org/)
00005  *
00006  *  This file is part of PixelLight.
00007  *
00008  *  PixelLight is free software: you can redistribute it and/or modify
00009  *  it under the terms of the GNU Lesser General Public License as published by
00010  *  the Free Software Foundation, either version 3 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  PixelLight is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016  *  GNU Lesser General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU Lesser General Public License
00019  *  along with PixelLight. If not, see <http://www.gnu.org/licenses/>.
00020 \*********************************************************/
00021 
00022 
00023 #ifndef __PLPHYSICS_SCENENODEMODIFIERS_BODYCYLINDER_H__
00024 #define __PLPHYSICS_SCENENODEMODIFIERS_BODYCYLINDER_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include "PLPhysics/SceneNodeModifiers/SNMPhysicsBody.h"
00032 
00033 
00034 //[-------------------------------------------------------]
00035 //[ Namespace                                             ]
00036 //[-------------------------------------------------------]
00037 namespace PLPhysics {
00038 
00039 
00040 //[-------------------------------------------------------]
00041 //[ Classes                                               ]
00042 //[-------------------------------------------------------]
00043 /**
00044 *  @brief
00045 *    Physics cylinder body scene node modifier
00046 */
00047 class SNMPhysicsBodyCylinder : public SNMPhysicsBody {
00048 
00049 
00050 
00051     //[-------------------------------------------------------]
00052     //[ RTTI interface                                        ]
00053     //[-------------------------------------------------------]
00054     pl_class(PLPHYSICS_RTTI_EXPORT, SNMPhysicsBodyCylinder, "PLPhysics", PLPhysics::SNMPhysicsBody, "Physics cylinder body scene node modifier")
00055         // Attributes
00056         pl_attribute(Radius,    float,  1.0f,   ReadWrite,  GetSet, "Cylinder radius at the base",              "Min='0.0'")
00057         pl_attribute(Height,    float,  1.0f,   ReadWrite,  GetSet, "Cylinder height along the x local axis",   "Min='0.0'")
00058         // Constructors
00059         pl_constructor_1(ParameterConstructor,  PLScene::SceneNode&,    "Parameter constructor",    "")
00060     pl_class_end
00061 
00062 
00063     //[-------------------------------------------------------]
00064     //[ Public RTTI get/set functions                         ]
00065     //[-------------------------------------------------------]
00066     public:
00067         PLPHYSICS_API float GetRadius() const;
00068         PLPHYSICS_API void SetRadius(float fValue);
00069         PLPHYSICS_API float GetHeight() const;
00070         PLPHYSICS_API void SetHeight(float fValue);
00071 
00072 
00073     //[-------------------------------------------------------]
00074     //[ Public functions                                      ]
00075     //[-------------------------------------------------------]
00076     public:
00077         /**
00078         *  @brief
00079         *    Constructor
00080         *
00081         *  @param[in] cSceneNode
00082         *    Owner scene node
00083         */
00084         PLPHYSICS_API SNMPhysicsBodyCylinder(PLScene::SceneNode &cSceneNode);
00085 
00086         /**
00087         *  @brief
00088         *    Destructor
00089         */
00090         PLPHYSICS_API virtual ~SNMPhysicsBodyCylinder();
00091 
00092 
00093     //[-------------------------------------------------------]
00094     //[ Private data                                          ]
00095     //[-------------------------------------------------------]
00096     private:
00097         float m_fRadius;    /**< Cylinder radius at the base */
00098         float m_fHeight;    /**< Cylinder height along the x local axis */
00099 
00100 
00101     //[-------------------------------------------------------]
00102     //[ Private virtual SNMPhysicsBody functions              ]
00103     //[-------------------------------------------------------]
00104     private:
00105         virtual void CreatePhysicsBody() override;
00106 
00107 
00108 };
00109 
00110 
00111 //[-------------------------------------------------------]
00112 //[ Namespace                                             ]
00113 //[-------------------------------------------------------]
00114 } // PLPhysics
00115 
00116 
00117 #endif // __PLPHYSICS_SCENENODEMODIFIERS_BODYCYLINDER_H__


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:02
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported