13 #ifndef vtkOBJImporterInternals_h 14 #define vtkOBJImporterInternals_h 42 return sqrt( amb[0]*amb[0]+amb[1]*amb[1]+amb[2]*amb[2] );
46 return sqrt( diff[0]*diff[0]+diff[1]*diff[1]+diff[2]*diff[2] );
50 return sqrt( spec[0]*spec[0]+spec[1]*spec[1]+spec[2]*spec[2] );
59 struct vtkOBJImportedPolyDataWithMaterial;
66 void PrintSelf(ostream& os,
vtkIndent indent) VTK_OVERRIDE;
73 MTLFileName = FileName +
".mtl";
82 if(TexturePath.empty())
85 const char sep =
'\\';
89 if(TexturePath.at(TexturePath.size()-1) != sep )
108 vtkGetMacro(VertexScale,
double)
109 vtkGetMacro(SuccessParsingFiles,
int)
122 std::vector<vtkOBJImportedPolyDataWithMaterial*>
poly_list;
132 std::vector<vtkOBJImportedMaterial*> ParseOBJandMTL(
std::string filename,
int& result_code);
134 void ReadVertices(
bool gotFirstUseMaterialTag,
char *pLine,
float xyz,
int lineNr,
const double v_scale,
bool everything_ok,
vtkPoints*
points,
const bool use_scale);
143 std::
string FileName;
144 std::
string MTLFileName;
145 std::
string TexturePath;
146 int SuccessParsingFiles;
156 vtkRenderer* renderer,
void SetMTLfileName(const char *arg)
const int MATERIAL_NAME_SIZE
const int OBJ_FILENAME_LENGTH
char texture_filename[OBJ_FILENAME_LENGTH]
std::vector< vtkOBJImportedPolyDataWithMaterial * > poly_list
const char * GetClassName()
abstract specification for renderers
concrete dataset represents vertices, lines, polygons, and triangle strips
void bindTexturedPolydataToRenderWindow(vtkRenderWindow *renderWindow, vtkRenderer *renderer, vtkOBJPolyDataProcessor *reader)
const std::string & GetMTLFileName() const
Superclass for algorithms that produce only polydata as output.
void SetFileName(const char *arg)
a simple class to control print indentation
const std::string & GetTexturePath() const
std::vector< std::string > outVector_of_textureFilnames
const std::string & GetFileName() const
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
std::vector< vtkSmartPointer< vtkActor > > actor_list
std::map< std::string, vtkOBJImportedMaterial * > mtlName_to_mtlData
create a window for renderers to draw into
void SetTexturePath(const char *arg)
std::vector< vtkSmartPointer< vtkPolyData > > outVector_of_vtkPolyData
void obj_set_material_defaults(vtkOBJImportedMaterial *mtl)
represent and manipulate 3D points
char name[MATERIAL_NAME_SIZE]