VOP/VOP_Types.h File Reference

#include "VOP_API.h"
#include <VEX/VEX_VexTypes.h>
#include <VEX/VEX_RslTypes.h>

Go to the source code of this file.

Defines

#define VOP_BASE_TYPE(type)   ((VOP_Type)(type&(VOP_TYPE_UNIFORM_MODIFIER-1)))
#define VOP_GET_MODIFIER(type)   ((VOP_Type)(type&VOP_TYPE_UNIFORM_MODIFIER))
#define VOP_INVALID_TYPE(type)   ((type)==VOP_TYPE_UNDEF||(type)==VOP_TYPE_ERROR)
#define VOP_VALID_TYPE(type)   (!VOP_INVALID_TYPE(type))
#define VOP_CONTEXT_TYPE_INVALID   0

Typedefs

typedef int VOP_ContextType
typedef UT_RefArray
< VOP_ContextType
VOP_ContextTypeList
 A definition of the context type list.

Enumerations

enum  VOP_Type {
  VOP_TYPE_UNDEF = VEX_TYPE_UNDEF, VOP_TYPE_VECTOR4 = VEX_TYPE_POINT, VOP_TYPE_VECTOR = VEX_TYPE_VECTOR, VOP_TYPE_FLOAT = VEX_TYPE_FLOAT,
  VOP_TYPE_INTEGER = VEX_TYPE_INTEGER, VOP_TYPE_STRING = VEX_TYPE_STRING, VOP_TYPE_MATRIX3 = VEX_TYPE_MATRIX3, VOP_TYPE_MATRIX4 = VEX_TYPE_MATRIX4,
  VOP_TYPE_BSDF = VEX_TYPE_BSDF, VOP_TYPE_STRUCT, VOP_TYPE_VECTOR4_ARRAY, VOP_TYPE_VECTOR_ARRAY,
  VOP_TYPE_FLOAT_ARRAY, VOP_TYPE_INTEGER_ARRAY, VOP_TYPE_STRING_ARRAY, VOP_TYPE_MATRIX3_ARRAY,
  VOP_TYPE_MATRIX4_ARRAY, VOP_TYPE_POINT, VOP_TYPE_NORMAL, VOP_TYPE_COLOR,
  VOP_TYPE_ERROR, VOP_SHADER_START, VOP_SURFACE_SHADER, VOP_SURFACE_SHADOW_SHADER,
  VOP_DISPLACEMENT_SHADER, VOP_GEOMETRY_SHADER, VOP_INTERIOR_SHADER, VOP_LIGHT_SHADER,
  VOP_LIGHT_SHADOW_SHADER, VOP_ATMOSPHERE_SHADER, VOP_LENS_SHADER, VOP_OUTPUT_SHADER,
  VOP_BACKGROUND_SHADER, VOP_PHOTON_SHADER, VOP_EMITTER_SHADER, VOP_PHOTONVOLUME_SHADER,
  VOP_ENVIRONMENT_SHADER, VOP_CONTOUR_SHADER, VOP_CONTOUR_STORE_SHADER, VOP_CONTOUR_CONTRAST_SHADER,
  VOP_TEXTURE_SHADER, VOP_IMAGE3D_SHADER, VOP_POP_SHADER, VOP_SOP_SHADER,
  VOP_CHOP_SHADER, VOP_COP2_SHADER, VOP_CVEX_SHADER, VOP_COSHADER_SHADER,
  VOP_PROPERTIES_SHADER, VOP_MUTABLE_SHADER, VOP_MATERIAL_SHADER, VOP_VOP_MATERIAL_SHADER,
  VOP_SHADER_END, VOP_MAX_TYPES, VOP_TYPE_UNIFORM_MODIFIER = 0x1000, VOP_TYPE_UFLOAT = (VOP_TYPE_UNIFORM_MODIFIER | VOP_TYPE_FLOAT),
  VOP_TYPE_UVECTOR = (VOP_TYPE_UNIFORM_MODIFIER | VOP_TYPE_VECTOR), VOP_TYPE_UPOINT = (VOP_TYPE_UNIFORM_MODIFIER | VOP_TYPE_POINT), VOP_TYPE_UNORMAL = (VOP_TYPE_UNIFORM_MODIFIER | VOP_TYPE_NORMAL), VOP_TYPE_UCOLOR = (VOP_TYPE_UNIFORM_MODIFIER | VOP_TYPE_COLOR),
  VOP_TYPE_UMATRIX4 = (VOP_TYPE_UNIFORM_MODIFIER | VOP_TYPE_MATRIX4)
}
enum  VOP_LanguageType { VOP_LANGUAGE_INVALID, VOP_LANGUAGE_VEX, VOP_LANGUAGE_RSL }

Functions

VOP_API bool VOPisArrayType (VOP_Type type)
 Returns true if the type is some kind of an array, and false otherwise.
VOP_API int VOPgetTypeSize (VOP_Type type)
VOP_API VEX_ContextType VOPconvertToVexContextType (VOP_Type shader_type)
 Converts a VOP shader type to a corresponding VEX context type.
VOP_API RSL_ContextType VOPconvertToRslContextType (VOP_Type shader_type)
 Converts a VOP shader type to a corresponding RSL context type.
VOP_API VOP_Type VOPconvertToShaderType (VEX_ContextType type)
 Converts a VEX context type to a corresponding VOP shader type.
VOP_API VOP_Type VOPconvertToShaderType (RSL_ContextType type)
 Converts a RSL context type to a corresponding VOP shader type.
VOP_API VOP_ContextType VOPconvertToContextType (VOP_Type shader_type, VOP_LanguageType language)
VOP_API VOP_Type VOPconvertToShaderType (VOP_ContextType type, VOP_LanguageType language)
 Converts the context type to a 'shader type'.
VOP_API VOP_ContextType VOPconvertToContextType (VEX_ContextType type)
 Utility function to turn VEX_ContextType into VOP_ContextType.
VOP_API VOP_ContextType VOPconvertToContextType (RSL_ContextType type)
 Utility function to turn RSL_ContextType into VOP_ContextType.
VOP_API VEX_ContextType VOPconvertToVexContextType (VOP_ContextType type)
 Utility function to turn VOP_ContextType into VEX_ContextType.
VOP_API RSL_ContextType VOPconvertToRslContextType (VOP_ContextType type)
 Utility function to turn VOP_ContextType into RSL_ContextType.
VOP_API bool isValidPassThroughType (VOP_Type type)
VOP_API VOP_ContextType VOPconvertToContextType (const char *context_name, VOP_LanguageType language)
VOP_API const char * VOPgetContextTypeName (VOP_ContextType context_type, VOP_LanguageType language)
VOP_API const char * VOPgetContextTypeLabel (VOP_ContextType context_type, VOP_LanguageType language)


Define Documentation

#define VOP_BASE_TYPE ( type   )     ((VOP_Type)(type&(VOP_TYPE_UNIFORM_MODIFIER-1)))

Definition at line 105 of file VOP_Types.h.

#define VOP_CONTEXT_TYPE_INVALID   0

Definition at line 133 of file VOP_Types.h.

#define VOP_GET_MODIFIER ( type   )     ((VOP_Type)(type&VOP_TYPE_UNIFORM_MODIFIER))

Definition at line 106 of file VOP_Types.h.

#define VOP_INVALID_TYPE ( type   )     ((type)==VOP_TYPE_UNDEF||(type)==VOP_TYPE_ERROR)

Definition at line 107 of file VOP_Types.h.

#define VOP_VALID_TYPE ( type   )     (!VOP_INVALID_TYPE(type))

Definition at line 108 of file VOP_Types.h.


Typedef Documentation

typedef int VOP_ContextType

A generic shader context type that can be interpreted as VEX_ContextType or RSL_ContextType

Definition at line 132 of file VOP_Types.h.

A definition of the context type list.

Definition at line 136 of file VOP_Types.h.


Enumeration Type Documentation

Defines the known languages. Each of the languages has own set of context types.

Enumerator:
VOP_LANGUAGE_INVALID 
VOP_LANGUAGE_VEX 
VOP_LANGUAGE_RSL 

Definition at line 140 of file VOP_Types.h.

enum VOP_Type

Enumerator:
VOP_TYPE_UNDEF 
VOP_TYPE_VECTOR4 
VOP_TYPE_VECTOR 
VOP_TYPE_FLOAT 
VOP_TYPE_INTEGER 
VOP_TYPE_STRING 
VOP_TYPE_MATRIX3 
VOP_TYPE_MATRIX4 
VOP_TYPE_BSDF 
VOP_TYPE_STRUCT 
VOP_TYPE_VECTOR4_ARRAY 
VOP_TYPE_VECTOR_ARRAY 
VOP_TYPE_FLOAT_ARRAY 
VOP_TYPE_INTEGER_ARRAY 
VOP_TYPE_STRING_ARRAY 
VOP_TYPE_MATRIX3_ARRAY 
VOP_TYPE_MATRIX4_ARRAY 
VOP_TYPE_POINT 
VOP_TYPE_NORMAL 
VOP_TYPE_COLOR 
VOP_TYPE_ERROR 
VOP_SHADER_START 
VOP_SURFACE_SHADER 
VOP_SURFACE_SHADOW_SHADER 
VOP_DISPLACEMENT_SHADER 
VOP_GEOMETRY_SHADER 
VOP_INTERIOR_SHADER 
VOP_LIGHT_SHADER 
VOP_LIGHT_SHADOW_SHADER 
VOP_ATMOSPHERE_SHADER 
VOP_LENS_SHADER 
VOP_OUTPUT_SHADER 
VOP_BACKGROUND_SHADER 
VOP_PHOTON_SHADER 
VOP_EMITTER_SHADER 
VOP_PHOTONVOLUME_SHADER 
VOP_ENVIRONMENT_SHADER 
VOP_CONTOUR_SHADER 
VOP_CONTOUR_STORE_SHADER 
VOP_CONTOUR_CONTRAST_SHADER 
VOP_TEXTURE_SHADER 
VOP_IMAGE3D_SHADER 
VOP_POP_SHADER 
VOP_SOP_SHADER 
VOP_CHOP_SHADER 
VOP_COP2_SHADER 
VOP_CVEX_SHADER 
VOP_COSHADER_SHADER 
VOP_PROPERTIES_SHADER 
VOP_MUTABLE_SHADER 
VOP_MATERIAL_SHADER 
VOP_VOP_MATERIAL_SHADER 
VOP_SHADER_END 
VOP_MAX_TYPES 
VOP_TYPE_UNIFORM_MODIFIER 
VOP_TYPE_UFLOAT 
VOP_TYPE_UVECTOR 
VOP_TYPE_UPOINT 
VOP_TYPE_UNORMAL 
VOP_TYPE_UCOLOR 
VOP_TYPE_UMATRIX4 

Definition at line 30 of file VOP_Types.h.


Function Documentation

VOP_API bool isValidPassThroughType ( VOP_Type  type  ) 

VOP_API VOP_ContextType VOPconvertToContextType ( RSL_ContextType  type  ) 

Utility function to turn RSL_ContextType into VOP_ContextType.

VOP_API VOP_ContextType VOPconvertToContextType ( VEX_ContextType  type  ) 

Utility function to turn VEX_ContextType into VOP_ContextType.

VOP_API VOP_ContextType VOPconvertToContextType ( const char *  context_name,
VOP_LanguageType  language 
)

Utility function to find out the context type based on the token name (plus the language type), and vice versa.

VOP_API VOP_ContextType VOPconvertToContextType ( VOP_Type  shader_type,
VOP_LanguageType  language 
)

Converts the 'shader_type' based on a language to a VEX or RSL context type encoded into the returned value of VOP_ContextType.

Examples:
SOP/SOP_PrimVOP.C.

VOP_API RSL_ContextType VOPconvertToRslContextType ( VOP_ContextType  type  ) 

Utility function to turn VOP_ContextType into RSL_ContextType.

VOP_API RSL_ContextType VOPconvertToRslContextType ( VOP_Type  shader_type  ) 

Converts a VOP shader type to a corresponding RSL context type.

VOP_API VOP_Type VOPconvertToShaderType ( VOP_ContextType  type,
VOP_LanguageType  language 
)

Converts the context type to a 'shader type'.

VOP_API VOP_Type VOPconvertToShaderType ( RSL_ContextType  type  ) 

Converts a RSL context type to a corresponding VOP shader type.

VOP_API VOP_Type VOPconvertToShaderType ( VEX_ContextType  type  ) 

Converts a VEX context type to a corresponding VOP shader type.

VOP_API VEX_ContextType VOPconvertToVexContextType ( VOP_ContextType  type  ) 

Utility function to turn VOP_ContextType into VEX_ContextType.

VOP_API VEX_ContextType VOPconvertToVexContextType ( VOP_Type  shader_type  ) 

Converts a VOP shader type to a corresponding VEX context type.

VOP_API const char* VOPgetContextTypeLabel ( VOP_ContextType  context_type,
VOP_LanguageType  language 
)

Utility function to find out the context type based on the token name (plus the language type), and vice versa.

VOP_API const char* VOPgetContextTypeName ( VOP_ContextType  context_type,
VOP_LanguageType  language 
)

Utility function to find out the context type based on the token name (plus the language type), and vice versa.

VOP_API int VOPgetTypeSize ( VOP_Type  type  ) 

Returns the approximate number of fields in a type. For float, for example, returns 1, for color - 3. For arrays and strings returns 1.

VOP_API bool VOPisArrayType ( VOP_Type  type  ) 

Returns true if the type is some kind of an array, and false otherwise.


Generated on Thu Jan 31 00:29:17 2013 for HDK by  doxygen 1.5.9