PeriDyno 1.0.0
Loading...
Searching...
No Matches
DragVertexInteraction.h
Go to the documentation of this file.
1#pragma once
4#include "Topology/TriangleSet.h"
6
16
17namespace dyno
18{
19 template<typename TDataType>
21 {
23 public:
24 typedef typename TDataType::Real Real;
25 typedef typename TDataType::Coord Coord;
26 typedef typename TopologyModule::Edge Edge;
28
31
38
39 DEF_INSTANCE_IN(TriangleSet<TDataType>, InitialTriangleSet, "");
40
41 DEF_ARRAY_IN(Attribute, Attribute, DeviceType::GPU, "Particle attribute");
42
43 DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "");
44
45 DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "");
46
47 DEF_VAR(Real, InterationRadius, 0.03, "The radius of interaction");
48
49 DEF_VAR_IN(Real, TimeStep, "Time step");
50
51
52 protected:
53
54 void onEvent(PMouseEvent event) override;
55 private:
56 std::shared_ptr<Camera> camera;
64 bool needInit = true;
65 DArray<int> verIntersectedIndex; //reference for all vertex, int: 0,1
66 DArray<int> intersected_vertex; // reference for intersected list, int: vId
68 DArray<Coord> intersectionCenter; //current pos of intersected vertex[intersectionCenterIndex]
69 };
70
72}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
particle attribute 0x00000000: [31-30]material; [29]motion; [28]Dynamic; [27-8]undefined yet,...
Definition Attribute.h:26
TopologyModule::Triangle Triangle
std::shared_ptr< Camera > camera
DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "")
DEF_INSTANCE_IN(TriangleSet< TDataType >, InitialTriangleSet, "")
DEF_VAR(Real, InterationRadius, 0.03, "The radius of interaction")
DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "")
void onEvent(PMouseEvent event) override
DEF_VAR_IN(Real, TimeStep, "Time step")
DEF_ARRAY_IN(Attribute, Attribute, DeviceType::GPU, "Particle attribute")
VectorND< PointType, 2 > Edge
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