SO3Engine
src
SO3PhysicGraph
SO3ShapeConcaveHull.cpp
Go to the documentation of this file.
1
8
#include "
SO3PhysicGraph/SO3ShapeConcaveHull.h
"
9
#include "
SO3SceneGraph/SO3NodeScol.h
"
10
#include "
SO3SceneGraph/SO3Entity.h
"
11
#include "
SO3SceneGraph/SO3Scene.h
"
12
13
namespace
SO3
14
{
15
16
SShapeConcaveHull::SShapeConcaveHull() :
SShape
(
""
,
SShape
::SO3_NULL_COLLISION)
17
{
18
// Forbiden, private.
19
}
20
21
SShapeConcaveHull::SShapeConcaveHull(
const
std::string& shapeName,
SEntity
* entity,
const
Ogre::Real& tolerance) :
SShape
(shapeName,
SShape
::SO3_CONCAVE_COLLISION)
22
{
23
Ogre::Vector3 scale = Ogre::Vector3::UNIT_SCALE;
24
#ifdef USE_COLLISION_NOSCALE
25
scale = entity->
GetGlobalScale
();
26
#endif
27
28
mCollisionPtr
=
OgreNewt::CollisionPtr
(
new
OgreNewt::CollisionPrimitives::ConcaveHull
(entity->
GetParentScene
()->
GetPhysicsWorld
()->
GetPhysicWorld
(), entity->
getOgreEntityPointer
(), 0, tolerance, scale));
29
mTolerance = tolerance;
30
}
31
32
SShapeConcaveHull::~SShapeConcaveHull
()
33
{
34
}
35
36
Ogre::Real
SShapeConcaveHull::GetTolerance
()
37
{
38
return
mTolerance;
39
}
40
41
}
SO3Entity.h
SO3NodeScol.h
SO3Scene.h
SO3ShapeConcaveHull.h
OgreNewt::CollisionPrimitives::ConcaveHull
ConvexHull primitive.
Definition
OgreNewt_CollisionPrimitives.h:260
SO3::SEntity
Definition
SO3Entity.h:43
SO3::SEntity::getOgreEntityPointer
Ogre::Entity * getOgreEntityPointer()
Definition
SO3Entity.cpp:684
SO3::SNode::GetParentScene
SScene * GetParentScene()
Definition
SO3NodeScol.cpp:298
SO3::SNode::GetGlobalScale
virtual Ogre::Vector3 GetGlobalScale()
Definition
SO3NodeScol.cpp:784
SO3::SPhysicWorld::GetPhysicWorld
OgreNewt::World * GetPhysicWorld()
Definition
SO3Physics.cpp:93
SO3::SScene::GetPhysicsWorld
SPhysicWorld * GetPhysicsWorld()
Definition
SO3Scene.cpp:1332
SO3::SShapeConcaveHull::~SShapeConcaveHull
~SShapeConcaveHull()
Definition
SO3ShapeConcaveHull.cpp:32
SO3::SShapeConcaveHull::GetTolerance
Ogre::Real GetTolerance()
Definition
SO3ShapeConcaveHull.cpp:36
SO3::SShape
Definition
SO3Shape.h:47
SO3::SShape::mCollisionPtr
OgreNewt::CollisionPtr mCollisionPtr
Definition
SO3Shape.h:66
SShape
Manage physics shape .
OgreNewt::CollisionPtr
Collision * CollisionPtr
Definition
OgreNewt_Collision.h:156
SO3
Definition
SO3DataScol.h:38
Generated by
1.9.8