13 #ifndef vtkOBJImporterInternals_h
14 #define vtkOBJImporterInternals_h
16 #include "vtkIOImportModule.h"
31 double map_Kd_scale[3];
32 double map_Kd_offset[3];
47 struct vtkOBJImportedPolyDataWithMaterial;
64 if (!strcmp(this->FileName.c_str(), arg))
76 if (!strcmp(this->MTLFileName.c_str(), arg))
81 this->DefaultMTLFileName =
false;
86 if (TexturePath.empty())
89 const char sep =
'\\';
93 if (TexturePath.at(TexturePath.size() - 1) != sep)
102 vtkSetMacro(VertexScale,
double);
103 vtkGetMacro(VertexScale,
double);
104 vtkGetMacro(SuccessParsingFiles,
int);
108 int GetNumberOfOutputs();
120 std::vector<vtkOBJImportedPolyDataWithMaterial*>
poly_list;
128 std::vector<vtkOBJImportedMaterial*> ParseOBJandMTL(
std::string filename,
int& result_code);
130 void ReadVertices(
bool gotFirstUseMaterialTag,
char* pLine,
float xyz,
int lineNr,
131 const double v_scale,
bool everything_ok,
vtkPoints*
points,
const bool use_scale);
139 vtkSetMacro(SuccessParsingFiles,
int);
141 std::
string FileName;
142 std::
string MTLFileName;
143 bool DefaultMTLFileName;
144 std::
string TexturePath;
145 int SuccessParsingFiles;
void SetMTLfileName(const char *arg)
represents an object (geometry & properties) in a rendered scene
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
std::string texture_filename
std::vector< vtkOBJImportedPolyDataWithMaterial * > poly_list
const char * GetClassName()
abstract specification for renderers
concrete dataset represents vertices, lines, polygons, and triangle strips
const std::string & GetMTLFileName() const
const std::string & GetFileName() const
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
void SetFileName(const char *arg)
a simple class to control print indentation
std::map< std::string, vtkOBJImportedMaterial * > mtlName_to_mtlData
VTKIOIMPORT_EXPORT void obj_set_material_defaults(vtkOBJImportedMaterial *mtl)
std::vector< vtkOBJImportedMaterial * > parsedMTLs
std::vector< vtkSmartPointer< vtkActor > > actor_list
create a window for renderers to draw into
const std::string & GetTexturePath() const
VTKIOIMPORT_EXPORT void bindTexturedPolydataToRenderWindow(vtkRenderWindow *renderWindow, vtkRenderer *renderer, vtkOBJPolyDataProcessor *reader)
void SetTexturePath(const char *arg)
std::vector< vtkSmartPointer< vtkPolyData > > outVector_of_vtkPolyData
vtkPolyData * GetOutput()
Get the output data object for a port on this algorithm.
represent and manipulate 3D points
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.