Project

General

Profile

SO3Engine
OgreNewt::ConvexCollision Class Reference

represents a collision shape that is explicitly convex. More...

#include <OgreNewt_Collision.h>

Inheritance diagram for OgreNewt::ConvexCollision:
OgreNewt::Collision OgreNewt::CollisionPrimitives::Box OgreNewt::CollisionPrimitives::Capsule OgreNewt::CollisionPrimitives::ChamferCylinder OgreNewt::CollisionPrimitives::ConcaveHull OgreNewt::CollisionPrimitives::Cone OgreNewt::CollisionPrimitives::ConvexHull OgreNewt::CollisionPrimitives::Cylinder OgreNewt::CollisionPrimitives::Ellipsoid OgreNewt::CollisionPrimitives::Pyramid

Public Member Functions

 ConvexCollision (const World *world)
 constructor
 
 ConvexCollision (const Collision &convexShape)
 constructor
 
 ConvexCollision (const ConvexCollision &convexShape)
 constructor
 
 ~ConvexCollision ()
 destructor
 
Ogre::Real calculateVolume () const
 calculate the volume of the collision shape, useful for buoyancy calculations.
 
void calculateInertialMatrix (Ogre::Vector3 &inertia, Ogre::Vector3 &offset) const
 calculate the moment of inertia for this collision primitive, along with the theoretical center-of-mass for this shape.
 
- Public Member Functions inherited from OgreNewt::Collision
 Collision (const World *world)
 constructor
 
 Collision (const Collision &shape)
 constructor
 
 Collision (const NewtonCollision *collision, const World *world)
 constructor
 
virtual ~Collision ()
 destructor
 
NewtonCollision *const getNewtonCollision () const
 retrieve the Newton pointer
 
const WorldgetWorld () const
 
Ogre::AxisAlignedBox getAABB (const Ogre::Quaternion &orient=Ogre::Quaternion::IDENTITY, const Ogre::Vector3 &pos=Ogre::Vector3::ZERO) const
 
CollisionPrimitiveType getCollisionPrimitiveType () const
 Returns the Collisiontype for this Collision.
 
NewtonCollisionInfoRecord * getInfo ()
 Returns collision info record for this collision.
 

Additional Inherited Members

- Static Public Member Functions inherited from OgreNewt::Collision
static CollisionPrimitiveType getCollisionPrimitiveType (const NewtonCollision *col)
 Returns the Collisiontype for the given Newton-Collision.
 
static NewtonCollisionInfoRecord * getInfo (const NewtonCollision *col)
 Returns collision info record for given collision.
 
- Protected Attributes inherited from OgreNewt::Collision
NewtonCollision * m_col
 
const Worldm_world
 

Detailed Description

represents a collision shape that is explicitly convex.

Definition at line 120 of file OgreNewt_Collision.h.

Constructor & Destructor Documentation

◆ ConvexCollision() [1/3]

OgreNewt::ConvexCollision::ConvexCollision ( const World world)

constructor

Definition at line 68 of file OgreNewt_Collision.cpp.

◆ ConvexCollision() [2/3]

OgreNewt::ConvexCollision::ConvexCollision ( const Collision convexShape)

constructor

Definition at line 72 of file OgreNewt_Collision.cpp.

◆ ConvexCollision() [3/3]

OgreNewt::ConvexCollision::ConvexCollision ( const ConvexCollision convexShape)

constructor

Definition at line 76 of file OgreNewt_Collision.cpp.

◆ ~ConvexCollision()

OgreNewt::ConvexCollision::~ConvexCollision ( )

destructor

Definition at line 80 of file OgreNewt_Collision.cpp.

Member Function Documentation

◆ calculateInertialMatrix()

void OgreNewt::ConvexCollision::calculateInertialMatrix ( Ogre::Vector3 &  inertia,
Ogre::Vector3 &  offset 
) const
inline

calculate the moment of inertia for this collision primitive, along with the theoretical center-of-mass for this shape.

Definition at line 139 of file OgreNewt_Collision.h.

◆ calculateVolume()

Ogre::Real OgreNewt::ConvexCollision::calculateVolume ( ) const
inline

calculate the volume of the collision shape, useful for buoyancy calculations.

Definition at line 136 of file OgreNewt_Collision.h.


The documentation for this class was generated from the following files: