Public Member Functions |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
|
virtual vtkXMLMaterial * | GetMaterial () |
void | SetMaterial (vtkXMLMaterial *) |
|
virtual int | Parse () |
virtual int | Parse (const char *inputString) |
virtual int | Parse (const char *inputString, unsigned int length) |
virtual void | SetStream (istream *) |
virtual istream * | GetStream () |
long | TellG () |
void | SeekG (long position) |
virtual int | ParseChunk (const char *inputString, unsigned int length) |
virtual int | CleanupParser () |
virtual void | SetFileName (const char *) |
virtual char * | GetFileName () |
virtual void | SetIgnoreCharacterData (int) |
virtual int | GetIgnoreCharacterData () |
virtual void | SetEncoding (const char *) |
virtual char * | GetEncoding () |
virtual void | DebugOn () |
virtual void | DebugOff () |
unsigned char | GetDebug () |
void | SetDebug (unsigned char debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &os) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Protected Member Functions |
virtual void | StartElement (const char *name, const char **atts) |
virtual void | EndElement (const char *) |
virtual void | CharacterDataHandler (const char *data, int length) |
| vtkXMLParser () |
| ~vtkXMLParser () |
virtual int | CreateParser () |
virtual int | ParseXML () |
virtual int | ParsingComplete () |
virtual void | ReportStrayAttribute (const char *element, const char *attr, const char *value) |
virtual void | ReportMissingAttribute (const char *element, const char *attr) |
virtual void | ReportBadAttribute (const char *element, const char *attr, const char *value) |
virtual void | ReportUnknownElement (const char *element) |
virtual void | ReportXmlParseError () |
unsigned long | GetXMLByteIndex () |
virtual int | ParseBuffer (const char *buffer, unsigned int count) |
int | ParseBuffer (const char *buffer) |
| vtkObject () |
virtual | ~vtkObject () |
virtual void | RegisterInternal (vtkObjectBase *, int check) |
virtual void | UnRegisterInternal (vtkObjectBase *, int check) |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
| vtkObjectBase () |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &os) |
virtual void | ReportReferences (vtkGarbageCollector *) |
| vtkObjectBase (const vtkObjectBase &) |
void | operator= (const vtkObjectBase &) |
Parses VTK Material file.
vtkXMLMaterialParser parses a VTK Material file and provides that file's description of a number of vertex and fragment shaders along with data values specified for data members of vtkProperty. This material is to be applied to an actor through it's vtkProperty and augments VTK's concept of a vtkProperty to include explicitly include vertex and fragment shaders and parameter settings for those shaders. This effectively makes reflectance models and other shaders a material property. If no shaders are specified VTK should default to standard rendering.
- Design:
- vtkXMLMaterialParser provides access to 3 distinct types of first-level vtkXMLDataElements that describe a VTK material. These elements are as follows:
- Design:
- vtkProperty - describe values for vtkProperty data members
- Design:
- vtkVertexShader - a vertex shader and enough information to install it into the hardware rendering pipeline including values for specific shader parameters and structures.
- Design:
- vtkFragmentShader - a fragment shader and enough information to install it into the hardware rendering pipeline including values for specific shader parameters and structures.
- Design:
- The design of the material file closely follows that of vtk's xml descriptions of it's data sets. This allows use of the very handy vtkXMLDataElement which provides easy access to an xml element's attribute values. Inlined data is currently not handled.
- Design:
- Ideally this class would be a Facade to a DOM parser, but VTK only provides access to expat, a SAX parser. Other vtk classes that parse xml files are tuned to read vtkDataSets and don't provide the functionality to handle generic xml data. As such they are of little use here.
- Design:
- This class may be extended for better data handling or may become a Facade to a DOM parser should on become part of the VTK code base.
- Thanks:
- Shader support in VTK includes key contributions by Gary Templet at Sandia National Labs.
Definition at line 84 of file vtkXMLMaterialParser.h.