PeriDyno 1.0.0
Loading...
Searching...
No Matches
PointPickerNode.h
Go to the documentation of this file.
1#pragma once
2#include "Node.h"
3#include "Topology/TriangleSet.h"
5
9
10namespace dyno
11{
12 template<typename TDataType>
13 class PointPickerNode : public Node
14 {
16 public:
17 typedef typename TDataType::Real Real;
18 typedef typename TDataType::Coord Coord;
19
21
22 DEF_ARRAY_STATE(int, PointIndex, DeviceType::GPU, "");
23
24 DECLARE_ENUM(PickingTypeSelection,
25 Click = 0,
26 Drag = 1,
27 Both = 2
28 );
29
30 DEF_ENUM(PickingTypeSelection, PickingType, PickingTypeSelection::Both, "");
31
32 DECLARE_ENUM(MultiSelectionType,
33 OR = 0,
34 XOR = 1,
35 C = 2
36 );
37
38 DEF_ENUM(MultiSelectionType, MultiSelectionType, MultiSelectionType::OR, "");
39
40 DEF_VAR(Real, InteractionRadius, 0.002f, "The radius of interaction");
41 DEF_VAR(Real, PointSelectedSize, 0.012f, "");
42 DEF_VAR(Real, PointOtherSize, 0.01f, "");
43 DEF_VAR(bool, ToggleIndexOutput, true, "The toggle of index output");
44
46 ~PointPickerNode() override;
47
48 std::string getNodeType();
49
50 void resetStates() override;
51
52 void changePickingType();
54
55 private:
56 std::shared_ptr<PointInteraction<TDataType>> pointInteractor;
57 };
58}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
DEF_ARRAY_STATE(int, PointIndex, DeviceType::GPU, "")
std::shared_ptr< PointInteraction< TDataType > > pointInteractor
DECLARE_ENUM(MultiSelectionType, OR=0, XOR=1, C=2)
void resetStates() override
DECLARE_ENUM(PickingTypeSelection, Click=0, Drag=1, Both=2)
DEF_VAR(Real, PointOtherSize, 0.01f, "")
DEF_INSTANCE_IN(PointSet< TDataType >, Topology, "")
DEF_ENUM(PickingTypeSelection, PickingType, PickingTypeSelection::Both, "")
TDataType::Coord Coord
DEF_ENUM(MultiSelectionType, MultiSelectionType, MultiSelectionType::OR, "")
DEF_VAR(Real, InteractionRadius, 0.002f, "The radius of interaction")
DEF_VAR(Real, PointSelectedSize, 0.012f, "")
DEF_VAR(bool, ToggleIndexOutput, true, "The toggle of index output")
A PointSet stores the coordinates for a set of independent points.
Definition PointSet.h:8
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25