PixelLightAPI  .
SNMPhysicsBodyTerrain.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: SNMPhysicsBodyTerrain.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_SCENENODEMODIFIERS_BODYTERRAIN_H__
00024 #define __PLPHYSICS_SCENENODEMODIFIERS_BODYTERRAIN_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include "PLPhysics/SceneNodeModifiers/SNMPhysicsBody.h"
00032 
00033 
00034 //[-------------------------------------------------------]
00035 //[ Namespace                                             ]
00036 //[-------------------------------------------------------]
00037 namespace PLPhysics {
00038 
00039 
00040 //[-------------------------------------------------------]
00041 //[ Classes                                               ]
00042 //[-------------------------------------------------------]
00043 /**
00044 *  @brief
00045 *    Physics terrain body scene node modifier
00046 */
00047 class SNMPhysicsBodyTerrain : public SNMPhysicsBody {
00048 
00049 
00050     //[-------------------------------------------------------]
00051     //[ RTTI interface                                        ]
00052     //[-------------------------------------------------------]
00053     pl_class(PLPHYSICS_RTTI_EXPORT, SNMPhysicsBodyTerrain, "PLPhysics", PLPhysics::SNMPhysicsBody, "Physics terrain body scene node modifier")
00054         // Properties
00055         pl_properties
00056             pl_property("SceneNodeClass",   "PLScene::SNTerrain")
00057         pl_properties_end
00058         // Attributes
00059         pl_attribute(Scale, PLMath::Vector3,    PLMath::Vector3::One,   ReadWrite,  GetSet, "Height field scale",   "")
00060         // Constructors
00061         pl_constructor_1(ParameterConstructor,  PLScene::SceneNode&,    "Parameter constructor",    "")
00062     pl_class_end
00063 
00064 
00065     //[-------------------------------------------------------]
00066     //[ Public RTTI get/set functions                         ]
00067     //[-------------------------------------------------------]
00068     public:
00069         PLPHYSICS_API const PLMath::Vector3 &GetScale() const;
00070         PLPHYSICS_API void SetScale(const PLMath::Vector3 &vValue);
00071 
00072 
00073     //[-------------------------------------------------------]
00074     //[ Public functions                                      ]
00075     //[-------------------------------------------------------]
00076     public:
00077         /**
00078         *  @brief
00079         *    Constructor
00080         *
00081         *  @param[in] cSceneNode
00082         *    Owner scene node
00083         */
00084         PLPHYSICS_API SNMPhysicsBodyTerrain(PLScene::SceneNode &cSceneNode);
00085 
00086         /**
00087         *  @brief
00088         *    Destructor
00089         */
00090         PLPHYSICS_API virtual ~SNMPhysicsBodyTerrain();
00091 
00092 
00093     //[-------------------------------------------------------]
00094     //[ Private data                                          ]
00095     //[-------------------------------------------------------]
00096     private:
00097         PLMath::Vector3 m_vScale;   /**< Height field scale */
00098 
00099 
00100     //[-------------------------------------------------------]
00101     //[ Private virtual SNMPhysicsBody functions              ]
00102     //[-------------------------------------------------------]
00103     private:
00104         virtual void CreatePhysicsBody() override;
00105 
00106 
00107 };
00108 
00109 
00110 //[-------------------------------------------------------]
00111 //[ Namespace                                             ]
00112 //[-------------------------------------------------------]
00113 } // PLPhysics
00114 
00115 
00116 #endif // __PLPHYSICS_SCENENODEMODIFIERS_BODYTERRAIN_H__


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