VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
XML
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 "vtkIOXMLModule.h"
// For export macro
30
#include "
vtkObject.h
"
31
32
class
vtkXMLDataElement
;
33
34
class
VTKIOXML_EXPORT
vtkXMLShader
:
public
vtkObject
35
{
36
public
:
37
static
vtkXMLShader
*
New
();
38
vtkTypeMacro(
vtkXMLShader
,
vtkObject
);
39
void
PrintSelf
(ostream& os,
vtkIndent
indent);
40
42
43
vtkGetObjectMacro(RootElement,
vtkXMLDataElement
);
44
void
SetRootElement(
vtkXMLDataElement
*);
46
48
int
GetLanguage();
49
51
int
GetScope();
52
54
int
GetLocation();
55
64
int
GetStyle();
65
67
const
char
* GetName();
68
70
const
char
* GetEntry();
71
73
const
char
* GetCode();
74
77
const
char
** GetArgs();
78
81
static
char
* LocateFile(
const
char
* filename);
82
83
//BTX
84
enum
LanguageCodes
85
{
86
LANGUAGE_NONE=0,
87
LANGUAGE_MIXED
,
88
LANGUAGE_CG
,
89
LANGUAGE_GLSL
90
};
91
92
enum
ScopeCodes
93
{
94
SCOPE_NONE=0,
95
SCOPE_MIXED
,
96
SCOPE_VERTEX
,
97
SCOPE_FRAGMENT
98
};
99
100
enum
LocationCodes
101
{
102
LOCATION_NONE=0,
103
LOCATION_INLINE
,
104
LOCATION_FILE
,
105
LOCATION_LIBRARY
106
};
107
//ETX
108
protected
:
109
vtkXMLShader
();
110
~
vtkXMLShader
();
111
112
// Reads the file and fills it in this->Code.
113
void
ReadCodeFromFile(
const
char
* fullpath);
114
115
char
*
Code
;
// cache for the code.
116
vtkSetStringMacro(Code);
117
118
vtkXMLDataElement
*
RootElement
;
119
vtkXMLDataElement
*
SourceLibraryElement
;
120
void
SetSourceLibraryElement(
vtkXMLDataElement
*);
121
122
char
**
Args
;
123
void
CleanupArgs();
124
private
:
125
vtkXMLShader
(
const
vtkXMLShader
&);
// Not implemented.
126
void
operator=(
const
vtkXMLShader
&);
// Not implemented.
127
};
128
129
#endif
130
Generated on Fri May 25 2012 22:39:32 for VTK by
1.8.1