12#ifndef _INCLUDE_OGRENEWT_COLLISION
13#define _INCLUDE_OGRENEWT_COLLISION
86 unsigned getUserID()
const {
return NewtonCollisionGetUserID(m_col); }
92 Ogre::AxisAlignedBox getAABB(
const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3& pos = Ogre::Vector3::ZERO)
const;
104 static NewtonCollisionInfoRecord* getInfo(
const NewtonCollision *col);
136 Ogre::Real
calculateVolume()
const {
return (Ogre::Real)NewtonConvexCollisionCalculateVolume(m_col); }
143 NewtonConvexCollisionCalculateInertialMatrix(m_col, &iner.m_x, &off.m_x);
145 inertia.x = Ogre::Real(iner.m_x);
146 inertia.y = Ogre::Real(iner.m_y);
147 inertia.z = Ogre::Real(iner.m_z);
148 offset.x = Ogre::Real(off.m_x);
149 offset.y = Ogre::Real(off.m_y);
150 offset.z = Ogre::Real(off.m_z);
155#ifdef OGRENEWT_NO_COLLISION_SHAREDPTR
represents a shape for collision detection
CollisionPrimitiveType getCollisionPrimitiveType() const
Returns the Collisiontype for this Collision.
NewtonCollisionInfoRecord * getInfo()
Returns collision info record for this collision.
const World * getWorld() const
NewtonCollision *const getNewtonCollision() const
retrieve the Newton pointer
represents a collision shape that is explicitly convex.
void calculateInertialMatrix(Ogre::Vector3 &inertia, Ogre::Vector3 &offset) const
calculate the moment of inertia for this collision primitive, along with the theoretical center-of-ma...
Ogre::Real calculateVolume() const
calculate the volume of the collision shape, useful for buoyancy calculations.
represents a physics world.
@ CompoundCollisionPrimitiveType
@ HeighFieldPrimitiveType
@ ConvexHullPrimitiveType
@ ChamferCylinderPrimitiveType
@ TreeCollisionPrimitiveType
ConvexCollision * ConvexCollisionPtr