
Go to the source code of this file.
Defines | |
| #define | HANDLE_CONTACT(prim_index, flag) |
| #define | RAY_PRIM(prim_index, flag) |
| #define | SEGMENT_PRIM(prim_index, flag) |
| #define | SET_CONTACT(prim_index, flag) |
| #define | UPDATE_CACHE |
| #define HANDLE_CONTACT | ( | prim_index, | |
| flag | |||
| ) |
SET_CONTACT(prim_index, flag) \ \ if(mHitCallback) (mHitCallback)(mStabbedFace, mUserData);
Definition at line 131 of file OPC_RayCollider.cpp.
/* Request vertices from the app */ \ VertexPointers VP; mIMesh->GetTriangle(VP, prim_index); \ \ /* Perform ray-tri overlap test and return */ \ if(RayTriOverlap(*VP.Vertex[0], *VP.Vertex[1], *VP.Vertex[2])) \ { \ HANDLE_CONTACT(prim_index, flag) \ }
Definition at line 189 of file OPC_RayCollider.cpp.
| #define SEGMENT_PRIM | ( | prim_index, | |
| flag | |||
| ) |
/* Request vertices from the app */ \ VertexPointers VP; mIMesh->GetTriangle(VP, prim_index); \ \ /* Perform ray-tri overlap test and return */ \ if(RayTriOverlap(*VP.Vertex[0], *VP.Vertex[1], *VP.Vertex[2])) \ { \ /* Intersection point is valid if dist < segment's length */ \ /* We know dist>0 so we can use integers */ \ if(IR(mStabbedFace.mDistance)<IR(mMaxDist)) \ { \ HANDLE_CONTACT(prim_index, flag) \ } \ }
Definition at line 174 of file OPC_RayCollider.cpp.
| #define SET_CONTACT | ( | prim_index, | |
| flag | |||
| ) |
mNbIntersections++; \
/* Set contact status */ \
mFlags |= flag; \
/* In any case the contact has been found and recorded in mStabbedFace */ \
mStabbedFace.mFaceID = prim_index;
Definition at line 122 of file OPC_RayCollider.cpp.
| #define UPDATE_CACHE |
if(cache && GetContactStatus()) \
{ \
*cache = mStabbedFace.mFaceID; \
}
Definition at line 136 of file OPC_RayCollider.cpp.