PeriDyno 0.8.2
OBJexporter.h
Go to the documentation of this file.
1#pragma once
4#include "node.h"
5#include "Topology/TriangleSet.h"
7
8#include <string>
9#include <memory>
10
11namespace dyno
12{
13 template <typename TDataType> class TriangleSet;
14
15 template<typename TDataType>
16 class OBJExporter : public Node
17 {
18 DECLARE_TCLASS(OBJExporter, TDataType)
19 public:
20
21 typedef typename TDataType::Real Real;
22 typedef typename TDataType::Coord Coord;
23 typedef typename TDataType::Matrix Matrix;
24
25 typedef typename Quat<Real> TQuat;
26
27 DECLARE_ENUM(OutputType,
28 TriangleMesh = 0,
29 PointCloud = 1);
30
32
33 //void update() override;
34
35 public:
36
37 DEF_VAR(std::string, OutputPath, "D:/File_", "OutputPath");
38 //DEF_VAR(std::string, Filename, "", "Filename");
39 DEF_VAR(unsigned, StartFrame, 1, "StartFrame");
40 DEF_VAR(unsigned, EndFrame, 500000, "EndFrame");
41 DEF_VAR(unsigned, FrameStep, 1, "FrameStep");
42 DEF_ENUM(OutputType, OutputType, TriangleMesh, "OutputType");
43
45 //DEF_INSTANCE_OUT(TriangleSet<TDataType>, TriangleSe, "TriangleSet");
46
47 //DEF_NODE_PORTS(Node, Topology, "Topology");
48 //DEF_INSTANCE_STATE(TopologyModule, Topology, "Topology");
49 //DEF_INSTANCE_STATE(TriangleSet<TDataType>, TriangleSet, "");
50
51 protected:
52 void resetStates() override;
53 //void updateStates() override;
54
55 void preUpdateStates() override;
56 void setFrameStep();
57
58
59 private:
60
61
62 std::shared_ptr<TriangleMeshWriter<TDataType>> ExportModule = nullptr;
63 std::shared_ptr<TriangleSet<TDataType>> ptr_TriangleSet = nullptr;
64
65
66 };
67}
#define DEF_INSTANCE_IN(T, name, desc)
Definition: DeclareField.h:48
#define DECLARE_TCLASS(name, T1)
Definition: Object.h:87
double Real
Definition: Typedef.inl:23
void preUpdateStates() override
Definition: OBJexporter.cpp:36
DEF_ENUM(OutputType, OutputType, TriangleMesh, "OutputType")
DEF_VAR(unsigned, StartFrame, 1, "StartFrame")
DECLARE_ENUM(OutputType, TriangleMesh=0, PointCloud=1)
TDataType::Coord Coord
Definition: OBJexporter.h:22
std::shared_ptr< TriangleMeshWriter< TDataType > > ExportModule
Definition: OBJexporter.h:62
DEF_VAR(unsigned, FrameStep, 1, "FrameStep")
void resetStates() override
Definition: OBJexporter.cpp:48
DEF_VAR(unsigned, EndFrame, 500000, "EndFrame")
Quat< Real > TQuat
Definition: OBJexporter.h:25
DEF_VAR(std::string, OutputPath, "D:/File_", "OutputPath")
TDataType::Real Real
Definition: OBJexporter.h:21
std::shared_ptr< TriangleSet< TDataType > > ptr_TriangleSet
Definition: OBJexporter.h:63
TDataType::Matrix Matrix
Definition: OBJexporter.h:23
This is an implementation of AdditiveCCD based on peridyno.
Definition: Array.h:24