SO3Engine
src
SO3PhysicGraph
SO3MaterialID.cpp
Go to the documentation of this file.
1
8
#include "
SO3PhysicGraph/SO3MaterialID.h
"
9
#include "
SO3SceneGraph/SO3Scene.h
"
10
#include "
SO3SceneGraph/SO3Physics.h
"
11
12
namespace
SO3
13
{
14
15
SMaterialID::SMaterialID(
SScene
* scene,
const
std::string& materialIdName) :
SData
(materialIdName)
16
{
17
O3MaterialID
=
new
OgreNewt::MaterialID
(scene->
GetPhysicsWorld
()->
GetPhysicWorld
());
18
mScene
= scene;
19
mWorld
= scene->
GetPhysicsWorld
();
20
}
21
22
SMaterialID::SMaterialID() :
SData
(
""
)
23
{
24
// Forbiden (private);
25
}
26
27
SMaterialID::~SMaterialID
()
28
{
29
SO3_SAFE_DELETE(
O3MaterialID
);
30
}
31
32
OgreNewt::MaterialID
*
SMaterialID::getOgreNewtMaterialID
()
33
{
34
return
O3MaterialID
;
35
}
36
37
int
SMaterialID::getID
()
38
{
39
return
O3MaterialID
->
getID
();
40
}
41
42
SScene
*
SMaterialID::GetParentScene
()
43
{
44
return
mScene
;
45
}
46
47
SPhysicWorld
*
SMaterialID::GetParentWorld
()
48
{
49
return
mWorld
;
50
}
51
52
}
SO3MaterialID.h
SO3Physics.h
SO3Scene.h
OgreNewt::MaterialID
represents a material
Definition
OgreNewt_MaterialID.h:25
OgreNewt::MaterialID::getID
int getID() const
get Newton-assigned material ID.
Definition
OgreNewt_MaterialID.h:38
SO3::SData
Definition
SO3DataScol.h:41
SO3::SMaterialID::mScene
SScene * mScene
Definition
SO3MaterialID.h:49
SO3::SMaterialID::mWorld
SPhysicWorld * mWorld
Definition
SO3MaterialID.h:50
SO3::SMaterialID::~SMaterialID
~SMaterialID()
Definition
SO3MaterialID.cpp:27
SO3::SMaterialID::GetParentWorld
SPhysicWorld * GetParentWorld()
Definition
SO3MaterialID.cpp:47
SO3::SMaterialID::getID
int getID()
Definition
SO3MaterialID.cpp:37
SO3::SMaterialID::O3MaterialID
OgreNewt::MaterialID * O3MaterialID
Definition
SO3MaterialID.h:48
SO3::SMaterialID::getOgreNewtMaterialID
OgreNewt::MaterialID * getOgreNewtMaterialID()
Definition
SO3MaterialID.cpp:32
SO3::SMaterialID::GetParentScene
SScene * GetParentScene()
Definition
SO3MaterialID.cpp:42
SO3::SPhysicWorld
Definition
SO3Physics.h:100
SO3::SPhysicWorld::GetPhysicWorld
OgreNewt::World * GetPhysicWorld()
Definition
SO3Physics.cpp:93
SO3::SScene
Definition
SO3Scene.h:125
SO3::SScene::GetPhysicsWorld
SPhysicWorld * GetPhysicsWorld()
Definition
SO3Scene.cpp:1332
SO3
Definition
SO3DataScol.h:38
Generated by
1.9.8