PixelLightAPI  .
SensorRaycast.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: SensorRaycast.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_SENSORRAYCAST_H__
00024 #define __PLPHYSICS_SENSORRAYCAST_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include "PLPhysics/Sensor.h"
00032 
00033 
00034 //[-------------------------------------------------------]
00035 //[ Namespace                                             ]
00036 //[-------------------------------------------------------]
00037 namespace PLPhysics {
00038 
00039 
00040 //[-------------------------------------------------------]
00041 //[ Classes                                               ]
00042 //[-------------------------------------------------------]
00043 /**
00044 *  @brief
00045 *    Abstract PL physics ray cast sensor
00046 */
00047 class SensorRaycast : public Sensor {
00048 
00049 
00050     //[-------------------------------------------------------]
00051     //[ Public functions                                      ]
00052     //[-------------------------------------------------------]
00053     public:
00054         /**
00055         *  @brief
00056         *    Destructor
00057         */
00058         PLPHYSICS_API virtual ~SensorRaycast();
00059 
00060         /**
00061         *  @brief
00062         *    Returns the start point
00063         *
00064         *  @return
00065         *    The start point
00066         */
00067         PLPHYSICS_API const PLMath::Vector3 &GetStart() const;
00068 
00069         /**
00070         *  @brief
00071         *    Sets the start point
00072         *
00073         *  @param[in] vPoint
00074         *    The new start point
00075         */
00076         PLPHYSICS_API void SetStart(const PLMath::Vector3 &vPoint);
00077 
00078         /**
00079         *  @brief
00080         *    Returns the end point
00081         *
00082         *  @return
00083         *    The end point
00084         */
00085         PLPHYSICS_API const PLMath::Vector3 &GetEnd() const;
00086 
00087         /**
00088         *  @brief
00089         *    Sets the end point
00090         *
00091         *  @param[in] vPoint
00092         *    The new end point
00093         */
00094         PLPHYSICS_API void SetEnd(const PLMath::Vector3 &vPoint);
00095 
00096 
00097     //[-------------------------------------------------------]
00098     //[ Protected functions                                   ]
00099     //[-------------------------------------------------------]
00100     protected:
00101         /**
00102         *  @brief
00103         *    Constructor
00104         *
00105         *  @param[in] cWorld
00106         *    World this sensor is in
00107         *  @param[in] vStart
00108         *    Beginning of the ray in global space
00109         *  @param[in] vEnd
00110         *    End of the ray in global space
00111         *  @param[in] nFlags
00112         *    Flags (see EFlags)
00113         */
00114         PLPHYSICS_API SensorRaycast(World &cWorld, const PLMath::Vector3 &vStart = PLMath::Vector3::Zero, const PLMath::Vector3 &vEnd = PLMath::Vector3::Zero, PLCore::uint32 nFlags = 0);
00115 
00116 
00117     //[-------------------------------------------------------]
00118     //[ Protected data                                        ]
00119     //[-------------------------------------------------------]
00120     protected:
00121         PLMath::Vector3 m_vStart;   /**< The start point */
00122         PLMath::Vector3 m_vEnd;     /**< The end point */
00123 
00124 
00125 };
00126 
00127 
00128 //[-------------------------------------------------------]
00129 //[ Namespace                                             ]
00130 //[-------------------------------------------------------]
00131 } // PLPhysics
00132 
00133 
00134 #endif // __PLPHYSICS_SENSORRAYCAST_H__


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:08:59
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported