PeriDyno 1.0.0
Loading...
Searching...
No Matches
Subdivide.h
Go to the documentation of this file.
1
20
21#pragma once
23
24#include "Topology/TriangleSet.h"
25#include "Topology/PolygonSet.h"
26#include "STL/Map.h"
27
28namespace dyno
29{
30
31 void loopSubdivide(std::vector<Vec3f>& vertices, std::vector<TopologyModule::Triangle>& triangles);
32
33
34 template<typename TDataType>
35 class Subdivide : public ParametricModel<TDataType>
36 {
38
39 public:
40 typedef typename TDataType::Real Real;
41 typedef typename TDataType::Coord Coord;
42
43
44
45 Subdivide();
46
47 std::string caption() override { return "Subdivide"; }
48
49 public:
50
51 DEF_VAR(uint, Step, 1, "Step");
52
54
56
57
58 protected:
59 void resetStates() override;
60
61 private:
62 void varChanged();
63
64
65 };
66
67
69
70}
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
void resetStates() override
std::string caption() override
Return the caption.
Definition Subdivide.h:47
TDataType::Real Real
Definition Subdivide.h:40
DECLARE_TCLASS(Subdivide, TDataType)
DEF_INSTANCE_IN(TriangleSet< TDataType >, InTriangleSet, "")
TDataType::Coord Coord
Definition Subdivide.h:41
DEF_INSTANCE_STATE(TriangleSet< TDataType >, TriangleSet, "")
DEF_VAR(uint, Step, 1, "Step")
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
void loopSubdivide(std::vector< Vec3f > &vertices, std::vector< TopologyModule::Triangle > &triangles)
Definition Subdivide.cpp:11
unsigned int uint
Definition VkProgram.h:14