Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkSTLReader Class Reference

read ASCII or binary stereo lithography files. More...

#include <vtkSTLReader.h>

Inheritance diagram for vtkSTLReader:

Inheritance graph
[legend]
Collaboration diagram for vtkSTLReader:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
unsigned long GetMTime ()
virtual void SetFileName (const char *)
virtual char * GetFileName ()
virtual void SetMerging (int)
virtual int GetMerging ()
virtual void MergingOn ()
virtual void MergingOff ()
void SetLocator (vtkPointLocator *locator)
virtual vtkPointLocatorGetLocator ()
void CreateDefaultLocator ()
void SetLocator (vtkPointLocator &locator)

Static Public Methods

int IsTypeOf (const char *type)
vtkSTLReader * SafeDownCast (vtkObject *o)
vtkSTLReader * New ()

Protected Methods

 vtkSTLReader ()
 ~vtkSTLReader ()
 vtkSTLReader (const vtkSTLReader &)
void operator= (const vtkSTLReader &)
void Execute ()
int ReadBinarySTL (FILE *fp, vtkPoints *, vtkCellArray *)
int ReadASCIISTL (FILE *fp, vtkPoints *, vtkCellArray *)
int GetSTLFileType (FILE *fp)

Protected Attributes

char * FileName
int Merging
vtkPointLocatorLocator

Detailed Description

read ASCII or binary stereo lithography files.

Date:
2000/12/10 20:08:51
Revision:
1.49

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.

Warning:
Binary files written on one system may not be readable on other systems. vtkSTLWriter uses VAX or PC byte ordering and swaps bytes on other systems.
Examples:
vtkSTLReader (examples)

Definition at line 73 of file vtkSTLReader.h.


Constructor & Destructor Documentation

vtkSTLReader::vtkSTLReader   [protected]
 

vtkSTLReader::~vtkSTLReader   [protected]
 

vtkSTLReader::vtkSTLReader const vtkSTLReader &    [inline, protected]
 

Definition at line 112 of file vtkSTLReader.h.


Member Function Documentation

virtual const char* vtkSTLReader::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataSource.

int vtkSTLReader::IsTypeOf const char *    type [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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataSource.

virtual int vtkSTLReader::IsA const char *    type [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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataSource.

vtkSTLReader* vtkSTLReader::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataSource.

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 vtkSource.

vtkSTLReader* vtkSTLReader::New   [static]
 

Construct object with merging set to true.

Reimplemented from vtkPolyDataSource.

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]
 

virtual void vtkSTLReader::SetMerging int    [virtual]
 

Turn on/off merging of points/triangles.

virtual int vtkSTLReader::GetMerging   [virtual]
 

virtual void vtkSTLReader::MergingOn   [virtual]
 

virtual void vtkSTLReader::MergingOff   [virtual]
 

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]
 

void vtkSTLReader::CreateDefaultLocator void   
 

Create default locator. Used to create one when none is specified.

void vtkSTLReader::SetLocator vtkPointLocator   locator [inline]
 

For legacy compatibility. Do not use.

Definition at line 105 of file vtkSTLReader.h.

void vtkSTLReader::operator= const vtkSTLReader &    [inline, protected]
 

Definition at line 113 of file vtkSTLReader.h.

void vtkSTLReader::Execute   [protected, virtual]
 

Reimplemented from vtkSource.

int vtkSTLReader::ReadBinarySTL FILE *    fp,
vtkPoints  ,
vtkCellArray  
[protected]
 

int vtkSTLReader::ReadASCIISTL FILE *    fp,
vtkPoints  ,
vtkCellArray  
[protected]
 

int vtkSTLReader::GetSTLFileType FILE *    fp [protected]
 


Member Data Documentation

char* vtkSTLReader::FileName [protected]
 

Definition at line 115 of file vtkSTLReader.h.

int vtkSTLReader::Merging [protected]
 

Definition at line 116 of file vtkSTLReader.h.

vtkPointLocator* vtkSTLReader::Locator [protected]
 

Definition at line 117 of file vtkSTLReader.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 13:00:28 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001