PeriDyno 1.0.0
Loading...
Searching...
No Matches
CubeModel.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 CubeModel : public BasicShape<TDataType>
27 {
29
30 public:
31 typedef typename TDataType::Real Real;
32 typedef typename TDataType::Coord Coord;
33
34 CubeModel();
35
36 std::string caption() override { return "Cube"; }
37
39
40 NBoundingBox boundingBox() override;
41
42 public:
43 DEF_VAR(Coord, Length, Real(1), "Edge length");
44
45 DEF_VAR(Vec3i, Segments, Vec3i(1, 1, 1), "");
46
48
50
52
54
55 protected:
56 void resetStates() override;
57
58 private:
59 void varChanged();
60
61 };
62
64}
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
DEF_INSTANCE_STATE(QuadSet< TDataType >, QuadSet, "")
std::string caption() override
Return the caption.
Definition CubeModel.h:36
DEF_VAR_OUT(TOrientedBox3D< Real >, Cube, "")
TDataType::Real Real
Definition CubeModel.h:31
void resetStates() override
Definition CubeModel.cpp:84
BasicShapeType getShapeType() override
Definition CubeModel.h:38
DEF_VAR(Coord, Length, Real(1), "Edge length")
DECLARE_TCLASS(CubeModel, TDataType)
TDataType::Coord Coord
Definition CubeModel.h:32
DEF_INSTANCE_STATE(PolygonSet< TDataType >, PolygonSet, "")
DEF_INSTANCE_STATE(TriangleSet< TDataType >, TriangleSet, "")
NBoundingBox boundingBox() override
Definition CubeModel.cpp:67
DEF_VAR(Vec3i, Segments, Vec3i(1, 1, 1), "")
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
@ CUBE
Definition BasicShape.h:25
Vector< int, 3 > Vec3i
Definition Vector3D.h:95