3#ifndef vtkOBJImporterInternals_h
4#define vtkOBJImporterInternals_h
6#include "vtkIOImportModule.h"
12VTK_ABI_NAMESPACE_BEGIN
24 double map_Kd_scale[3];
25 double map_Kd_offset[3];
40struct vtkOBJImportedPolyDataWithMaterial;
58 if (this->FileName == arg)
62 this->FileName = std::string(arg);
71 if (this->MTLFileName == arg)
75 this->MTLFileName = std::string(arg);
76 this->DefaultMTLFileName =
false;
80 this->TextureStreams = streamMap;
84 this->TexturePath = std::string(arg);
85 if (this->TexturePath.empty())
90 const char sep =
'\\';
94 if (this->TexturePath.at(this->TexturePath.size() - 1) != sep)
96 this->TexturePath += sep;
98 this->DefaultTexturePath =
false;
103 return this->TextureStreams;
110 vtkSetMacro(VertexScale,
double);
111 vtkGetMacro(VertexScale,
double);
112 vtkGetMacro(SuccessParsingFiles,
int);
128 std::vector<vtkOBJImportedPolyDataWithMaterial*>
poly_list;
139 void ReadVertices(
bool gotFirstUseMaterialTag,
char* pLine,
float xyz,
int lineNr,
double v_scale,
140 bool everything_ok,
vtkPoints* points,
bool use_scale);
148 vtkSetMacro(SuccessParsingFiles,
int);
an ordered list of actors
represents an object (geometry & properties) in a rendered scene
a simple class to control print indentation
void SetStream(vtkResourceStream *stream)
const std::string & GetFileName() const
std::string GetTextureFilename(int idx)
vtkOBJImportedMaterial * GetMaterial(int k)
void SetTextureStreams(std::map< std::string, vtkResourceStream * > streamMap)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
std::vector< vtkSmartPointer< vtkActor > > actor_list
void SetTexturePath(const char *arg)
void ReadVertices(bool gotFirstUseMaterialTag, char *pLine, float xyz, int lineNr, double v_scale, bool everything_ok, vtkPoints *points, bool use_scale)
std::vector< vtkOBJImportedMaterial * > ParseOBJandMTL(vtkResourceStream *mtlStream, int &result_code)
void SetFileName(const char *arg)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetMTLStream(vtkResourceStream *mtlStream)
const std::string & GetMTLFileName() const
std::vector< vtkSmartPointer< vtkPolyData > > outVector_of_vtkPolyData
virtual vtkPolyData * GetOutput(int idx)
static vtkOBJPolyDataProcessor * New()
std::vector< vtkOBJImportedMaterial * > parsedMTLs
std::vector< vtkOBJImportedPolyDataWithMaterial * > poly_list
const std::string & GetTexturePath() const
std::map< std::string, vtkOBJImportedMaterial * > mtlName_to_mtlData
~vtkOBJPolyDataProcessor() override
vtkOBJPolyDataProcessor()
const std::map< std::string, vtkResourceStream * > & GetTextureStreams() const
void SetMTLfileName(const char *arg)
std::map< std::string, vtkResourceStream * > TextureStreams
represent and manipulate 3D points
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
create a window for renderers to draw into
abstract specification for renderers
Abstract class used for custom streams.
const char * GetClassName()
std::string texture_filename
VTKIOIMPORT_EXPORT bool bindTexturedPolydataToRenderWindow(vtkRenderWindow *renderWindow, vtkRenderer *renderer, vtkOBJPolyDataProcessor *reader, vtkActorCollection *actorCollection)
VTKIOIMPORT_EXPORT void obj_set_material_defaults(vtkOBJImportedMaterial *mtl)