Project

General

Profile

SO3Engine
OgreNewt::CollisionPrimitives::Cylinder Class Reference

standard primitive cylinder. More...

#include <OgreNewt_CollisionPrimitives.h>

Inheritance diagram for OgreNewt::CollisionPrimitives::Cylinder:
OgreNewt::ConvexCollision OgreNewt::Collision

Public Member Functions

 Cylinder (const World *world)
 constructor
 
 Cylinder (const World *world, Ogre::Real radius, Ogre::Real height, int id, const Ogre::Quaternion &orient=Ogre::Quaternion::IDENTITY, const Ogre::Vector3 &pos=Ogre::Vector3::ZERO)
 constructor
 
 ~Cylinder ()
 destructor
 
- Public Member Functions inherited from OgreNewt::ConvexCollision
 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

standard primitive cylinder.

Definition at line 97 of file OgreNewt_CollisionPrimitives.h.

Constructor & Destructor Documentation

◆ Cylinder() [1/2]

OgreNewt::CollisionPrimitives::Cylinder::Cylinder ( const World world)

constructor

Create a 'blank' cylinder collision object. Can be used for CollisionSerializer::importCollision

Parameters
worldpointer to the OgreNewt::World

Definition at line 78 of file OgreNewt_CollisionPrimitives.cpp.

◆ Cylinder() [2/2]

OgreNewt::CollisionPrimitives::Cylinder::Cylinder ( const World world,
Ogre::Real  radius,
Ogre::Real  height,
int  id,
const Ogre::Quaternion &  orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3 &  pos = Ogre::Vector3::ZERO 
)

constructor

default aligned along the local X axis (x=height).

Parameters
worldpointer to OgreNewt::World
radiusradius of the cylinder (Y and Z axis)
heightheight of the cylinder (X axis)
idan id for this shape, can be received with collision->getUserId()
orientorientation offset of the primitive
posposition offset of the primitive

Definition at line 81 of file OgreNewt_CollisionPrimitives.cpp.

◆ ~Cylinder()

OgreNewt::CollisionPrimitives::Cylinder::~Cylinder ( )
inline

destructor

Definition at line 121 of file OgreNewt_CollisionPrimitives.h.


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