PeriDyno 1.0.0
Loading...
Searching...
No Matches
SurfaceInteraction.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 ~SurfaceInteraction() {};
20
25
26 void mergeIndex();
27
31
32 DEF_INSTANCE_IN(TriangleSet<TDataType>, InitialTriangleSet, "");
33 DEF_INSTANCE_OUT(TriangleSet<TDataType>, SelectedTriangleSet, "");
35 DEF_ARRAY_OUT(int, TriangleIndex, DeviceType::GPU, "");
36 DEF_ARRAY_OUT(int, Sur2PointIndex, DeviceType::GPU, "");
37
38 DECLARE_ENUM(PickingTypeSelection,
39 Click = 0,
40 Drag = 1,
41 Both = 2
42 );
43
44 DEF_ENUM(PickingTypeSelection, SurfacePickingType, PickingTypeSelection::Both, "");
45
46 DECLARE_ENUM(MultiSelectionType,
47 OR = 0,
48 XOR = 1,
49 C = 2
50 );
51
52 DEF_ENUM(MultiSelectionType, MultiSelectionType, MultiSelectionType::OR, "");
53
54 //DEF_VAR(Real, InteractionRadius, 0.01, "The radius of interaction");
55
56 DEF_VAR(Real, FloodAngle, 0.5f, "The angle limit of flood selection");
57
58 DEF_VAR(bool, TogglePicker, true, "The toggle of surface picker");
59
60 DEF_VAR(bool, ToggleMultiSelect, false, "The toggle of multiple selection");
61
62 DEF_VAR(bool, ToggleFlood, false, "The toggle of flood selection");
63
64 DEF_VAR(bool, ToggleVisibleFilter, false, "The toggle of visible filter");
65
66 DEF_VAR(bool, ToggleQuad, false, "The toggle of quad selection");
67
68 DEF_VAR(bool, ToggleIndexOutput, true, "The toggle of index output");
69
70 protected:
71 void onEvent(PMouseEvent event) override;
72 private:
73 std::shared_ptr<Camera> camera;
78
80
82 };
83
85}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
TopologyModule::Triangle Triangle
DEF_VAR(bool, ToggleVisibleFilter, false, "The toggle of visible filter")
DArray< int > tempTriIntersectedIndex
DEF_INSTANCE_OUT(TriangleSet< TDataType >, OtherTriangleSet, "")
DEF_ARRAY_OUT(int, TriangleIndex, DeviceType::GPU, "")
DEF_ENUM(MultiSelectionType, MultiSelectionType, MultiSelectionType::OR, "")
DEF_VAR(bool, ToggleFlood, false, "The toggle of flood selection")
DECLARE_ENUM(MultiSelectionType, OR=0, XOR=1, C=2)
DEF_VAR(bool, ToggleMultiSelect, false, "The toggle of multiple selection")
DEF_VAR(bool, TogglePicker, true, "The toggle of surface picker")
DEF_VAR(bool, ToggleQuad, false, "The toggle of quad selection")
DEF_INSTANCE_OUT(TriangleSet< TDataType >, SelectedTriangleSet, "")
DECLARE_ENUM(PickingTypeSelection, Click=0, Drag=1, Both=2)
DEF_INSTANCE_IN(TriangleSet< TDataType >, InitialTriangleSet, "")
std::shared_ptr< Camera > camera
DEF_VAR(bool, ToggleIndexOutput, true, "The toggle of index output")
void onEvent(PMouseEvent event) override
TopologyModule::Edge Edge
DEF_ARRAY_OUT(int, Sur2PointIndex, DeviceType::GPU, "")
DEF_VAR(Real, FloodAngle, 0.5f, "The angle limit of flood selection")
DEF_ENUM(PickingTypeSelection, SurfacePickingType, PickingTypeSelection::Both, "")
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