vtkXMLShader Class Reference

#include <vtkXMLShader.h>

Inheritance diagram for vtkXMLShader:

Inheritance graph
[legend]
Collaboration diagram for vtkXMLShader:

Collaboration graph
[legend]

List of all members.


Detailed Description

encapsulates a Shader XML description.

vtkXMLShader encapsulates the XML description for a Shader. It provides convenient access to various attributes/properties of a shader.

Thanks:
Shader support in VTK includes key contributions by Gary Templet at Sandia National Labs.

Definition at line 33 of file vtkXMLShader.h.


Public Types

enum  LanguageCodes { LANGUAGE_NONE = 0, LANGUAGE_MIXED, LANGUAGE_CG, LANGUAGE_GLSL }
enum  ScopeCodes { SCOPE_NONE = 0, SCOPE_MIXED, SCOPE_VERTEX, SCOPE_FRAGMENT }
enum  LocationCodes { LOCATION_NONE = 0, LOCATION_INLINE, LOCATION_FILE, LOCATION_LIBRARY }
typedef vtkObject Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
int GetLanguage ()
int GetScope ()
int GetLocation ()
const char * GetName ()
const char * GetEntry ()
const char * GetCode ()
const char ** GetArgs ()
virtual vtkXMLDataElementGetRootElement ()
void SetRootElement (vtkXMLDataElement *)

Static Public Member Functions

static vtkXMLShaderNew ()
static int IsTypeOf (const char *type)
static vtkXMLShaderSafeDownCast (vtkObject *o)
static char * LocateFile (const char *filename)

Protected Member Functions

 vtkXMLShader ()
 ~vtkXMLShader ()
void ReadCodeFromFile (const char *fullpath)
virtual void SetCode (const char *)
void SetSourceLibraryElement (vtkXMLDataElement *)
void CleanupArgs ()

Protected Attributes

char * Code
vtkXMLDataElementRootElement
vtkXMLDataElementSourceLibraryElement
char ** Args

Member Typedef Documentation

Reimplemented from vtkObject.

Definition at line 37 of file vtkXMLShader.h.


Member Enumeration Documentation

Enumerator:
LANGUAGE_NONE 
LANGUAGE_MIXED 
LANGUAGE_CG 
LANGUAGE_GLSL 

Definition at line 73 of file vtkXMLShader.h.

Enumerator:
SCOPE_NONE 
SCOPE_MIXED 
SCOPE_VERTEX 
SCOPE_FRAGMENT 

Definition at line 81 of file vtkXMLShader.h.

Enumerator:
LOCATION_NONE 
LOCATION_INLINE 
LOCATION_FILE 
LOCATION_LIBRARY 

Definition at line 89 of file vtkXMLShader.h.


Constructor & Destructor Documentation

vtkXMLShader::vtkXMLShader (  )  [protected]

vtkXMLShader::~vtkXMLShader (  )  [protected]


Member Function Documentation

static vtkXMLShader* vtkXMLShader::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

virtual const char* vtkXMLShader::GetClassName (  )  [virtual]

Reimplemented from vtkObject.

static int vtkXMLShader::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

virtual int vtkXMLShader::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

static vtkXMLShader* vtkXMLShader::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkObject.

void vtkXMLShader::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

virtual vtkXMLDataElement* vtkXMLShader::GetRootElement (  )  [virtual]

Get/Set the XML root element that describes this shader.

void vtkXMLShader::SetRootElement ( vtkXMLDataElement  ) 

Get/Set the XML root element that describes this shader.

int vtkXMLShader::GetLanguage (  ) 

Returns the shader's language as defined in the XML description.

int vtkXMLShader::GetScope (  ) 

Returns the type of the shader as defined in the XML description.

int vtkXMLShader::GetLocation (  ) 

Returns the location of the shader as defined in the XML description.

const char* vtkXMLShader::GetName (  ) 

Get the name of the Shader.

const char* vtkXMLShader::GetEntry (  ) 

Get the entry point to the shader code as defined in the XML.

const char* vtkXMLShader::GetCode (  ) 

Get the shader code.

const char** vtkXMLShader::GetArgs (  ) 

Returns an null terminate array of the pointers to space sepatared Args defined in the XML description.

static char* vtkXMLShader::LocateFile ( const char *  filename  )  [static]

Searches the file in the VTK_MATERIALS_DIRS. Note that this allocates new memory for the string. The caller must delete it.

void vtkXMLShader::ReadCodeFromFile ( const char *  fullpath  )  [protected]

virtual void vtkXMLShader::SetCode ( const char *   )  [protected, virtual]

void vtkXMLShader::SetSourceLibraryElement ( vtkXMLDataElement  )  [protected]

void vtkXMLShader::CleanupArgs (  )  [protected]


Member Data Documentation

char* vtkXMLShader::Code [protected]

Definition at line 104 of file vtkXMLShader.h.

Definition at line 105 of file vtkXMLShader.h.

Definition at line 108 of file vtkXMLShader.h.

char** vtkXMLShader::Args [protected]

Definition at line 111 of file vtkXMLShader.h.


The documentation for this class was generated from the following file:

Generated on Sat Dec 27 14:01:42 2008 for VTK by  doxygen 1.5.6