SO3Engine
|
OgreNewt_ConvexCast.cpp
Go to the documentation of this file.
29 void Convexcast::go(const OgreNewt::World* world, const OgreNewt::ConvexCollisionPtr& col, const Ogre::Vector3& startpt, const Ogre::Quaternion &colori, const Ogre::Vector3& endpt, int maxcontactscount, int threadIndex)
54 NewtonWorldConvexCast( world->getNewtonWorld(), &matrix[0], (float*)&endpt, col->getNewtonCollision(),
59 if( world->getDebugger().isRaycastRecording() && world->getDebugger().isRaycastRecordingHitBodies() )
70 unsigned _CDECL Convexcast::newtonConvexcastPreFilter(const NewtonBody *body, const NewtonCollision *collision, void* userData)
83 if( world->getDebugger().isRaycastRecording() && world->getDebugger().isRaycastRecordingHitBodies() )
106 BasicConvexcast::BasicConvexcast(const OgreNewt::World* world, const OgreNewt::ConvexCollisionPtr& col, const Ogre::Vector3& startpt, const Ogre::Quaternion &colori, const Ogre::Vector3& endpt, int maxcontactscount, int threadIndex, OgreNewt::Body* ignoreBody)
simple class that represents a single convexcast contact
Definition OgreNewt_ConvexCast.h:89
Ogre::Real mContactPenetration
contact penetration at collision point
Definition OgreNewt_ConvexCast.h:97
dLong mCollisionID
collision ID of the primitive hit by the ray (for compound collision bodies)
Definition OgreNewt_ConvexCast.h:93
Ogre::Vector3 mContactNormalOnHitPoint
surface normal at the surface of the hit body
Definition OgreNewt_ConvexCast.h:95
ConvexcastContactInfo()
Definition OgreNewt_ConvexCast.cpp:95
~ConvexcastContactInfo()
Definition OgreNewt_ConvexCast.cpp:100
bool userPreFilterCallback(OgreNewt::Body *body)
prefilter filter, ignores body set in constructor or always returns true if it's not set
Definition OgreNewt_ConvexCast.cpp:115
ConvexcastContactInfo getInfoAt(int hitnum) const
retrieve the raycast info for a specific hit.
Definition OgreNewt_ConvexCast.cpp:150
int calculateBodyHitCount() const
how many bodies did we hit? if maxcontactscount is to small, this value will be smaller too!
Definition OgreNewt_ConvexCast.cpp:127
Ogre::Real getDistanceToFirstHit() const
retrieve the distance to the first contact (in range [0,1] from startpt to endpt)
Definition OgreNewt_ConvexCast.cpp:173
OgreNewt::World *const getWorld() const
get a pointer to the OgreNewt::World this body belongs to.
Definition OgreNewt_Body.h:136
NewtonCollision *const getNewtonCollision() const
retrieve the Newton pointer
Definition OgreNewt_Collision.h:70
represents a collision shape that is explicitly convex.
Definition OgreNewt_Collision.h:121
Ogre::Real mFirstContactDistance
distance in [0,1] to first contact
Definition OgreNewt_ConvexCast.h:69
void go(const OgreNewt::World *world, const OgreNewt::ConvexCollisionPtr &col, const Ogre::Vector3 &startpt, const Ogre::Quaternion &colori, const Ogre::Vector3 &endpt, int maxcontactscount, int threadIndex)
performs the convexcast.
Definition OgreNewt_ConvexCast.cpp:29
virtual bool userPreFilterCallback(OgreNewt::Body *body)
user callback pre-filter function.
Definition OgreNewt_ConvexCast.h:55
NewtonWorldConvexCastReturnInfo * mReturnInfoList
list that stores the results of the convex-cast
Definition OgreNewt_ConvexCast.h:60
int mReturnInfoListSize
the actual maximum length of the list (number of elements memory has been reserved for)
Definition OgreNewt_ConvexCast.h:66
bool isRaycastRecording()
returns true, if currently recording raycasts
Definition OgreNewt_Debugger.cpp:324
bool isRaycastRecordingHitBodies()
returns true, if hit bodies are currently recording
Definition OgreNewt_Debugger.cpp:329
void addHitBody(const OgreNewt::Body *body)
this function is used internally
Definition OgreNewt_Debugger.cpp:474
void addDiscardedBody(const OgreNewt::Body *body)
this function is used internally
Definition OgreNewt_Debugger.cpp:446
void addConvexRay(const OgreNewt::ConvexCollisionPtr &col, const Ogre::Vector3 &startpt, const Ogre::Quaternion &colori, const Ogre::Vector3 &endpt)
this function is used internally
Definition OgreNewt_Debugger.cpp:388
NewtonWorld * getNewtonWorld() const
retrieves a pointer to the NewtonWorld
Definition OgreNewt_World.h:284
_OgreNewtExport void QuatPosToMatrix(const Ogre::Quaternion &quat, const Ogre::Vector3 &pos, dFloat *matrix)
Take a Quaternion and Position Matrix and create a Newton-happy float matrix!
Definition OgreNewt_Tools.cpp:33
Generated by 1.9.8