Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
00001 // Copyright 2006-2011 by Kat'Oun 00002 00003 #ifndef _SHAPE_H_ 00004 #define _SHAPE_H_ 00005 00006 #include <EngineConfig.h> 00007 #include <core/Types.h> 00008 #include <core/Vector3d.h> 00009 #include <core/Quaternion.h> 00010 #include <physics/ShapeDefines.h> 00011 00012 namespace physics 00013 { 00014 00018 class ENGINE_PUBLIC_EXPORT Shape 00019 { 00020 public: 00021 00022 Shape(); 00023 virtual ~Shape(); 00024 00026 const ShapeType& getShapeType() const; 00027 00029 virtual void setPosition(f32 x, f32 y, f32 z); 00030 virtual void setPosition(const core::vector3d& pos); 00031 00033 const core::vector3d& getPosition() const; 00034 00036 virtual void setOrientation(const core::quaternion& q); 00037 00039 const core::quaternion& getOrientation() const; 00040 00041 protected: 00042 00043 ShapeType mShapeType; 00044 00046 core::vector3d mPosition; 00047 00049 core::quaternion mOrientation; 00050 }; 00051 00053 //Plane Shape 00054 00055 class ENGINE_PUBLIC_EXPORT PlaneShape: public Shape 00056 { 00057 public: 00058 00059 PlaneShape(); 00060 virtual ~PlaneShape(); 00061 00062 virtual void setDimension(const core::vector3d& normal, f32 d); 00063 00064 protected: 00065 00066 core::vector3d mNormal; 00067 f32 mD; 00068 }; 00069 00071 //Sphere Shape 00072 00073 class ENGINE_PUBLIC_EXPORT SphereShape: public Shape 00074 { 00075 public: 00076 00077 SphereShape(); 00078 virtual ~SphereShape(); 00079 00080 virtual void setDimension(f32 radius); 00081 00082 protected: 00083 00084 f32 mRadius; 00085 }; 00086 00088 //Box Shape 00089 00090 class ENGINE_PUBLIC_EXPORT BoxShape: public Shape 00091 { 00092 public: 00093 00094 BoxShape(); 00095 virtual ~BoxShape(); 00096 00097 virtual void setDimension(const core::vector3d& dimensions); 00098 00099 protected: 00100 00101 core::vector3d mDimensions; 00102 }; 00103 00104 } // end namespace physics 00105 00106 #endif
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:04 by
Doxygen
(1.7.4)
|