PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: BodyCone.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_BODYCONE_H__ 00024 #define __PLPHYSICS_BODYCONE_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 cone body 00046 * 00047 * @note 00048 * - The cone height must equal of larger than the sum of the cap radius. If this is not 00049 * the case the height will be clamped the 2 * radius. 00050 */ 00051 class BodyCone : public Body { 00052 00053 00054 //[-------------------------------------------------------] 00055 //[ Public functions ] 00056 //[-------------------------------------------------------] 00057 public: 00058 /** 00059 * @brief 00060 * Destructor 00061 */ 00062 PLPHYSICS_API virtual ~BodyCone(); 00063 00064 /** 00065 * @brief 00066 * Returns the cone radius at the base 00067 * 00068 * @return 00069 * The cone radius at the base 00070 */ 00071 PLPHYSICS_API float GetRadius() const; 00072 00073 /** 00074 * @brief 00075 * Returns the cone height along the x local axis from base to top 00076 * 00077 * @return 00078 * The cone height along the x local axis from base to top 00079 */ 00080 PLPHYSICS_API float GetHeight() const; 00081 00082 00083 //[-------------------------------------------------------] 00084 //[ Protected functions ] 00085 //[-------------------------------------------------------] 00086 protected: 00087 /** 00088 * @brief 00089 * Constructor 00090 * 00091 * @param[in] cWorld 00092 * World this body is in 00093 * @param[in] cBodyImpl 00094 * Reference to the physics API specific body implementation 00095 * @param[in] fRadius 00096 * Cone radius at the base 00097 * @param[in] fHeight 00098 * Cone height along the x local axis from base to top 00099 */ 00100 PLPHYSICS_API BodyCone(World &cWorld, BodyImpl &cBodyImpl, float fRadius, float fHeight); 00101 00102 00103 //[-------------------------------------------------------] 00104 //[ Protected data ] 00105 //[-------------------------------------------------------] 00106 protected: 00107 float m_fRadius; /**< Cone radius at the base */ 00108 float m_fHeight; /**< Cone height along the x local axis from base to top */ 00109 00110 00111 }; 00112 00113 00114 //[-------------------------------------------------------] 00115 //[ Namespace ] 00116 //[-------------------------------------------------------] 00117 } // PLPhysics 00118 00119 00120 #endif // __PLPHYSICS_BODYCONE_H__
|