PeriDyno 1.0.0
Loading...
Searching...
No Matches
ConeModel.h
Go to the documentation of this file.
1
16
17#pragma once
18#include "BasicShape.h"
19
20#include "Topology/TriangleSet.h"
21#include "Topology/PolygonSet.h"
22
23namespace dyno
24{
25 template<typename TDataType>
26 class ConeModel : public BasicShape<TDataType>
27 {
29
30 public:
31 typedef typename TDataType::Real Real;
32 typedef typename TDataType::Coord Coord;
33
34 ConeModel();
35
36 std::string caption() override { return "Cone"; }
37
39
40 public:
41 DEF_VAR(unsigned, Columns, 24, "Cone Columns");
42
43 DEF_VAR(unsigned, Row, 4, "Cone Row");
44
45 DEF_VAR(unsigned, EndSegment, 3, "Cone EndSegment");
46
47 DEF_VAR(Real, Radius, 0.6, "Cone radius");
48
49 DEF_VAR(Real, Height, 0.9, "Cone Height");
50
52
54
56
57 public:
58 NBoundingBox boundingBox() override;
59
60 protected:
61 void resetStates() override;
62
63
64 private:
65 void varChanged();
66 };
67
69}
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
void resetStates() override
Definition ConeModel.cpp:54
DEF_VAR(unsigned, Row, 4, "Cone Row")
DEF_VAR(Real, Height, 0.9, "Cone Height")
DEF_VAR(unsigned, Columns, 24, "Cone Columns")
DEF_VAR(unsigned, EndSegment, 3, "Cone EndSegment")
DECLARE_TCLASS(ConeModel, TDataType)
TDataType::Real Real
Definition ConeModel.h:31
DEF_INSTANCE_STATE(TriangleSet< TDataType >, TriangleSet, "")
BasicShapeType getShapeType() override
Definition ConeModel.h:38
DEF_VAR(Real, Radius, 0.6, "Cone radius")
TDataType::Coord Coord
Definition ConeModel.h:32
DEF_INSTANCE_STATE(PolygonSet< TDataType >, PolygonSet, "")
std::string caption() override
Return the caption.
Definition ConeModel.h:36
NBoundingBox boundingBox() override
DEF_VAR_OUT(TCone3D< Real >, Cone, "")
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
@ CONE
Definition BasicShape.h:27