Defines
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.

Defines

#define SET_CONTACT(prim_index, flag)
#define SPHERE_PRIM(prim_index, flag)
 Sphere-triangle overlap test.
#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.


Define Documentation

#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.

#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.

#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.



openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Apr 11 2019 03:30:20