PeriDyno 1.0.0
Loading...
Searching...
No Matches
PointClip.h
Go to the documentation of this file.
1
16
17#pragma once
21#include "GLPointVisualModule.h"
23
24namespace dyno
25{
26
27
28 template<typename TDataType>
29 class PointClip : public ParametricModel<TDataType>
30 {
32
33
34 public:
35 typedef typename TDataType::Real Real;
36 typedef typename TDataType::Coord Coord;
37
39
40
41
43
44 DEF_VAR(Real, PlaneSize, 10, "");
45 DEF_VAR(bool, Reverse, false, "");
46 DEF_VAR(Real, PointSize, 0.008, "");
47 DEF_VAR(Color,PointColor,Color(1,0,0),"");
48 DEF_VAR(bool, ShowPlane, false, "");
49
50
53
54
55 public:
56
57
58
59 protected:
60 void resetStates() override;
61 void updateStates() override;
62 void clip();
64 void showPlane();
65
66
67 private:
68
70 std::vector<Coord> planeVertices;
71 std::shared_ptr<GLSurfaceVisualModule> surface;
72 std::shared_ptr<GLPointVisualModule> glpoint;
73 };
74
75
76
78}
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
std::shared_ptr< GLPointVisualModule > glpoint
Definition PointClip.h:72
DEF_VAR(Real, PlaneSize, 10, "")
DEF_VAR(bool, Reverse, false, "")
DEF_INSTANCE_STATE(PointSet< TDataType >, PointSet, "")
std::shared_ptr< GLSurfaceVisualModule > surface
Definition PointClip.h:71
DEF_INSTANCE_STATE(TriangleSet< TDataType >, ClipPlane, "")
DEF_INSTANCE_IN(PointSet< TDataType >, PointSet, "")
void resetStates() override
DEF_VAR(Color, PointColor, Color(1, 0, 0),"")
void updateStates() override
void transformPlane()
std::vector< Coord > planeVertices
Definition PointClip.h:70
DEF_VAR(Real, PointSize, 0.008, "")
DECLARE_TCLASS(PointClip, TDataType)
DEF_VAR(bool, ShowPlane, false, "")
TDataType::Coord Coord
Definition PointClip.h:36
TDataType::Real Real
Definition PointClip.h:35
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
Vector< float, 3 > Vec3f
Definition Vector3D.h:93