PeriDyno 1.0.0
Loading...
Searching...
No Matches
PointsLoader.cpp
Go to the documentation of this file.
1#include "PointsLoader.h"
2
3namespace dyno
4{
6
7 template<typename TDataType>
12
13 template<typename TDataType>
18
19 template<typename TDataType>
21 {
22 if (this->varFileName()->getValue() == "")
23 {
24 Log::sendMessage(Log::Error, "File name is not set!");
25 return;
26 }
27
28 if (this->outPointSet()->getDataPtr() == nullptr) {
29 this->outPointSet()->setDataPtr(std::make_shared<PointSet<TDataType>>());
30 }
31
32 auto filename = this->varFileName()->getData();
33
34 auto topo = this->outPointSet()->getDataPtr();
35
36 topo->loadObjFile(filename.string());
37 topo->rotate(this->varRotation()->getData());
38 topo->scale(this->varScale()->getData());
39 topo->translate(this->varLocation()->getData());
40 }
41
43}
#define DEFINE_CLASS(name)
Definition Object.h:140
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
@ Error
Error information while executing something.
Definition Log.h:50
static void sendMessage(MessageType type, const std::string &text)
Add a new message to log.
Definition Log.cpp:41
A PointSet stores the coordinates for a set of independent points.
Definition PointSet.h:8
Load a triangular mesh.
void resetStates() override
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25