PeriDyno 1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CapsuleModel.h
Go to the documentation of this file.
1
20
21#pragma once
22#include "BasicShape.h"
23
24#include "Topology/TriangleSet.h"
25#include "Topology/PolygonSet.h"
26
27namespace dyno
28{
29 template<typename TDataType>
30 class CapsuleModel : public BasicShape<TDataType>
31 {
33
34 public:
35 typedef typename TDataType::Real Real;
36 typedef typename TDataType::Coord Coord;
37
39
40 std::string caption() override { return "Capsule"; }
41
43
44 NBoundingBox boundingBox() override;
45
46 public:
47 DEF_VAR(Coord, Center, 0, "Sphere center");
48
49 DEF_VAR(Real, Radius, 0.25, "Sphere radius");
50
51 DEF_VAR(uint, Latitude, 20, "Latitude");
52
53 DEF_VAR(uint, Longitude, 20, "Longitude");
54
55 DEF_VAR(Real, Height, 0.5, "Height");
56
57 DEF_VAR(uint, HeightSegment, 8, "HeightSegment");
58
60
62
64
66
67 protected:
68 void resetStates() override;
69
70 private:
71 void varChanged();
72 };
73
74
75
77}
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
DEF_INSTANCE_STATE(PolygonSet< TDataType >, PolygonSet, "")
NBoundingBox boundingBox() override
BasicShapeType getShapeType() override
DEF_VAR_OUT(TCapsule3D< Real >, Capsule, "")
DEF_INSTANCE_STATE(EdgeSet< TDataType >, CenterLine, "")
DEF_VAR(Coord, Center, 0, "Sphere center")
TDataType::Coord Coord
TDataType::Real Real
DEF_VAR(Real, Radius, 0.25, "Sphere radius")
DEF_VAR(Real, Height, 0.5, "Height")
std::string caption() override
Return the caption.
DECLARE_TCLASS(CapsuleModel, TDataType)
DEF_VAR(uint, HeightSegment, 8, "HeightSegment")
DEF_INSTANCE_STATE(TriangleSet< TDataType >, TriangleSet, "")
DEF_VAR(uint, Longitude, 20, "Longitude")
void resetStates() override
DEF_VAR(uint, Latitude, 20, "Latitude")
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
@ CAPSULE
Definition BasicShape.h:28
@ Capsule
Definition VehicleInfo.h:25
unsigned int uint
Definition VkProgram.h:14