PixelLightAPI  .
SensorAABoundingBox.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: SensorAABoundingBox.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_SENSORAABOUNDINGBOX_H__
00024 #define __PLPHYSICS_SENSORAABOUNDINGBOX_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 axis aligned bounding box sensor
00046 */
00047 class SensorAABoundingBox : public Sensor {
00048 
00049 
00050     //[-------------------------------------------------------]
00051     //[ Public functions                                      ]
00052     //[-------------------------------------------------------]
00053     public:
00054         /**
00055         *  @brief
00056         *    Destructor
00057         */
00058         PLPHYSICS_API virtual ~SensorAABoundingBox();
00059 
00060         /**
00061         *  @brief
00062         *    Returns the minimum point
00063         *
00064         *  @return
00065         *    The minimum point
00066         */
00067         PLPHYSICS_API const PLMath::Vector3 &GetMin() const;
00068 
00069         /**
00070         *  @brief
00071         *    Sets the minimum point
00072         *
00073         *  @param[in] vMin
00074         *    The new minimum point
00075         */
00076         PLPHYSICS_API void SetMin(const PLMath::Vector3 &vMin);
00077 
00078         /**
00079         *  @brief
00080         *    Returns the maximum point
00081         *
00082         *  @return
00083         *    The maximum point
00084         */
00085         PLPHYSICS_API const PLMath::Vector3 &GetMax() const;
00086 
00087         /**
00088         *  @brief
00089         *    Sets the maximum point
00090         *
00091         *  @param[in] vMax
00092         *    The new maximum point
00093         */
00094         PLPHYSICS_API void SetMax(const PLMath::Vector3 &vMax);
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] vMin
00108         *    Minimum of the axis aligned bounding box in global space
00109         *  @param[in] vMax
00110         *    Maximum of the axis aligned bounding box in global space
00111         *  @param[in] nFlags
00112         *    Flags (see EFlags)
00113         */
00114         PLPHYSICS_API SensorAABoundingBox(World &cWorld, const PLMath::Vector3 &vMin = PLMath::Vector3::Zero, const PLMath::Vector3 &vMax = PLMath::Vector3::Zero, PLCore::uint32 nFlags = 0);
00115 
00116 
00117     //[-------------------------------------------------------]
00118     //[ Protected data                                        ]
00119     //[-------------------------------------------------------]
00120     protected:
00121         PLMath::Vector3 m_vMin; /**< The minimum point */
00122         PLMath::Vector3 m_vMax; /**< The maximum point */
00123 
00124 
00125 };
00126 
00127 
00128 //[-------------------------------------------------------]
00129 //[ Namespace                                             ]
00130 //[-------------------------------------------------------]
00131 } // PLPhysics
00132 
00133 
00134 #endif // __PLPHYSICS_SENSORAABOUNDINGBOX_H__


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