00001 /* 00002 * Physics rigid body header 00003 * 00004 * This file is part of the "SoftPixel Engine" (Copyright (c) 2008 by Lukas Hermanns) 00005 * See "SoftPixelEngine.hpp" for license information. 00006 */ 00007 00008 #ifndef __SP_PHYSICS_RIGIDBODY_H__ 00009 #define __SP_PHYSICS_RIGIDBODY_H__ 00010 00011 00012 #include "Base/spStandard.hpp" 00013 00014 #ifdef SP_COMPILE_WITH_PHYSICS 00015 00016 00017 #include "SceneGraph/spSceneMesh.hpp" 00018 #include "Framework/Physics/spPhysicsRigidBodyConstruct.hpp" 00019 #include "Framework/Physics/spPhysicsDynamicObject.hpp" 00020 00021 00022 namespace sp 00023 { 00024 namespace physics 00025 { 00026 00027 00028 class SP_EXPORT RigidBody : public DynamicPhysicsObject 00029 { 00030 00031 public: 00032 00033 virtual ~RigidBody(); 00034 00035 /* Functions */ 00036 00038 virtual void setRootNode(scene::SceneNode* Node); 00039 00040 /* Inline functions */ 00041 00043 inline ERigidBodies getType() const 00044 { 00045 return Type_; 00046 } 00048 inline scene::SceneNode* getRootNode() const 00049 { 00050 return RootNode_; 00051 } 00052 00053 protected: 00054 00055 friend class BodyJoint; 00056 00057 /* Functions */ 00058 00059 RigidBody(const ERigidBodies Type, const SRigidBodyConstruction &Construct); 00060 00061 /* Members */ 00062 00063 ERigidBodies Type_; 00064 SRigidBodyConstruction Construct_; 00065 00066 scene::SceneNode* RootNode_; 00067 00068 }; 00069 00070 00071 } // /namespace physics 00072 00073 } // /namespace sp 00074 00075 00076 #endif 00077 00078 #endif 00079 00080 00081 00082 // ================================================================================