SO3Engine
Functions
OgreNewt::CollisionTools Namespace Reference

low-level collision commands. More...

Functions

_OgreNewtExport int CollisionPointDistance (const OgreNewt::World *world, const Ogre::Vector3 &globalpt, const OgreNewt::CollisionPtr &col, const Ogre::Quaternion &colorient, const Ogre::Vector3 &colpos, Ogre::Vector3 &retpt, Ogre::Vector3 &retnormal, int threadIndex)
 find the point on a collision primitive closest to a global point.
 
_OgreNewtExport int CollisionClosestPoint (const OgreNewt::World *world, const OgreNewt::CollisionPtr &colA, const Ogre::Quaternion &colOrientA, const Ogre::Vector3 &colPosA, const OgreNewt::CollisionPtr &colB, const Ogre::Quaternion &colOrientB, const Ogre::Vector3 &colPosB, Ogre::Vector3 &retPosA, Ogre::Vector3 &retPosB, Ogre::Vector3 &retNorm, int threadIndex)
 find the nearest 2 points between 2 collision shapes.
 
_OgreNewtExport Ogre::AxisAlignedBox CollisionCalculateFittingAABB (const OgreNewt::CollisionPtr &col, const Ogre::Quaternion &orient=Ogre::Quaternion::IDENTITY, const Ogre::Vector3 &pos=Ogre::Vector3::ZERO)
 calculate the AABB of a collision primitive in an arbitrary orientation
 
_OgreNewtExport Ogre::Vector3 CollisionSupportVertex (const OgreNewt::CollisionPtr &col, const Ogre::Vector3 &dir)
 Get a vertex of the collision in the given direction.
 

Detailed Description

low-level collision commands.

Function Documentation

◆ CollisionCalculateFittingAABB()

Ogre::AxisAlignedBox OgreNewt::CollisionTools::CollisionCalculateFittingAABB ( const OgreNewt::CollisionPtr col,
const Ogre::Quaternion &  orient = Ogre::Quaternion::IDENTITY,
const Ogre::Vector3 &  pos = Ogre::Vector3::ZERO 
)

calculate the AABB of a collision primitive in an arbitrary orientation

Calculates the global AABB of a collision primitive in world space, given an orientation and position.

Parameters
colcollision shape to calculate.
orientworld orientation of the collision.
posworld position of the collision.

Definition at line 192 of file OgreNewt_Tools.cpp.

◆ CollisionClosestPoint()

int OgreNewt::CollisionTools::CollisionClosestPoint ( const OgreNewt::World world,
const OgreNewt::CollisionPtr colA,
const Ogre::Quaternion &  colOrientA,
const Ogre::Vector3 &  colPosA,
const OgreNewt::CollisionPtr colB,
const Ogre::Quaternion &  colOrientB,
const Ogre::Vector3 &  colPosB,
Ogre::Vector3 &  retPosA,
Ogre::Vector3 &  retPosB,
Ogre::Vector3 &  retNorm,
int  threadIndex 
)

find the nearest 2 points between 2 collision shapes.

Parameters
worldpointer to world
colApointer to collision primitive A
colOrientAorientation of collision primitive A
colPosAposition of collision primitive A
colBpointer to collision primitive B
colOrientBorientation of collision primitive B
colPosBposition of collision primitive B
retPosAreturned position on collision primitive A
retPosBreturned position on collision primitive B
retNormreturned collision normal

Definition at line 163 of file OgreNewt_Tools.cpp.

◆ CollisionPointDistance()

int OgreNewt::CollisionTools::CollisionPointDistance ( const OgreNewt::World world,
const Ogre::Vector3 &  globalpt,
const OgreNewt::CollisionPtr col,
const Ogre::Quaternion &  colorient,
const Ogre::Vector3 &  colpos,
Ogre::Vector3 &  retpt,
Ogre::Vector3 &  retnormal,
int  threadIndex 
)

find the point on a collision primitive closest to a global point.

Parameters
worldpointer to world
globalptpoint to check distance from.
colcollision primitive pointer
colorientorientation of the collision primitive
colposposition of the collision primitive
retposreturned position on the collision primitive in global space
retnormalreturned normal on the collision primitive in global space

Definition at line 133 of file OgreNewt_Tools.cpp.

◆ CollisionSupportVertex()

Ogre::Vector3 OgreNewt::CollisionTools::CollisionSupportVertex ( const OgreNewt::CollisionPtr col,
const Ogre::Vector3 &  dir 
)

Get a vertex of the collision in the given direction.

Definition at line 214 of file OgreNewt_Tools.cpp.