PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: BodyCylinder.h * 00003 * 00004 * Copyright (C) 2002-2012 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_BODYCYLINDER_H__ 00024 #define __PLPHYSICS_BODYCYLINDER_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLPhysics/Body.h" 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Namespace ] 00036 //[-------------------------------------------------------] 00037 namespace PLPhysics { 00038 00039 00040 //[-------------------------------------------------------] 00041 //[ Classes ] 00042 //[-------------------------------------------------------] 00043 /** 00044 * @brief 00045 * Abstract PL physics cylinder body 00046 */ 00047 class BodyCylinder : public Body { 00048 00049 00050 //[-------------------------------------------------------] 00051 //[ Public functions ] 00052 //[-------------------------------------------------------] 00053 public: 00054 /** 00055 * @brief 00056 * Destructor 00057 */ 00058 PLPHYSICS_API virtual ~BodyCylinder(); 00059 00060 /** 00061 * @brief 00062 * Returns the cylinder radius at the base 00063 * 00064 * @return 00065 * The cylinder radius at the base 00066 */ 00067 PLPHYSICS_API float GetRadius() const; 00068 00069 /** 00070 * @brief 00071 * Returns the cylinder height along the x local axis from base to top 00072 * 00073 * @return 00074 * The cylinder height along the x local axis from base to top 00075 */ 00076 PLPHYSICS_API float GetHeight() const; 00077 00078 00079 //[-------------------------------------------------------] 00080 //[ Protected functions ] 00081 //[-------------------------------------------------------] 00082 protected: 00083 /** 00084 * @brief 00085 * Constructor 00086 * 00087 * @param[in] cWorld 00088 * World this body is in 00089 * @param[in] cBodyImpl 00090 * Reference to the physics API specific body implementation 00091 * @param[in] fRadius 00092 * Cylinder radius at the base 00093 * @param[in] fHeight 00094 * Cylinder height along the x local axis from base to top 00095 */ 00096 PLPHYSICS_API BodyCylinder(World &cWorld, BodyImpl &cBodyImpl, float fRadius, float fHeight); 00097 00098 00099 //[-------------------------------------------------------] 00100 //[ Protected data ] 00101 //[-------------------------------------------------------] 00102 protected: 00103 float m_fRadius; /**< Cylinder radius at the base */ 00104 float m_fHeight; /**< Cylinder height along the x local axis from base to top */ 00105 00106 00107 }; 00108 00109 00110 //[-------------------------------------------------------] 00111 //[ Namespace ] 00112 //[-------------------------------------------------------] 00113 } // PLPhysics 00114 00115 00116 #endif // __PLPHYSICS_BODYCYLINDER_H__
|