#include <vtkSTLReader.h>
vtkSTLReader is a source object that reads ASCII or binary stereo lithography files (.stl files). The FileName must be specified to vtkSTLReader. The object automatically detects whether the file is ASCII or binary.
.stl files are quite inefficient since they duplicate vertex definitions. By setting the Merging boolean you can control whether the point data is merged after reading. Merging is performed by default, however, merging requires a large amount of temporary storage since a 3D hash table must be constructed.
Definition at line 47 of file vtkSTLReader.h.
Public Types | |
typedef vtkPolyDataAlgorithm | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
unsigned long | GetMTime () |
void | CreateDefaultLocator () |
virtual void | SetFileName (const char *) |
virtual char * | GetFileName () |
virtual void | SetMerging (int) |
virtual int | GetMerging () |
virtual void | MergingOn () |
virtual void | MergingOff () |
virtual void | SetScalarTags (int) |
virtual int | GetScalarTags () |
virtual void | ScalarTagsOn () |
virtual void | ScalarTagsOff () |
void | SetLocator (vtkPointLocator *locator) |
virtual vtkPointLocator * | GetLocator () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkSTLReader * | SafeDownCast (vtkObject *o) |
static vtkSTLReader * | New () |
Protected Member Functions | |
vtkSTLReader () | |
~vtkSTLReader () | |
int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
int | ReadBinarySTL (FILE *fp, vtkPoints *, vtkCellArray *) |
int | ReadASCIISTL (FILE *fp, vtkPoints *, vtkCellArray *, vtkFloatArray *scalars=0) |
int | GetSTLFileType (const char *filename) |
Protected Attributes | |
char * | FileName |
int | Merging |
int | ScalarTags |
vtkPointLocator * | Locator |
vtkSTLReader::vtkSTLReader | ( | ) | [protected] |
vtkSTLReader::~vtkSTLReader | ( | ) | [protected] |
virtual const char* vtkSTLReader::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkPolyDataAlgorithm.
static int vtkSTLReader::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkPolyDataAlgorithm.
virtual int vtkSTLReader::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkPolyDataAlgorithm.
static vtkSTLReader* vtkSTLReader::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkPolyDataAlgorithm.
void vtkSTLReader::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkPolyDataAlgorithm.
static vtkSTLReader* vtkSTLReader::New | ( | ) | [static] |
Construct object with merging set to true.
Reimplemented from vtkPolyDataAlgorithm.
unsigned long vtkSTLReader::GetMTime | ( | ) | [virtual] |
Overload standard modified time function. If locator is modified, then this object is modified as well.
Reimplemented from vtkObject.
virtual void vtkSTLReader::SetFileName | ( | const char * | ) | [virtual] |
Specify file name of stereo lithography file.
virtual char* vtkSTLReader::GetFileName | ( | ) | [virtual] |
Specify file name of stereo lithography file.
virtual void vtkSTLReader::SetMerging | ( | int | ) | [virtual] |
Turn on/off merging of points/triangles.
virtual int vtkSTLReader::GetMerging | ( | ) | [virtual] |
Turn on/off merging of points/triangles.
virtual void vtkSTLReader::MergingOn | ( | ) | [virtual] |
Turn on/off merging of points/triangles.
virtual void vtkSTLReader::MergingOff | ( | ) | [virtual] |
Turn on/off merging of points/triangles.
virtual void vtkSTLReader::SetScalarTags | ( | int | ) | [virtual] |
Turn on/off tagging of solids with scalars.
virtual int vtkSTLReader::GetScalarTags | ( | ) | [virtual] |
Turn on/off tagging of solids with scalars.
virtual void vtkSTLReader::ScalarTagsOn | ( | ) | [virtual] |
Turn on/off tagging of solids with scalars.
virtual void vtkSTLReader::ScalarTagsOff | ( | ) | [virtual] |
Turn on/off tagging of solids with scalars.
void vtkSTLReader::SetLocator | ( | vtkPointLocator * | locator | ) |
Specify a spatial locator for merging points. By default an instance of vtkMergePoints is used.
virtual vtkPointLocator* vtkSTLReader::GetLocator | ( | ) | [virtual] |
Specify a spatial locator for merging points. By default an instance of vtkMergePoints is used.
void vtkSTLReader::CreateDefaultLocator | ( | ) |
Create default locator. Used to create one when none is specified.
int vtkSTLReader::RequestData | ( | vtkInformation * | request, | |
vtkInformationVector ** | inputVector, | |||
vtkInformationVector * | outputVector | |||
) | [protected, virtual] |
This is called by the superclass. This is the method you should override.
Reimplemented from vtkPolyDataAlgorithm.
int vtkSTLReader::ReadBinarySTL | ( | FILE * | fp, | |
vtkPoints * | , | |||
vtkCellArray * | ||||
) | [protected] |
int vtkSTLReader::ReadASCIISTL | ( | FILE * | fp, | |
vtkPoints * | , | |||
vtkCellArray * | , | |||
vtkFloatArray * | scalars = 0 | |||
) | [protected] |
int vtkSTLReader::GetSTLFileType | ( | const char * | filename | ) | [protected] |
char* vtkSTLReader::FileName [protected] |
Definition at line 94 of file vtkSTLReader.h.
int vtkSTLReader::Merging [protected] |
Definition at line 95 of file vtkSTLReader.h.
int vtkSTLReader::ScalarTags [protected] |
Definition at line 96 of file vtkSTLReader.h.
vtkPointLocator* vtkSTLReader::Locator [protected] |
Definition at line 97 of file vtkSTLReader.h.