PixelLightAPI  .
JointCorkscrew.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: JointCorkscrew.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_JOINTCORKSCREW_H__
00024 #define __PLPHYSICS_JOINTCORKSCREW_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 corkscrew joint
00047 */
00048 class JointCorkscrew : public Joint {
00049 
00050 
00051     //[-------------------------------------------------------]
00052     //[ Public functions                                      ]
00053     //[-------------------------------------------------------]
00054     public:
00055         /**
00056         *  @brief
00057         *    Destructor
00058         */
00059         PLPHYSICS_API virtual ~JointCorkscrew();
00060 
00061         /**
00062         *  @brief
00063         *    Returns the origin of the corkscrew in world space
00064         *
00065         *  @return
00066         *    The origin of the corkscrew in world space
00067         */
00068         PLPHYSICS_API const PLMath::Vector3 &GetPivotPoint() const;
00069 
00070         /**
00071         *  @brief
00072         *    Returns the line of action of the corkscrew in world space
00073         *
00074         *  @return
00075         *    The line of action of the corkscrew in world space
00076         */
00077         PLPHYSICS_API const PLMath::Vector3 &GetPinDir() const;
00078 
00079 
00080     //[-------------------------------------------------------]
00081     //[ Protected functions                                   ]
00082     //[-------------------------------------------------------]
00083     protected:
00084         /**
00085         *  @brief
00086         *    Constructor
00087         *
00088         *  @param[in] cWorld
00089         *    World this joint is in
00090         *  @param[in] cJointImpl
00091         *    Reference to the physics API specific joint implementation
00092         *  @param[in] pParentBody
00093         *    Pointer to the parent rigid body, can be a null pointer
00094         *  @param[in] pChildBody
00095         *    Pointer to the attached rigid body, can be a null pointer
00096         *  @param[in] vPivotPoint
00097         *    Origin of the corkscrew in world space
00098         *  @param[in] vPinDir
00099         *    The line of action of the corkscrew in world space
00100         */
00101         PLPHYSICS_API JointCorkscrew(World &cWorld, JointImpl &cJointImpl, Body *pParentBody, Body *pChildBody,
00102                                      const PLMath::Vector3 &vPivotPoint, const PLMath::Vector3 &vPinDir);
00103 
00104 
00105     //[-------------------------------------------------------]
00106     //[ Protected data                                        ]
00107     //[-------------------------------------------------------]
00108     protected:
00109         PLMath::Vector3 m_vPivotPoint;  /**< Origin of the corkscrew in world space */
00110         PLMath::Vector3 m_vPinDir;      /**< The line of action of the corkscrew in world space */
00111 
00112 
00113 };
00114 
00115 
00116 //[-------------------------------------------------------]
00117 //[ Namespace                                             ]
00118 //[-------------------------------------------------------]
00119 } // PLPhysics
00120 
00121 
00122 #endif // __PLPHYSICS_JOINTCORKSCREW_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