Project

General

Profile

SO3Engine
SO3Shape.cpp
Go to the documentation of this file.
1
9
10namespace SO3
11{
12
13SShape::SShape() : SData("")
14{
15 // Forbiden, private.
16}
17
18SShape::SShape(const std::string& shapeName, const ShapeType& shapeType) : SData(shapeName)
19{
20 // test collision type for debugging new shape types
21 assert(shapeType != SO3_NULL_COLLISION);
22
23 mShapeType = shapeType;
24 mBaseOffset = Ogre::Vector3::ZERO;
25 mBaseRotation = Ogre::Quaternion::IDENTITY;
26 mBaseScale = Ogre::Vector3::UNIT_SCALE;
27 mComputedOffset = Ogre::Vector3::ZERO;
28}
29
33
35{
36 return mShapeType;
37}
38
39Ogre::Vector3 SShape::GetBaseOffset()
40{
41 return mBaseOffset;
42}
43
45{
46 return mComputedOffset;
47}
48
49Ogre::Quaternion SShape::GetBaseRotation()
50{
51 return mBaseRotation;
52}
53
54Ogre::Vector3 SShape::GetBaseScale()
55{
56 return mBaseScale;
57}
58
64
65}
represents a shape for collision detection
Ogre::Quaternion GetBaseRotation()
Definition SO3Shape.cpp:49
virtual ~SShape()
Definition SO3Shape.cpp:30
Ogre::Vector3 GetBaseScale()
Definition SO3Shape.cpp:54
OgreNewt::CollisionPtr GetOgreNewtCollisionPtr()
Definition SO3Shape.cpp:59
Ogre::Vector3 mBaseScale
Definition SO3Shape.h:69
Ogre::Vector3 mComputedOffset
Definition SO3Shape.h:70
OgreNewt::CollisionPtr mCollisionPtr
Definition SO3Shape.h:66
@ SO3_NULL_COLLISION
Definition SO3Shape.h:51
Ogre::Vector3 mBaseOffset
Definition SO3Shape.h:68
Ogre::Vector3 GetComputedOffset()
Definition SO3Shape.cpp:44
Ogre::Vector3 GetBaseOffset()
Definition SO3Shape.cpp:39
Ogre::Quaternion mBaseRotation
Definition SO3Shape.h:67
ShapeType GetType()
Definition SO3Shape.cpp:34