PeriDyno 1.0.0
Loading...
Searching...
No Matches
NeighborElementQuery.h
Go to the documentation of this file.
1#pragma once
2#include "CollisionData.h"
3#include "Attribute.h"
4
6
7#include "Topology/DiscreteElements.h"
8
9namespace dyno {
10 template<typename TDataType> class CollisionDetectionBroadPhase;
16 template<typename TDataType>
18 {
20
21 public:
22 typedef typename TDataType::Real Real;
23 typedef typename TDataType::Coord Coord;
24 typedef typename ::dyno::TAlignedBox3D<Real> AABB;
25 typedef typename ::dyno::TOrientedBox3D<Real> Box3D;
26
29
30 public:
31 DEF_VAR(bool, SelfCollision, true, "");
32
33 DEF_VAR(Real, DHead, 0.0f, "D head");
34
38 DEF_VAR(Real, GridSizeLimit, Real(0.01), "Indicate the size of the smallest element");
39
41
43
44 DEF_ARRAY_IN(Attribute, Attribute, DeviceType::GPU, "");
45
46 DEF_ARRAY_OUT(TContactPair<Real>, Contacts, DeviceType::GPU, "");
47
48 protected:
49 void compute() override;
50
51 private:
54
57
58 std::shared_ptr<CollisionDetectionBroadPhase<TDataType>> mBroadPhaseCD;
59 std::shared_ptr<DiscreteElements<TDataType>> mDiscreteElements;
60 };
61}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
particle attribute 0x00000000: [31-30]material; [29]motion; [28]Dynamic; [27-8]undefined yet,...
Definition Attribute.h:26
DEF_VAR(Real, DHead, 0.0f, "D head")
DEF_ARRAY_OUT(TContactPair< Real >, Contacts, DeviceType::GPU, "")
DEF_INSTANCE_IN(DiscreteElements< TDataType >, DiscreteElements, "")
DEF_ARRAY_IN(CollisionMask, CollisionMask, DeviceType::GPU, "")
std::shared_ptr< CollisionDetectionBroadPhase< TDataType > > mBroadPhaseCD
std::shared_ptr< DiscreteElements< TDataType > > mDiscreteElements
DEF_ARRAY_IN(Attribute, Attribute, DeviceType::GPU, "")
DEF_VAR(bool, SelfCollision, true, "")
::dyno::TAlignedBox3D< Real > AABB
::dyno::TOrientedBox3D< Real > Box3D
DEF_VAR(Real, GridSizeLimit, Real(0.01), "Indicate the size of the smallest element")
A positive value indicating the size of the smallest element, its value will also influence the level...
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
Array< T, DeviceType::GPU > DArray
Definition Array.inl:89