12#ifndef _INCLUDE_OGRENEWT_COLLISIONPRIMITIVES
13#define _INCLUDE_OGRENEWT_COLLISIONPRIMITIVES
26 namespace CollisionPrimitives
62 Box(
const World* world,
const Ogre::Vector3& size,
int id,
63 const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3& pos = Ogre::Vector3::ZERO );
90 const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3& pos = Ogre::Vector3::ZERO );
117 Cylinder(
const World* world, Ogre::Real radius, Ogre::Real height,
int id,
118 const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3& pos = Ogre::Vector3::ZERO );
145 Capsule(
const World* world, Ogre::Real radius, Ogre::Real height,
int id,
146 const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3& pos = Ogre::Vector3::ZERO );
173 Cone(
const World* world, Ogre::Real radius, Ogre::Real height,
int id,
174 const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3& pos = Ogre::Vector3::ZERO );
202 const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3& pos = Ogre::Vector3::ZERO );
235 const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3& pos = Ogre::Vector3::ZERO, Ogre::Real tolerance = 0.001f,
const Ogre::Vector3& scale = Ogre::Vector3::UNIT_SCALE);
247 ConvexHull(
const World* world,
const Ogre::Vector3* verts,
int vertcount,
int id = 1,
248 const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3& pos = Ogre::Vector3::ZERO, Ogre::Real tolerance = 0.001f );
281 ConcaveHull(
const World* world, Ogre::Entity* ent,
int id = 1, Ogre::Real tolerance = 0.001f,
const Ogre::Vector3& scale = Ogre::Vector3::UNIT_SCALE);
293 ConcaveHull(
const World* world,
const Ogre::Vector3* verts,
int vertcount,
int id = 1, Ogre::Real tolerance = 0.001f);
324 void AddEntities(
const Ogre::SceneNode* node,
const Ogre::SceneNode* mainNode,
const Ogre::Vector3 scale,
FaceWinding fw =
FW_DEFAULT);
364 void addPoly( Ogre::Vector3* polys,
unsigned int ID );
367 void finish(
bool optimize );
375 setRayCastCallbackactive( active, m_col );
380 static dFloat _CDECL newtonRayCastCallback(
const NewtonBody*
const body,
const NewtonCollision*
const treeCollision, dFloat distance, dFloat* normal,
int faceId,
void* userData);
384 static void setRayCastCallbackactive(
bool active ,
const NewtonCollision *col );
405 void parseScene( Ogre::SceneNode* startNode,
int id,
bool optimize =
true,
FaceWinding fw = FW_DEFAULT );
414 virtual bool entityFilter(
const Ogre::SceneNode* currentNode,
const Ogre::Entity* currentEntity,
FaceWinding& fw ) {
return true; }
417 virtual unsigned int getID(
const Ogre::SceneNode* currentNode,
const Ogre::Entity* currentEntity,
unsigned int currentSubMesh ) {
return count++; }
421 void _parseNode( Ogre::SceneNode* node,
const Ogre::Quaternion& curOrient,
const Ogre::Vector3& curPos,
const Ogre::Vector3& curScale,
FaceWinding fw );
484 Pyramid(
const World* world,
const Ogre::Vector3& size,
int id,
485 const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3& pos = Ogre::Vector3::ZERO, Ogre::Real tolerance = 0.001f );
509 void createHeightFieldCollision(const World *world,int width,int height,int gridsDiagonals,unsigned short *elevationMap,char *attributeMap,Ogre::Real horizontalScale,Ogre::Real verticleScale,int shapeID);
represents a shape for collision detection
standard primitive capsule.
filled-donut shape primitive.
~ChamferCylinder()
destructor
create a compound from several collision pieces.
~CompoundCollision()
destructor
standard primitive cylinder.
standard primitive Ellipsoid.
null collision (results in no collision)
TreeCollision - complex polygonal collision.
void setRayCastCallbackactive(bool active=true)
set RayCastCallback active/disabled
~TreeCollision()
destructor
TreeCollision created by parsing a tree of SceneNodes, adding collision data of all meshes.
~TreeCollisionSceneParser()
virtual bool entityFilter(const Ogre::SceneNode *currentNode, const Ogre::Entity *currentEntity, FaceWinding &fw)
this is a user-inherited function that lets you filter which Entities will be added to the treeCollis...
virtual unsigned int getID(const Ogre::SceneNode *currentNode, const Ogre::Entity *currentEntity, unsigned int currentSubMesh)
user inherit-able function, allows customization of the ID to be assigned to this group of polygons.
represents a collision shape that is explicitly convex.
represents a physics world.
FaceWinding
face-winding enum.