|
SO3Engine
|
Basic implementation of the convexcast. More...
#include <OgreNewt_ConvexCast.h>
Classes | |
| class | ConvexcastContactInfo |
| simple class that represents a single convexcast contact More... | |
Public Member Functions | |
| BasicConvexcast () | |
| empty constructor | |
| 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=NULL) | |
| constructor | |
| ~BasicConvexcast () | |
| destuctor. | |
| bool | userPreFilterCallback (OgreNewt::Body *body) |
| prefilter filter, ignores body set in constructor or always returns true if it's not set | |
| void | setIgnoreBody (OgreNewt::Body *body) |
| sets body to ignore in filter | |
| OgreNewt::Body * | getIgnoreBody () |
| return body ignored in filter | |
| int | calculateBodyHitCount () const |
| how many bodies did we hit? if maxcontactscount is to small, this value will be smaller too! | |
| int | getContactsCount () const |
| how many contacts do we have | |
| ConvexcastContactInfo | getInfoAt (int hitnum) const |
| retrieve the raycast info for a specific hit. | |
| Ogre::Real | getDistanceToFirstHit () const |
| retrieve the distance to the first contact (in range [0,1] from startpt to endpt) | |
Public Member Functions inherited from OgreNewt::Convexcast | |
| Convexcast () | |
| constructor | |
| virtual | ~Convexcast () |
| destuctor. | |
| 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. | |
Protected Attributes | |
| OgreNewt::Body * | mIgnoreBody |
| Body to ignore in filter. | |
Protected Attributes inherited from OgreNewt::Convexcast | |
| NewtonWorldConvexCastReturnInfo * | mReturnInfoList |
| list that stores the results of the convex-cast | |
| int | mReturnInfoListLength |
| the real length of the list | |
| int | mReturnInfoListSize |
| the actual maximum length of the list (number of elements memory has been reserved for) | |
| Ogre::Real | mFirstContactDistance |
| distance in [0,1] to first contact | |
Basic implementation of the convexcast.
This class is provided for general convexcast use. it returns information about the body hit by the convexcast
Definition at line 84 of file OgreNewt_ConvexCast.h.
| OgreNewt::BasicConvexcast::BasicConvexcast | ( | ) |
empty constructor
Definition at line 102 of file OgreNewt_ConvexCast.cpp.
| OgreNewt::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 = NULL |
||
| ) |
constructor
performs a raycast, then the results can be queried from the object after creation.
| world | pointer to the OgreNewt::World |
| col | pointer to a convex collision shape used for the cast |
| startpt | starting point of ray in global space |
| colori | orientation of the collision in global space |
| endpt | ending point of ray in global space |
| maxcontactscount | maximum number of contacts that should be saved |
| threadIndex | Thread index |
| ignoreBody | Body to ignore in filter, use if you're casting from inside other body and need to ignore it |
Definition at line 106 of file OgreNewt_ConvexCast.cpp.
| OgreNewt::BasicConvexcast::~BasicConvexcast | ( | ) |
destuctor.
Definition at line 113 of file OgreNewt_ConvexCast.cpp.
| int OgreNewt::BasicConvexcast::calculateBodyHitCount | ( | ) | const |
how many bodies did we hit? if maxcontactscount is to small, this value will be smaller too!
Definition at line 127 of file OgreNewt_ConvexCast.cpp.
| int OgreNewt::BasicConvexcast::getContactsCount | ( | ) | const |
how many contacts do we have
Definition at line 145 of file OgreNewt_ConvexCast.cpp.
| Ogre::Real OgreNewt::BasicConvexcast::getDistanceToFirstHit | ( | ) | const |
retrieve the distance to the first contact (in range [0,1] from startpt to endpt)
Definition at line 173 of file OgreNewt_ConvexCast.cpp.
|
inline |
return body ignored in filter
Definition at line 131 of file OgreNewt_ConvexCast.h.
| BasicConvexcast::ConvexcastContactInfo OgreNewt::BasicConvexcast::getInfoAt | ( | int | hitnum | ) | const |
retrieve the raycast info for a specific hit.
Definition at line 150 of file OgreNewt_ConvexCast.cpp.
|
inline |
sets body to ignore in filter
Definition at line 128 of file OgreNewt_ConvexCast.h.
|
virtual |
prefilter filter, ignores body set in constructor or always returns true if it's not set
Reimplemented from OgreNewt::Convexcast.
Definition at line 115 of file OgreNewt_ConvexCast.cpp.
|
protected |
Body to ignore in filter.
Definition at line 150 of file OgreNewt_ConvexCast.h.