Project

General

Profile

SO3Engine
SO3Shape.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OpenSpace3D
4For the latest info, see http://www.openspace3d.com
5
6Copyright (c) 2012 I-maginer
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://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
40#include "SO3Body.h"
41
42
43namespace SO3
44{
45
46class _SO3_Export SShape : public SData
47{
48public:
64
65protected:
67 Ogre::Quaternion mBaseRotation;
68 Ogre::Vector3 mBaseOffset;
69 Ogre::Vector3 mBaseScale;
70 Ogre::Vector3 mComputedOffset;
71private:
72 ShapeType mShapeType;
73
74public:
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();
106protected:
107private:
110 SShape();
111};
112
113}
114
115#endif
librairies include
represents a shape for collision detection
Ogre::Vector3 mBaseScale
Definition SO3Shape.h:69
Ogre::Vector3 mComputedOffset
Definition SO3Shape.h:70
OgreNewt::CollisionPtr mCollisionPtr
Definition SO3Shape.h:66
@ SO3_CONCAVE_COLLISION
Definition SO3Shape.h:61
@ SO3_ELLIPSOID_COLLISION
Definition SO3Shape.h:54
@ SO3_PYRAMID_COLLISION
Definition SO3Shape.h:59
@ SO3_BOX_COLLISION
Definition SO3Shape.h:52
@ SO3_NULL_COLLISION
Definition SO3Shape.h:51
@ SO3_CHAMFERCYLINDRE_COLLISION
Definition SO3Shape.h:58
@ SO3_CYLINDER_COLLISION
Definition SO3Shape.h:56
@ SO3_COMPOUND_COLLISION
Definition SO3Shape.h:57
@ SO3_CAPSULE_COLLISION
Definition SO3Shape.h:55
@ SO3_CONE_COLLISION
Definition SO3Shape.h:53
@ SO3_SHAPE_COLLISION
Definition SO3Shape.h:60
Ogre::Vector3 mBaseOffset
Definition SO3Shape.h:68
Ogre::Quaternion mBaseRotation
Definition SO3Shape.h:67