SO3Engine
|
Basic implementation of the raycast. More...
#include <OgreNewt_RayCast.h>
Classes | |
class | BasicRaycastInfo |
simple class that represents a single raycast rigid body intersection. More... | |
Public Member Functions | |
BasicRaycast () | |
empty constructor | |
BasicRaycast (const OgreNewt::World *world, const Ogre::Vector3 &startpt, const Ogre::Vector3 &endpt, bool sorted) | |
constructor | |
void | go (const OgreNewt::World *world, const Ogre::Vector3 &startpt, const Ogre::Vector3 &endpt, bool sorted) |
perform a raycast | |
~BasicRaycast () | |
destuctor. | |
bool | userCallback (Body *body, Ogre::Real distance, const Ogre::Vector3 &normal, dLong collisionID) |
the all-important custom callback function. | |
int | getHitCount () const |
how many bodies did we hit? | |
BasicRaycastInfo | getInfoAt (unsigned int hitnum) const |
retrieve the raycast info for a specific hit. | |
BasicRaycastInfo | getFirstHit () const |
get the closest body hit by the ray. | |
Public Member Functions inherited from OgreNewt::Raycast | |
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. | |
Additional Inherited Members | |
Protected Attributes inherited from OgreNewt::Raycast | |
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 | |
Detailed Description
Basic implementation of the raycast.
This class is provided for general raycast use. it returns information about all bodies hit by the ray.
Definition at line 92 of file OgreNewt_RayCast.h.
Constructor & Destructor Documentation
◆ BasicRaycast() [1/2]
OgreNewt::BasicRaycast::BasicRaycast | ( | ) |
empty constructor
Definition at line 98 of file OgreNewt_RayCast.cpp.
◆ BasicRaycast() [2/2]
OgreNewt::BasicRaycast::BasicRaycast | ( | const OgreNewt::World * | world, |
const Ogre::Vector3 & | startpt, | ||
const Ogre::Vector3 & | endpt, | ||
bool | sorted | ||
) |
constructor
performs a raycast, then the results can be queried from the object after creation.
- Parameters
-
world pointer to the OgreNewt::World startpt starting point of the ray in global space endpt ending point of the ray in global space sorted sort the results by distance
Definition at line 101 of file OgreNewt_RayCast.cpp.
◆ ~BasicRaycast()
OgreNewt::BasicRaycast::~BasicRaycast | ( | ) |
destuctor.
Definition at line 120 of file OgreNewt_RayCast.cpp.
Member Function Documentation
◆ getFirstHit()
BasicRaycast::BasicRaycastInfo OgreNewt::BasicRaycast::getFirstHit | ( | ) | const |
get the closest body hit by the ray.
Definition at line 126 of file OgreNewt_RayCast.cpp.
◆ getHitCount()
int OgreNewt::BasicRaycast::getHitCount | ( | ) | const |
how many bodies did we hit?
Definition at line 123 of file OgreNewt_RayCast.cpp.
◆ getInfoAt()
BasicRaycast::BasicRaycastInfo OgreNewt::BasicRaycast::getInfoAt | ( | unsigned int | hitnum | ) | const |
retrieve the raycast info for a specific hit.
Definition at line 148 of file OgreNewt_RayCast.cpp.
◆ go()
void OgreNewt::BasicRaycast::go | ( | const OgreNewt::World * | world, |
const Ogre::Vector3 & | startpt, | ||
const Ogre::Vector3 & | endpt, | ||
bool | sorted | ||
) |
perform a raycast
performs a raycast, then the results can be queried from the object after creation.
- Parameters
-
world pointer to the OgreNewt::World startpt starting point of the ray in global space endpt ending point of the ray in global space sorted sort the results by distance
Definition at line 108 of file OgreNewt_RayCast.cpp.
◆ userCallback()
|
virtual |
the all-important custom callback function.
Implements OgreNewt::Raycast.
Definition at line 162 of file OgreNewt_RayCast.cpp.
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