PeriDyno 1.0.0
Loading...
Searching...
No Matches
EdgePickerNode.h
Go to the documentation of this file.
1#pragma once
2#include "Node.h"
3#include "Topology/TriangleSet.h"
8
9namespace dyno
10{
11 template<typename TDataType>
12 class EdgePickerNode : public Node
13 {
15 public:
16 typedef typename TDataType::Real Real;
17 typedef typename TDataType::Coord Coord;
18
20
21 DEF_ARRAY_STATE(int, EdgeIndex, DeviceType::GPU, "");
22 DEF_ARRAY_STATE(int, PointIndex, DeviceType::GPU, "");
23
24 DECLARE_ENUM(PickingElementTypeSelection,
25 Edge = 0,
26 Point = 1,
27 All = 2
28 );
29
30 DEF_ENUM(PickingElementTypeSelection, PickingElementType, PickingElementTypeSelection::All, "");
31
32 DECLARE_ENUM(PickingTypeSelection,
33 Click = 0,
34 Drag = 1,
35 Both = 2
36 );
37
38 DEF_ENUM(PickingTypeSelection, PickingType, PickingTypeSelection::Both, "");
39
40 DECLARE_ENUM(MultiSelectionType,
41 OR = 0,
42 XOR = 1,
43 C = 2
44 );
45
46 DEF_ENUM(MultiSelectionType, MultiSelectionType, MultiSelectionType::OR, "");
47
48 DEF_VAR(Real, InteractionRadius, 0.002f, "The radius of interaction");
49
50 DEF_VAR(Real, PointSelectedSize, 0.006f, "");
51 DEF_VAR(Real, PointOtherSize, 0.005f, "");
52
53 DEF_VAR(Real, EdgeSelectedSize, 0.002f, "");
54 DEF_VAR(Real, EdgeOtherSize, 0.0015, "");
55
56 DEF_VAR(bool, ToggleIndexOutput, true, "The toggle of index output");
57
59 ~EdgePickerNode() override;
60
61 std::string getNodeType();
62
63 void resetStates() override;
64
66 void changePickingType();
68
69 private:
70 std::shared_ptr<EdgeInteraction<TDataType>> edgeInteractor;
71 std::shared_ptr<PointInteraction<TDataType>> pointInteractor;
72 };
73}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
DEF_ARRAY_STATE(int, EdgeIndex, DeviceType::GPU, "")
DEF_ENUM(MultiSelectionType, MultiSelectionType, MultiSelectionType::OR, "")
DECLARE_ENUM(MultiSelectionType, OR=0, XOR=1, C=2)
DEF_VAR(bool, ToggleIndexOutput, true, "The toggle of index output")
DEF_VAR(Real, PointOtherSize, 0.005f, "")
std::shared_ptr< PointInteraction< TDataType > > pointInteractor
DEF_VAR(Real, EdgeOtherSize, 0.0015, "")
DEF_VAR(Real, InteractionRadius, 0.002f, "The radius of interaction")
void resetStates() override
DECLARE_ENUM(PickingElementTypeSelection, Edge=0, Point=1, All=2)
DEF_ENUM(PickingElementTypeSelection, PickingElementType, PickingElementTypeSelection::All, "")
DEF_VAR(Real, PointSelectedSize, 0.006f, "")
DEF_ENUM(PickingTypeSelection, PickingType, PickingTypeSelection::Both, "")
DEF_INSTANCE_IN(EdgeSet< TDataType >, Topology, "")
std::shared_ptr< EdgeInteraction< TDataType > > edgeInteractor
TDataType::Coord Coord
std::string getNodeType()
TDataType::Real Real
DEF_ARRAY_STATE(int, PointIndex, DeviceType::GPU, "")
DECLARE_ENUM(PickingTypeSelection, Click=0, Drag=1, Both=2)
DEF_VAR(Real, EdgeSelectedSize, 0.002f, "")
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
@ Point
Definition VehicleInfo.h:37