PixelLightAPI  .
BodyEllipsoid.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: BodyEllipsoid.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_BODYELLIPSOID_H__
00024 #define __PLPHYSICS_BODYELLIPSOID_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include <PLMath/Vector3.h>
00032 #include "PLPhysics/Body.h"
00033 
00034 
00035 //[-------------------------------------------------------]
00036 //[ Namespace                                             ]
00037 //[-------------------------------------------------------]
00038 namespace PLPhysics {
00039 
00040 
00041 //[-------------------------------------------------------]
00042 //[ Classes                                               ]
00043 //[-------------------------------------------------------]
00044 /**
00045 *  @brief
00046 *    Abstract PL physics ellipsoid body
00047 *
00048 *  @remarks
00049 *    Sphere collision are generalized ellipsoids, the application can create many different kind
00050 *    of objects by just playing with dimensions of the radius. For example to make a sphere set all
00051 *    tree radius to the same value, to make a ellipse of revolution just set two of the tree radius
00052 *    to the same value.\n
00053 *    General ellipsoids are very good hull geometries to represent the outer shell of avatars in a game.
00054 */
00055 class BodyEllipsoid : public Body {
00056 
00057 
00058     //[-------------------------------------------------------]
00059     //[ Public functions                                      ]
00060     //[-------------------------------------------------------]
00061     public:
00062         /**
00063         *  @brief
00064         *    Destructor
00065         */
00066         PLPHYSICS_API virtual ~BodyEllipsoid();
00067 
00068         /**
00069         *  @brief
00070         *    Returns the ellipsoid radius along each axis
00071         *
00072         *  @return
00073         *    The ellipsoid radius along each axis
00074         */
00075         PLPHYSICS_API const PLMath::Vector3 &GetRadius() const;
00076 
00077 
00078     //[-------------------------------------------------------]
00079     //[ Protected functions                                   ]
00080     //[-------------------------------------------------------]
00081     protected:
00082         /**
00083         *  @brief
00084         *    Constructor
00085         *
00086         *  @param[in] cWorld
00087         *    World this body is in
00088         *  @param[in] cBodyImpl
00089         *    Reference to the physics API specific body implementation
00090         *  @param[in] vRadius
00091         *    Ellipsoid radius along each axis
00092         */
00093         PLPHYSICS_API BodyEllipsoid(World &cWorld, BodyImpl &cBodyImpl, const PLMath::Vector3 &vRadius);
00094 
00095 
00096     //[-------------------------------------------------------]
00097     //[ Protected data                                        ]
00098     //[-------------------------------------------------------]
00099     protected:
00100         PLMath::Vector3 m_vRadius;  /**< Ellipsoid radius along each axis */
00101 
00102 
00103 };
00104 
00105 
00106 //[-------------------------------------------------------]
00107 //[ Namespace                                             ]
00108 //[-------------------------------------------------------]
00109 } // PLPhysics
00110 
00111 
00112 #endif // __PLPHYSICS_BODYELLIPSOID_H__


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