PeriDyno 1.0.0
Loading...
Searching...
No Matches
CylinderModel.h
Go to the documentation of this file.
1
16
17#pragma once
18#include "BasicShape.h"
19
22#include "Topology/PolygonSet.h"
23
24namespace dyno
25{
26
27
28 template<typename TDataType>
29 class CylinderModel : public BasicShape<TDataType>
30 {
32
33 public:
34 typedef typename TDataType::Real Real;
35 typedef typename TDataType::Coord Coord;
36
38
39 std::string caption() override { return "Cylinder"; }
40
42
43 public:
44 DEF_VAR(unsigned, Columns, 24, "Cylinder Columns");
45
46 DEF_VAR(unsigned, Row, 4, "Cylinder Row");
47
48 DEF_VAR(unsigned, EndSegment, 3, "Cylinder EndSegment");
49
50 DEF_VAR(Real, Radius, 0.5, "Cylinder radius");
51
52 DEF_VAR(Real, Height, 1.0, "Cylinder Height");
53
55
57
59
60
61 public:
62
63 NBoundingBox boundingBox()override;
64
65 protected:
66 void resetStates() override;
67
68 void varChanged();
69 };
70
72}
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
DECLARE_TCLASS(CylinderModel, TDataType)
DEF_VAR(unsigned, Row, 4, "Cylinder Row")
TDataType::Coord Coord
DEF_INSTANCE_STATE(PolygonSet< TDataType >, PolygonSet, "")
TDataType::Real Real
DEF_VAR(unsigned, EndSegment, 3, "Cylinder EndSegment")
BasicShapeType getShapeType() override
DEF_VAR_OUT(TCylinder3D< Real >, Cylinder, "")
std::string caption() override
Return the caption.
DEF_INSTANCE_STATE(TriangleSet< TDataType >, TriangleSet, "")
DEF_VAR(unsigned, Columns, 24, "Cylinder Columns")
DEF_VAR(Real, Height, 1.0, "Cylinder Height")
NBoundingBox boundingBox() override
DEF_VAR(Real, Radius, 0.5, "Cylinder radius")
void resetStates() override
a class to store polygon whose vertex number is greater or equal than 3
Definition PolygonSet.h:29
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
BasicShapeType
Definition BasicShape.h:23
@ CYLINDER
Definition BasicShape.h:29