VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
vtkXMLShader.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkXMLShader.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
26
#ifndef __vtkXMLShader_h
27
#define __vtkXMLShader_h
28
29
#include "
vtkObject.h
"
30
31
class
vtkXMLDataElement
;
32
33
class
VTK_IO_EXPORT
vtkXMLShader
:
public
vtkObject
34
{
35
public
:
36
static
vtkXMLShader
*
New
();
37
vtkTypeMacro(
vtkXMLShader
,
vtkObject
);
38
void
PrintSelf
(ostream& os,
vtkIndent
indent);
39
41
42
vtkGetObjectMacro(RootElement,
vtkXMLDataElement
);
43
void
SetRootElement(
vtkXMLDataElement
*);
45
47
int
GetLanguage();
48
50
int
GetScope();
51
53
int
GetLocation();
54
63
int
GetStyle();
64
66
const
char
* GetName();
67
69
const
char
* GetEntry();
70
72
const
char
* GetCode();
73
76
const
char
** GetArgs();
77
80
static
char
* LocateFile(
const
char
* filename);
81
82
//BTX
83
enum
LanguageCodes
84
{
85
LANGUAGE_NONE=0,
86
LANGUAGE_MIXED
,
87
LANGUAGE_CG
,
88
LANGUAGE_GLSL
89
};
90
91
enum
ScopeCodes
92
{
93
SCOPE_NONE=0,
94
SCOPE_MIXED
,
95
SCOPE_VERTEX
,
96
SCOPE_FRAGMENT
97
};
98
99
enum
LocationCodes
100
{
101
LOCATION_NONE=0,
102
LOCATION_INLINE
,
103
LOCATION_FILE
,
104
LOCATION_LIBRARY
105
};
106
//ETX
107
protected
:
108
vtkXMLShader
();
109
~
vtkXMLShader
();
110
111
// Reads the file and fills it in this->Code.
112
void
ReadCodeFromFile(
const
char
* fullpath);
113
114
char
*
Code
;
// cache for the code.
115
vtkSetStringMacro(Code);
116
117
vtkXMLDataElement
*
RootElement
;
118
vtkXMLDataElement
*
SourceLibraryElement
;
119
void
SetSourceLibraryElement(
vtkXMLDataElement
*);
120
121
char
**
Args
;
122
void
CleanupArgs();
123
private
:
124
vtkXMLShader
(
const
vtkXMLShader
&);
// Not implemented.
125
void
operator=(
const
vtkXMLShader
&);
// Not implemented.
126
};
127
128
#endif
129
Generated on Wed May 30 2012 13:22:19 for VTK by
1.8.1