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;
133 void ReadVertices(
bool gotFirstUseMaterialTag,
char *pLine,
float xyz,
int lineNr, const
double v_scale,
bool everything_ok,
vtkPoints*
points, const
bool use_scale);
136 ~vtkOBJPolyDataProcessor();
140 vtkSetMacro(SuccessParsingFiles,
int)
145 int SuccessParsingFiles;
148 vtkOBJPolyDataProcessor(const vtkOBJPolyDataProcessor&);
149 void operator=(const vtkOBJPolyDataProcessor&);
155 vtkRenderer* renderer,
156 vtkOBJPolyDataProcessor* reader );
void SetMTLfileName(const char *arg)
represents an object (geometry & properties) in a rendered scene
const int MATERIAL_NAME_SIZE
const int OBJ_FILENAME_LENGTH
char texture_filename[OBJ_FILENAME_LENGTH]
std::vector< vtkOBJImportedPolyDataWithMaterial * > poly_list
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
const char * GetClassName()
abstract specification for renderers
Hold a reference to a vtkObjectBase instance.
concrete dataset represents vertices, lines, polygons, and triangle strips
void bindTexturedPolydataToRenderWindow(vtkRenderWindow *renderWindow, vtkRenderer *renderer, vtkOBJPolyDataProcessor *reader)
const std::string & GetMTLFileName() const
std::vector< vtkOBJImportedMaterial * > ParseOBJandMTL(std::string filename, int &result_code)
const std::string & GetFileName() const
std::string GetTextureFilename(int idx)
vtkOBJImportedMaterial * GetMaterial(int k)
Superclass for algorithms that produce only polydata as output.
void SetFileName(const char *arg)
a simple class to control print indentation
std::vector< std::string > outVector_of_textureFilnames
std::vector< vtkSmartPointer< vtkActor > > actor_list
virtual void PrintSelf(ostream &os, vtkIndent indent)
std::map< std::string, vtkOBJImportedMaterial * > mtlName_to_mtlData
create a window for renderers to draw into
const std::string & GetTexturePath() const
void SetTexturePath(const char *arg)
std::vector< vtkSmartPointer< vtkPolyData > > outVector_of_vtkPolyData
void obj_set_material_defaults(vtkOBJImportedMaterial *mtl)
static vtkOBJPolyDataProcessor * New()
void ReadVertices(bool gotFirstUseMaterialTag, char *pLine, float xyz, int lineNr, const double v_scale, bool everything_ok, vtkPoints *points, const bool use_scale)
vtkPolyData * GetOutput()
represent and manipulate 3D points
char name[MATERIAL_NAME_SIZE]