SO3Engine
|
general raycast More...
#include <OgreNewt_RayCast.h>
Public Member Functions | |
Raycast () | |
constructor | |
virtual | ~Raycast () |
destuctor. | |
void | go (const OgreNewt::World *world, const Ogre::Vector3 &startpt, const Ogre::Vector3 &endpt) |
performs the raycast. | |
virtual bool | userPreFilterCallback (OgreNewt::Body *body) |
user callback pre-filter function. | |
virtual bool | userCallback (OgreNewt::Body *body, Ogre::Real distance, const Ogre::Vector3 &normal, dLong collisionID)=0 |
user callback filter function | |
Protected Attributes | |
OgreNewt::Body * | m_treecollisioncallback_lastbody |
save the last OgreNewt::Body from the newtonRaycastPreFilter to use this for example the TreeCollisionRayCallback | |
bool | m_treecollisioncallback_bodyalreadyadded |
save if this body was already added by RayCastCallback from TreeCollision | |
Friends | |
dFloat | CollisionPrimitives::TreeCollision::newtonRayCastCallback (const NewtonBody *const body, const NewtonCollision *const treeCollision, dFloat distance, dFloat *normal, int faceId, void *userData) |
Detailed Description
general raycast
General class representing a raycast query in the Newton world. this class should be inherited to create specific raycast behavior.
Definition at line 29 of file OgreNewt_RayCast.h.
Constructor & Destructor Documentation
◆ Raycast()
OgreNewt::Raycast::Raycast | ( | ) |
constructor
Definition at line 12 of file OgreNewt_RayCast.cpp.
◆ ~Raycast()
|
virtual |
destuctor.
Definition at line 13 of file OgreNewt_RayCast.cpp.
Member Function Documentation
◆ go()
void OgreNewt::Raycast::go | ( | const OgreNewt::World * | world, |
const Ogre::Vector3 & | startpt, | ||
const Ogre::Vector3 & | endpt | ||
) |
performs the raycast.
call after creating the object.
- Parameters
-
world pointer to the OgreNewt::World startpt starting point of ray in global space endpt ending point of ray in global space
Definition at line 16 of file OgreNewt_RayCast.cpp.
◆ userCallback()
|
pure virtual |
user callback filter function
user callback function.
This function must be implemented by the user. Newton calls this function for each body intersected by the ray. however it doesn't necessarily go perfect cloest-to-farthest order. return true and the callback will only be called for bodies closer to the start point than the current body. return false and the callback will call for any other bodies, even those farther than the current one.
Implemented in OgreNewt::BasicRaycast.
◆ userPreFilterCallback()
|
inlinevirtual |
user callback pre-filter function.
This function is an optional pre-filter to completely ignore specific bodies during the raycast. return false from this function to ignore this body, return true (default) to accept it.
Definition at line 54 of file OgreNewt_RayCast.h.
Friends And Related Symbol Documentation
◆ CollisionPrimitives::TreeCollision::newtonRayCastCallback
|
friend |
Member Data Documentation
◆ m_treecollisioncallback_bodyalreadyadded
|
protected |
save if this body was already added by RayCastCallback from TreeCollision
Definition at line 74 of file OgreNewt_RayCast.h.
◆ m_treecollisioncallback_lastbody
|
protected |
save the last OgreNewt::Body from the newtonRaycastPreFilter to use this for example the TreeCollisionRayCallback
Definition at line 71 of file OgreNewt_RayCast.h.
The documentation for this class was generated from the following files:
- include/External/ogrenewt/OgreNewt_RayCast.h
- src/External/ogrenewt/OgreNewt_RayCast.cpp
Generated by 1.9.8