PeriDyno 1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
NeighborTriangleQuery.h
Go to the documentation of this file.
1
16#pragma once
18
19#include "Topology/TriangleSet.h"
20
22
23namespace dyno
24{
25 template<typename TDataType> class CollisionDetectionBroadPhase;
26
27 template<typename TDataType>
29 {
31 public:
32 typedef typename TDataType::Real Real;
33 typedef typename TDataType::Coord Coord;
35 typedef typename ::dyno::TAlignedBox3D<Real> AABB;
36
39
40 public:
41 DECLARE_ENUM(Spatial,
42 BVH = 0,
43 OCTREE = 1);
44
45 DEF_ENUM(Spatial, Spatial, Spatial::BVH, "");
46
51 DEF_VAR_IN(Real, Radius, "Search radius");
52
56 DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "A set of points whose neighbors will be required for");
57
61 DEF_INSTANCE_IN(TriangleSet<TDataType>, TriangleSet, "A set of triangles to be required from");
62
66 DEF_ARRAYLIST_OUT(int, NeighborIds, DeviceType::GPU, "Return neighbor ids");
67
68 protected:
69 void compute() override;
70
71 private:
74
76
77 std::shared_ptr<CollisionDetectionBroadPhase<TDataType>> mBroadPhaseCD;
78 };
79}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
DEF_VAR_IN(Real, Radius, "Search radius")
Search radius A positive value representing the radius of neighborhood for each point.
TopologyModule::Triangle Triangle
DEF_ENUM(Spatial, Spatial, Spatial::BVH, "")
DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "A set of points whose neighbors will be required for")
A set of points to be required from.
::dyno::TAlignedBox3D< Real > AABB
DEF_ARRAYLIST_OUT(int, NeighborIds, DeviceType::GPU, "Return neighbor ids")
Ids of neighboring particles.
DECLARE_ENUM(Spatial, BVH=0, OCTREE=1)
std::shared_ptr< CollisionDetectionBroadPhase< TDataType > > mBroadPhaseCD
DEF_INSTANCE_IN(TriangleSet< TDataType >, TriangleSet, "A set of triangles to be required from")
A set of points to be required from.
Vector< PointType, 3 > Triangle
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
Array< T, DeviceType::GPU > DArray
Definition Array.inl:89