File: vtkxmlmaterialparser.mdc

package info (click to toggle)
freemat 4.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 141,800 kB
  • ctags: 14,082
  • sloc: ansic: 126,788; cpp: 62,046; python: 2,080; perl: 1,255; sh: 1,146; yacc: 1,019; lex: 239; makefile: 100
file content (79 lines) | stat: -rw-r--r-- 3,364 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

 Usage

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.
.SECTION Design vtkXMLMaterialParser provides access to 3
distinct types of first-level vtkXMLDataElements that
describe a VTK material. These elements are as follows:
vtkProperty - describe values for vtkProperty data members
vtkVertexShader - a vertex shader and enough information to
install it into the hardware rendering pipeline including
values for specific shader parameters and structures.
vtkFragmentShader - a fragment shader and enough information
to install it into the hardware rendering pipeline including
values for specific shader parameters and structures.
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.
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.
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. .SECTION Thanks Shader support in VTK
includes key contributions by Gary Templet at Sandia
National Labs.
To create an instance of class vtkXMLMaterialParser, simply
invoke its constructor as follows

    obj = vtkXMLMaterialParser



 Methods

The class vtkXMLMaterialParser 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 vtkXMLMaterialParser class.

* string = obj.GetClassName ()
* int = obj.IsA (string name)
* vtkXMLMaterialParser = obj.NewInstance ()
* vtkXMLMaterialParser = obj.SafeDownCast (vtkObject o)
* vtkXMLMaterial = obj.GetMaterial () - Set/Get the
  vtkXMLMaterial representation of the parsed material.
* obj.SetMaterial (vtkXMLMaterial ) - Set/Get the
  vtkXMLMaterial representation of the parsed material.
* int = obj.Parse () - Overridden to initialize the internal
  structures before the parsing begins.
* int = obj.Parse (string inputString) - Overridden to
  initialize the internal structures before the parsing
  begins.
* int = obj.Parse (string inputString, int length) -
  Overridden to initialize the internal structures before
  the parsing begins.
* int = obj.InitializeParser () - Overridden to clean up
  internal structures before the chunk-parsing begins.


* FreeMat_Documentation
* Visualization_Toolkit_IO_Classes
* Generated on Thu Jul 25 2013 17:18:34 for FreeMat by
  doxygen_ 1.8.1.1