20 #ifndef __OPC_RAYCOLLIDER_H__ 21 #define __OPC_RAYCOLLIDER_H__ 52 #ifdef OPC_RAYHIT_CALLBACK 89 #ifndef OPC_RAYHIT_CALLBACK 109 inline_ void SetCulling(
bool flag) { mCulling =
flag; }
123 #ifdef OPC_RAYHIT_CALLBACK 125 inline_ void SetUserData(
void* user_data) { mUserData = user_data; }
146 inline_ udword GetNbRayBVTests()
const {
return mNbRayBVTests; }
156 inline_ udword GetNbRayPrimTests()
const {
return mNbRayPrimTests; }
167 inline_ udword GetNbIntersections()
const {
return mNbIntersections; }
186 #ifdef OPC_RAYHIT_CALLBACK 202 #ifndef OPC_RAYHIT_CALLBACK 225 #endif // __OPC_RAYCOLLIDER_H__
inline_ const CollisionFace * GetFaces() const
inline_ void AddFace(const CollisionFace &face)
udword mNbRayPrimTests
Number of Ray-Primitive tests.
#define null
our own NULL pointer
udword mFaceID
Index of touched face.
CollisionFaces()
Constructor.
Point mDir
Ray direction (normalized)
virtual inline_ void InitQuery()
int BOOL
Another boolean type.
float mMaxDist
Valid segment on the ray.
unsigned int udword
sizeof(udword) must be 4
virtual const char * ValidateSettings()=0
inline_ udword GetNbFaces() const
float mV
Impact barycentric coordinates.
inline_ Container & Add(udword entry)
typedef void(PNGAPI *png_error_ptr) PNGARG((png_structp
~CollisionFaces()
Destructor.
#define MAX_FLOAT
max possible float value
bool mCulling
Stab culled faces or not.
udword mNbIntersections
Number of valid intersections.
bool mClosestHit
Report closest hit only.
inline_ CollisionFace()
Constructor.
float mDistance
Distance from collider to hitpoint.
void(* HitCallback)(const CollisionFace &hit, void *user_data)
CollisionFaces * mStabbedFaces
List of stabbed faces.
inline_ ~CollisionFace()
Destructor.
inline_ udword GetNbEntries() const
Returns the current number of entries.
inline_ udword * GetEntries() const
Returns the list of entries.
CollisionFace mStabbedFace
Current stabbed face.
png_infop png_uint_32 flag
udword mNbRayBVTests
Number of Ray-BV tests.