PixelLightAPI  .
JointSlider.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: JointSlider.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_JOINTSLIDER_H__
00024 #define __PLPHYSICS_JOINTSLIDER_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include <PLMath/Vector3.h>
00032 #include "PLPhysics/Joint.h"
00033 
00034 
00035 //[-------------------------------------------------------]
00036 //[ Namespace                                             ]
00037 //[-------------------------------------------------------]
00038 namespace PLPhysics {
00039 
00040 
00041 //[-------------------------------------------------------]
00042 //[ Classes                                               ]
00043 //[-------------------------------------------------------]
00044 /**
00045 *  @brief
00046 *    Abstract PL physics slider (other name: cylindrical) joint
00047 *
00048 *  @remarks
00049 *    DOFs removed: 4 DOFs remaining: 2
00050 */
00051 class JointSlider : public Joint {
00052 
00053 
00054     //[-------------------------------------------------------]
00055     //[ Public functions                                      ]
00056     //[-------------------------------------------------------]
00057     public:
00058         /**
00059         *  @brief
00060         *    Destructor
00061         */
00062         PLPHYSICS_API virtual ~JointSlider();
00063 
00064         /**
00065         *  @brief
00066         *    Returns the origin of the slider in world space
00067         *
00068         *  @return
00069         *    The origin of the slider in world space
00070         */
00071         PLPHYSICS_API const PLMath::Vector3 &GetPivotPoint() const;
00072 
00073         /**
00074         *  @brief
00075         *    Returns the line of action of the slider in world space
00076         *
00077         *  @return
00078         *    The line of action of the slider in world space
00079         */
00080         PLPHYSICS_API const PLMath::Vector3 &GetPinDir() const;
00081 
00082 
00083     //[-------------------------------------------------------]
00084     //[ Protected functions                                   ]
00085     //[-------------------------------------------------------]
00086     protected:
00087         /**
00088         *  @brief
00089         *    Constructor
00090         *
00091         *  @param[in] cWorld
00092         *    World this joint is in
00093         *  @param[in] cJointImpl
00094         *    Reference to the physics API specific joint implementation
00095         *  @param[in] pParentBody
00096         *    Pointer to the parent rigid body, can be a null pointer
00097         *  @param[in] pChildBody
00098         *    Pointer to the attached rigid body, can be a null pointer
00099         *  @param[in] vPivotPoint
00100         *    Origin of the slider in world space
00101         *  @param[in] vPinDir
00102         *    The line of action of the slider in world space
00103         */
00104         PLPHYSICS_API JointSlider(World &cWorld, JointImpl &cJointImpl, Body *pParentBody, Body *pChildBody,
00105                                   const PLMath::Vector3 &vPivotPoint, const PLMath::Vector3 &vPinDir);
00106 
00107 
00108     //[-------------------------------------------------------]
00109     //[ Protected data                                        ]
00110     //[-------------------------------------------------------]
00111     protected:
00112         PLMath::Vector3 m_vPivotPoint;  /**< Origin of the slider in world space */
00113         PLMath::Vector3 m_vPinDir;      /**< The line of action of the slider in world space */
00114 
00115 
00116 };
00117 
00118 
00119 //[-------------------------------------------------------]
00120 //[ Namespace                                             ]
00121 //[-------------------------------------------------------]
00122 } // PLPhysics
00123 
00124 
00125 #endif // __PLPHYSICS_JOINTSLIDER_H__


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