PeriDyno 1.0.0
Loading...
Searching...
No Matches
CollisionDetectionBroadPhase.h
Go to the documentation of this file.
1#pragma once
3
6
8
9namespace dyno
10{
11 typedef typename ::dyno::TAlignedBox3D<Real> AABB;
12 typedef unsigned long long int PKey;
13
14 template<typename TDataType>
16 {
18 public:
19 typedef typename TDataType::Real Real;
20 typedef typename TDataType::Coord Coord;
21 typedef typename TDataType::Matrix Matrix;
22
25
26 public:
27 DECLARE_ENUM(EStructure,
28 BVH = 0,
29 Octree = 1);
30
31 DEF_ENUM(EStructure, AccelerationStructure, EStructure::BVH, "Acceleration structure");
32
33 DEF_VAR(Real, GridSizeLimit, 0.005, "Limit the smallest grid size");
34
35 DEF_VAR(bool, SelfCollision, false, "");
36
37 DEF_ARRAY_IN(AABB, Source, DeviceType::GPU, "");
38
39 DEF_ARRAY_IN(AABB, Target, DeviceType::GPU, "");
40
41 DEF_ARRAYLIST_OUT(int, ContactList, DeviceType::GPU, "Contact pairs");
42
43 protected:
44 void compute() override;
45
46 private:
49
50 private:
53
55
58
61
64
66 };
67
69}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
DEF_ARRAY_IN(AABB, Source, DeviceType::GPU, "")
DEF_VAR(Real, GridSizeLimit, 0.005, "Limit the smallest grid size")
DEF_ARRAY_IN(AABB, Target, DeviceType::GPU, "")
DEF_ENUM(EStructure, AccelerationStructure, EStructure::BVH, "Acceleration structure")
DECLARE_ENUM(EStructure, BVH=0, Octree=1)
DEF_ARRAYLIST_OUT(int, ContactList, DeviceType::GPU, "Contact pairs")
DEF_VAR(bool, SelfCollision, false, "")
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
Array< T, DeviceType::GPU > DArray
Definition Array.inl:89
::dyno::TAlignedBox3D< Real > AABB
unsigned long long int PKey