SO3Engine
include
SO3PhysicGraph
SO3Shape.h
Go to the documentation of this file.
1
/*
2
-----------------------------------------------------------------------------
3
This source file is part of OpenSpace3D
4
For the latest info, see http://www.openspace3d.com
5
6
Copyright (c) 2012 I-maginer
7
8
This program is free software; you can redistribute it and/or modify it under
9
the terms of the GNU Lesser General Public License as published by the Free Software
10
Foundation; either version 2 of the License, or (at your option) any later
11
version.
12
13
This program is distributed in the hope that it will be useful, but WITHOUT
14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17
You should have received a copy of the GNU Lesser General Public License along with
18
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19
Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20
http://www.gnu.org/copyleft/lesser.txt
21
22
-----------------------------------------------------------------------------
23
*/
24
32
#ifndef __SO3_SHAPE_H__
33
#define __SO3_SHAPE_H__
34
35
//#define USE_COLLISION_NOSCALE
36
37
#include "
SCOLBasic/SO3Prerequisites.h
"
38
#include "
SCOLBasic/SO3DataScol.h
"
39
#include "
SO3SceneGraph/SO3Physics.h
"
40
#include "
SO3Body.h
"
41
42
43
namespace
SO3
44
{
45
46
class
_SO3_Export
SShape
:
public
SData
47
{
48
public
:
49
enum
ShapeType
50
{
51
SO3_NULL_COLLISION
,
52
SO3_BOX_COLLISION
,
53
SO3_CONE_COLLISION
,
54
SO3_ELLIPSOID_COLLISION
,
55
SO3_CAPSULE_COLLISION
,
56
SO3_CYLINDER_COLLISION
,
57
SO3_COMPOUND_COLLISION
,
58
SO3_CHAMFERCYLINDRE_COLLISION
,
59
SO3_PYRAMID_COLLISION
,
60
SO3_SHAPE_COLLISION
,
61
SO3_CONCAVE_COLLISION
,
62
SO3_TREE_COLLISION
63
};
64
65
protected
:
66
OgreNewt::CollisionPtr
mCollisionPtr
;
67
Ogre::Quaternion
mBaseRotation
;
68
Ogre::Vector3
mBaseOffset
;
69
Ogre::Vector3
mBaseScale
;
70
Ogre::Vector3
mComputedOffset
;
71
private
:
72
ShapeType
mShapeType;
73
74
public
:
77
SShape
(
const
std::string& shapeName,
const
ShapeType
& shapeType);
78
81
virtual
~SShape
();
82
85
ShapeType
GetType();
86
89
Ogre::Vector3 GetBaseOffset();
90
93
Ogre::Vector3 GetComputedOffset();
94
97
Ogre::Quaternion GetBaseRotation();
98
101
Ogre::Vector3 GetBaseScale();
102
105
OgreNewt::CollisionPtr
GetOgreNewtCollisionPtr();
106
protected
:
107
private
:
110
SShape
();
111
};
112
113
}
114
115
#endif
SO3Body.h
SO3DataScol.h
SO3Physics.h
SO3Prerequisites.h
librairies include
OgreNewt::Collision
represents a shape for collision detection
Definition
OgreNewt_Collision.h:51
SO3::SData
Definition
SO3DataScol.h:41
SO3::SShape
Definition
SO3Shape.h:47
SO3::SShape::mBaseScale
Ogre::Vector3 mBaseScale
Definition
SO3Shape.h:69
SO3::SShape::mComputedOffset
Ogre::Vector3 mComputedOffset
Definition
SO3Shape.h:70
SO3::SShape::mCollisionPtr
OgreNewt::CollisionPtr mCollisionPtr
Definition
SO3Shape.h:66
SO3::SShape::ShapeType
ShapeType
Definition
SO3Shape.h:50
SO3::SShape::SO3_CONCAVE_COLLISION
@ SO3_CONCAVE_COLLISION
Definition
SO3Shape.h:61
SO3::SShape::SO3_ELLIPSOID_COLLISION
@ SO3_ELLIPSOID_COLLISION
Definition
SO3Shape.h:54
SO3::SShape::SO3_PYRAMID_COLLISION
@ SO3_PYRAMID_COLLISION
Definition
SO3Shape.h:59
SO3::SShape::SO3_BOX_COLLISION
@ SO3_BOX_COLLISION
Definition
SO3Shape.h:52
SO3::SShape::SO3_NULL_COLLISION
@ SO3_NULL_COLLISION
Definition
SO3Shape.h:51
SO3::SShape::SO3_CHAMFERCYLINDRE_COLLISION
@ SO3_CHAMFERCYLINDRE_COLLISION
Definition
SO3Shape.h:58
SO3::SShape::SO3_CYLINDER_COLLISION
@ SO3_CYLINDER_COLLISION
Definition
SO3Shape.h:56
SO3::SShape::SO3_COMPOUND_COLLISION
@ SO3_COMPOUND_COLLISION
Definition
SO3Shape.h:57
SO3::SShape::SO3_CAPSULE_COLLISION
@ SO3_CAPSULE_COLLISION
Definition
SO3Shape.h:55
SO3::SShape::SO3_CONE_COLLISION
@ SO3_CONE_COLLISION
Definition
SO3Shape.h:53
SO3::SShape::SO3_SHAPE_COLLISION
@ SO3_SHAPE_COLLISION
Definition
SO3Shape.h:60
SO3::SShape::mBaseOffset
Ogre::Vector3 mBaseOffset
Definition
SO3Shape.h:68
SO3::SShape::mBaseRotation
Ogre::Quaternion mBaseRotation
Definition
SO3Shape.h:67
SO3
Definition
SO3DataScol.h:38
Generated by
1.9.8