PeriDyno 1.0.0
Loading...
Searching...
No Matches
EdgeInteraction.h
Go to the documentation of this file.
1#pragma once
4#include "Topology/TriangleSet.h"
5
6namespace dyno
7{
8 template<typename TDataType>
10 {
12 public:
13 typedef typename TDataType::Real Real;
14 typedef typename TDataType::Coord Coord;
15 typedef typename TopologyModule::Edge Edge;
17
19 virtual ~EdgeInteraction() {};
20
25
26 void mergeIndex();
27
31
32 DEF_INSTANCE_IN(EdgeSet<TDataType>, InitialEdgeSet, "");
33 DEF_INSTANCE_OUT(EdgeSet<TDataType>, SelectedEdgeSet, "");
35 DEF_ARRAY_OUT(int, EdgeIndex, DeviceType::GPU, "");
36
37 DECLARE_ENUM(PickingTypeSelection,
38 Click = 0,
39 Drag = 1,
40 Both = 2
41 );
42
43 DEF_ENUM(PickingTypeSelection, EdgePickingType, PickingTypeSelection::Both, "");
44
45 DECLARE_ENUM(MultiSelectionType,
46 OR = 0,
47 XOR = 1,
48 C = 2
49 );
50
51 DEF_ENUM(MultiSelectionType, MultiSelectionType, MultiSelectionType::OR, "");
52
53 DEF_VAR(Real, InteractionRadius, 0.01, "The radius of interaction");
54
55 DEF_VAR(bool, TogglePicker, true, "The toggle of picker");
56
57 DEF_VAR(bool, ToggleMultiSelect, false, "The toggle of multiple selection");
58
59 DEF_VAR(bool, ToggleIndexOutput, true, "The toggle of index output");
60
61 protected:
62 void onEvent(PMouseEvent event) override;
63 private:
64 std::shared_ptr<Camera> camera;
69
71
73 };
74
76}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
DEF_VAR(bool, ToggleMultiSelect, false, "The toggle of multiple selection")
DEF_INSTANCE_IN(EdgeSet< TDataType >, InitialEdgeSet, "")
TopologyModule::Edge Edge
DArray< int > tempEdgeIntersectedIndex
DEF_VAR(Real, InteractionRadius, 0.01, "The radius of interaction")
DECLARE_ENUM(MultiSelectionType, OR=0, XOR=1, C=2)
void onEvent(PMouseEvent event) override
DEF_INSTANCE_OUT(EdgeSet< TDataType >, OtherEdgeSet, "")
DEF_VAR(bool, ToggleIndexOutput, true, "The toggle of index output")
DEF_INSTANCE_OUT(EdgeSet< TDataType >, SelectedEdgeSet, "")
DEF_ARRAY_OUT(int, EdgeIndex, DeviceType::GPU, "")
DArray< int > edgeIntersectedIndex
std::shared_ptr< Camera > camera
TDataType::Coord Coord
TopologyModule::Triangle Triangle
DECLARE_ENUM(PickingTypeSelection, Click=0, Drag=1, Both=2)
DEF_ENUM(PickingTypeSelection, EdgePickingType, PickingTypeSelection::Both, "")
DEF_VAR(bool, TogglePicker, true, "The toggle of picker")
DEF_ENUM(MultiSelectionType, MultiSelectionType, MultiSelectionType::OR, "")
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