24#include "Topology/TriangleSet.h"
30 template<
typename TDataType>
36 typedef typename TDataType::Real
Real;
37 typedef typename TDataType::Coord
Coord;
43 std::string
caption()
override {
return "Sphere"; }
58 DEF_ENUM(SphereType, Type, SphereType::Standard,
"Sphere type");
78 void generateIcosahedron(std::vector<Vec3f>& vertices, std::vector<TopologyModule::Triangle>& triangles);
#define IMPLEMENT_TCLASS(name, T1)
a class to store polygon whose vertex number is greater or equal than 3
DEF_VAR(uint, Latitude, 32, "Latitude")
std::string caption() override
Return the caption.
void generateIcosahedron(std::vector< Vec3f > &vertices, std::vector< TopologyModule::Triangle > &triangles)
DEF_VAR(Real, Radius, 0.5, "Sphere radius")
DEF_VAR(uint, IcosahedronStep, 1,"Step")
BasicShapeType getShapeType() override
DECLARE_TCLASS(SphereModel, TDataType)
DEF_INSTANCE_STATE(PolygonSet< TDataType >, PolygonSet, "")
DEF_VAR(Coord, Center, 0, "Sphere center")
void resetStates() override
DECLARE_ENUM(SphereType, Standard=0, Icosahedron=1)
NBoundingBox boundingBox() override
DEF_VAR(uint, Longitude, 32, "Longitude")
DEF_ENUM(SphereType, Type, SphereType::Standard, "Sphere type")
DEF_VAR_OUT(TSphere3D< Real >, Sphere, "")
DEF_INSTANCE_STATE(TriangleSet< TDataType >, TriangleSet, "")
3D geometric primitives in three-dimensional space
This is an implementation of AdditiveCCD based on peridyno.