Macros
OPC_RayCollider.cpp File Reference
#include "Stdafx.h"
#include "OPC_RayAABBOverlap.h"
#include "OPC_RayTriOverlap.h"
Include dependency graph for OPC_RayCollider.cpp:

Go to the source code of this file.

Macros

#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
 

Detailed Description

Contains code for a ray collider.

Author
Pierre Terdiman
Date
June, 2, 2001

Definition in file OPC_RayCollider.cpp.

Macro Definition Documentation

#define HANDLE_CONTACT (   prim_index,
  flag 
)
Value:
SET_CONTACT(prim_index, flag) \
\
if(mHitCallback) (mHitCallback)(mStabbedFace, mUserData);
#define SET_CONTACT(prim_index, flag)
png_infop png_uint_32 flag
Definition: png.h:2159

Definition at line 131 of file OPC_RayCollider.cpp.

#define RAY_PRIM (   prim_index,
  flag 
)
Value:
/* 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) \
}
#define HANDLE_CONTACT(prim_index, flag)
png_infop png_uint_32 flag
Definition: png.h:2159

Definition at line 189 of file OPC_RayCollider.cpp.

#define SEGMENT_PRIM (   prim_index,
  flag 
)
Value:
/* 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) \
} \
}
#define IR(x)
Integer representation of a floating-point value.
Definition: IceFPU.h:18
#define HANDLE_CONTACT(prim_index, flag)
png_infop png_uint_32 flag
Definition: png.h:2159

Definition at line 174 of file OPC_RayCollider.cpp.

#define SET_CONTACT (   prim_index,
  flag 
)
Value:
mNbIntersections++; \
/* Set contact status */ \
mFlags |= flag; \
/* In any case the contact has been found and recorded in mStabbedFace */ \
mStabbedFace.mFaceID = prim_index;
png_infop png_uint_32 flag
Definition: png.h:2159

Definition at line 122 of file OPC_RayCollider.cpp.

#define UPDATE_CACHE
Value:
if(cache && GetContactStatus()) \
{ \
*cache = mStabbedFace.mFaceID; \
}

Definition at line 136 of file OPC_RayCollider.cpp.



openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat Apr 13 2019 02:14:27