FreeMat: vtkXMLMaterialReader

FreeMat

- Main Page
- Related Pages

vtkXMLMaterialReader

Section: Visualization Toolkit IO Classes

# Usage

vtkXMLMaterialReader provides access to three types of vtkXMLDataElement found in XML Material Files. This class sorts them by type and integer id from 0-N for N elements of a specific type starting with the first instance found.

.SECTION Design This class is basically a Facade for vtkXMLMaterialParser. Currently functionality is to only provide access to vtkXMLDataElements but further extensions may return higher level data structures.

Having both an vtkXMLMaterialParser and a vtkXMLMaterialReader is consistent with VTK's design for handling xml file and provides for future flexibility, that is better data handlers and interfacing with a DOM xml parser.

vtkProperty - defines values for some or all data members of vtkProperty

vtkVertexShader - defines vertex shaders

vtkFragmentShader - defines fragment shaders .SECTION Thanks Shader support in VTK includes key contributions by Gary Templet at Sandia National Labs.

To create an instance of class vtkXMLMaterialReader, simply invoke its constructor as follows

      obj = vtkXMLMaterialReader

# Methods

The class vtkXMLMaterialReader has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkXMLMaterialReader class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkXMLMaterialReader = obj.NewInstance ()`
- `vtkXMLMaterialReader = obj.SafeDownCast (vtkObject o)`
- `obj.SetFileName (string )` - Set and get file name.
- `string = obj.GetFileName ()` - Set and get file name.
- `obj.ReadMaterial ()` - Read the material file refered to in FileName. If the Reader hasn't changed since the last ReadMaterial(), it does not read the file again.
- `vtkXMLMaterial = obj.GetMaterial ()` - Get the Material representation read by the reader.