OPC_VolumeCollider.cpp
Go to the documentation of this file.
1 /*
3  * OPCODE - Optimized Collision Detection
4  * Copyright (C) 2001 Pierre Terdiman
5  * Homepage: http://www.codercorner.com/Opcode.htm
6  */
8 
10 
16 
19 
27 
30 // Precompiled Header
31 #include "Stdafx.h"
32 
33 using namespace Opcode;
34 
36 
41  mTouchedPrimitives (null),
42  mNbVolumeBVTests (0),
43  mNbVolumePrimTests (0)
44 {
45 }
46 
48 
53 {
55 }
56 
58 
64 {
65  return null;
66 }
67 
68 // Pretty dumb way to dump - to do better - one day...
69 
70 #define IMPLEMENT_NOLEAFDUMP(type) \
71 void VolumeCollider::_Dump(const type* node) \
72 { \
73  if(node->HasPosLeaf()) mTouchedPrimitives->Add(node->GetPosPrimitive()); \
74  else _Dump(node->GetPos()); \
75  \
76  if(ContactFound()) return; \
77  \
78  if(node->HasNegLeaf()) mTouchedPrimitives->Add(node->GetNegPrimitive()); \
79  else _Dump(node->GetNeg()); \
80 }
81 
82 #define IMPLEMENT_LEAFDUMP(type) \
83 void VolumeCollider::_Dump(const type* node) \
84 { \
85  if(node->IsLeaf()) \
86  { \
87  mTouchedPrimitives->Add(node->GetPrimitive()); \
88  } \
89  else \
90  { \
91  _Dump(node->GetPos()); \
92  \
93  if(ContactFound()) return; \
94  \
95  _Dump(node->GetNeg()); \
96  } \
97 }
98 
101 
#define null
our own NULL pointer
Definition: IceTypes.h:57
#define IMPLEMENT_LEAFDUMP(type)
virtual ~VolumeCollider()=0
virtual const char * ValidateSettings()=0
#define IMPLEMENT_NOLEAFDUMP(type)
Container * mTouchedPrimitives
List of touched primitives.
Definition: Opcode.h:94


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:40