Macros
OPC_SphereCollider.cpp File Reference
#include "Stdafx.h"
#include "OPC_SphereAABBOverlap.h"
#include "OPC_SphereTriOverlap.h"
Include dependency graph for OPC_SphereCollider.cpp:

Go to the source code of this file.

Macros

#define SET_CONTACT(prim_index, flag)
 
#define SPHERE_PRIM(prim_index, flag)
 Sphere-triangle overlap test. More...
 
#define TEST_BOX_IN_SPHERE(center, extents)
 

Detailed Description

Contains code for a sphere collider.

Author
Pierre Terdiman
Date
June, 2, 2001

Definition in file OPC_SphereCollider.cpp.

Macro Definition Documentation

◆ SET_CONTACT

#define SET_CONTACT (   prim_index,
  flag 
)
Value:
/* Set contact status */ \
mFlags |= flag; \
mTouchedPrimitives->Add(prim_index);

Definition at line 42 of file OPC_SphereCollider.cpp.

◆ SPHERE_PRIM

#define SPHERE_PRIM (   prim_index,
  flag 
)
Value:
/* Request vertices from the app */ \
VertexPointers VP; mIMesh->GetTriangle(VP, prim_index); \
\
/* Perform sphere-tri overlap test */ \
if(SphereTriOverlap(*VP.Vertex[0], *VP.Vertex[1], *VP.Vertex[2])) \
{ \
SET_CONTACT(prim_index, flag) \
}

Sphere-triangle overlap test.

Definition at line 48 of file OPC_SphereCollider.cpp.

◆ TEST_BOX_IN_SPHERE

#define TEST_BOX_IN_SPHERE (   center,
  extents 
)
Value:
if(SphereContainsBox(center, extents)) \
{ \
/* Set contact status */ \
mFlags |= OPC_CONTACT; \
_Dump(node); \
return; \
}

Definition at line 328 of file OPC_SphereCollider.cpp.

OPC_CONTACT
@ OPC_CONTACT
Final contact status after a collision query.
Definition: OPC_Collider.h:27
flag
png_infop png_uint_32 flag
Definition: png.h:2156


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:05