PeriDyno 1.0.0
Loading...
Searching...
No Matches
VolumeOctreeGenerator.h
Go to the documentation of this file.
1
16#pragma once
17
18#include "VolumeOctree.h"
19
20#include "Topology/TriangleSet.h"
21
22namespace dyno
23{
28 template<typename TDataType>
29 class VolumeOctreeGenerator :public VolumeOctree<TDataType>
30 {
32 public:
33 typedef typename TDataType::Real Real;
34 typedef typename TDataType::Coord Coord;
35
37 ~VolumeOctreeGenerator() override;
38
39 void load(std::string filename);
40
41 void load(std::string filename, Coord rotate_value, Real scale_value, Coord translate_value);
42
43 Coord lowerBound() override { return m_origin; }
44 Coord upperBound() override { return m_origin + this->varSpacing()->getData() * Coord(m_nx, m_ny, m_nz); }
45
46 public:
47
48 DEF_INSTANCE_IN(TriangleSet<TDataType>, TriangleSet, "The triangles of closed surface");
49
50 DEF_VAR(Real, Spacing, Real(0.1), "the dx");
51
52 DEF_VAR(uint, Padding, 10, "Padding of model");
53
54 DEF_VAR(int, AABBPadding, 1, "Padding of each triangle`s AABB");
55
56 DEF_VAR(Coord, ForwardVector, Coord(0), "The distance and direction of topology move");
57
58 protected:
59 void resetStates() override;
60
61 void updateStates() override;
62
63 void updateTopology() override;
64
65 private:
66 void initParameter();
67
68 int m_nx;
69 int m_ny;
70 int m_nz;
72
73 int m_level0 = 0;
74 int m_max_grid = 50000;
75 };
76}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
DEF_INSTANCE_IN(TriangleSet< TDataType >, TriangleSet, "The triangles of closed surface")
DEF_VAR(uint, Padding, 10, "Padding of model")
DEF_VAR(int, AABBPadding, 1, "Padding of each triangle`s AABB")
DEF_VAR(Coord, ForwardVector, Coord(0), "The distance and direction of topology move")
DEF_VAR(Real, Spacing, Real(0.1), "the dx")
void load(std::string filename)
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
unsigned int uint
Definition VkProgram.h:14