5#include <vtkObjectFactory.h>
13 this->Superclass::PrintSelf(os, indent);
15 os << indent <<
"File Name: " << (this->
Filename ? this->
Filename :
"(none)")
44 auto dataSet = vtkDataSet::SafeDownCast(this->GetInput());
46 if(dataSet ==
nullptr)
55 for(vtkIdType i = 0; i < dataSet->GetNumberOfPoints(); i++) {
56 dataSet->GetPoint(i, p);
57 Stream <<
"v " << p[0] <<
" " << p[1] <<
" " << p[2] <<
" " << std::endl;
60 for(vtkIdType i = 0; i < dataSet->GetNumberOfCells(); i++) {
61 vtkCell *c = dataSet->GetCell(i);
64 for(
int j = 0; j < c->GetNumberOfPoints(); j++) {
65 Stream << c->GetPointId(j) + 1 <<
" ";
ttkOBJWriter - Object File Format Writer
void PrintSelf(std::ostream &os, vtkIndent indent) override
void WriteData() override
void setDebugMsgPrefix(const std::string &prefix)
int printErr(const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
vtkStandardNewMacro(ttkOBJWriter)