HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CE_Snippet.h File Reference
#include "CE_API.h"
#include "CE_Precision.h"
#include <UT/UT_String.h>
#include <UT/UT_StringHolder.h>
#include <UT/UT_Vector3.h>
#include <UT/UT_Vector4.h>
#include <UT/UT_Array.h>
#include <UT/UT_SharedPtr.h>
#include <UT/UT_StringMap.h>
#include <UT/UT_Ramp.h>
#include <UT/UT_Error.h>
+ Include dependency graph for CE_Snippet.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CE_Snippet::Binding
 

Namespaces

 CE_Snippet
 

Enumerations

enum  CE_Snippet::RunOver {
  CE_Snippet::RunOver::ATTRIBUTE = 0, CE_Snippet::RunOver::VOLUME, CE_Snippet::RunOver::WORKSETS, CE_Snippet::RunOver::FIELDS,
  CE_Snippet::RunOver::VDB, CE_Snippet::RunOver::LAYER
}
 
enum  CE_Snippet::BindingType {
  CE_Snippet::BindingType::INVALID = -1, CE_Snippet::BindingType::INT, CE_Snippet::BindingType::INTARRAY, CE_Snippet::BindingType::FLOAT,
  CE_Snippet::BindingType::FLOAT2, CE_Snippet::BindingType::FLOAT3, CE_Snippet::BindingType::FLOAT4, CE_Snippet::BindingType::FLOAT8,
  CE_Snippet::BindingType::FLOAT16, CE_Snippet::BindingType::FIELD_S, CE_Snippet::BindingType::FIELD_V, CE_Snippet::BindingType::FIELD_M,
  CE_Snippet::BindingType::RAMP, CE_Snippet::BindingType::ATTRIBUTE, CE_Snippet::BindingType::VOLUME, CE_Snippet::BindingType::VDB,
  CE_Snippet::BindingType::OPTION, CE_Snippet::BindingType::LAYER, CE_Snippet::BindingType::NUM_TYPES
}
 
enum  CE_Snippet::BindingAttribClass { CE_Snippet::BindingAttribClass::DETAIL, CE_Snippet::BindingAttribClass::PRIMITIVE, CE_Snippet::BindingAttribClass::POINT, CE_Snippet::BindingAttribClass::VERTEX }
 
enum  CE_Snippet::BindingAttribType { CE_Snippet::BindingAttribType::FLOAT, CE_Snippet::BindingAttribType::INT, CE_Snippet::BindingAttribType::FLOATARRAY, CE_Snippet::BindingAttribType::INTARRAY }
 
enum  CE_Snippet::BindingVDBType { CE_Snippet::BindingVDBType::ANY, CE_Snippet::BindingVDBType::FLOAT, CE_Snippet::BindingVDBType::VECTOR }
 
enum  CE_Snippet::BindingPrecision { CE_Snippet::BindingPrecision::NODE, CE_Snippet::BindingPrecision::_16, CE_Snippet::BindingPrecision::_32, CE_Snippet::BindingPrecision::_64 }
 
enum  CE_Snippet::BindingTimescale { CE_Snippet::BindingTimescale::NONE, CE_Snippet::BindingTimescale::MULT, CE_Snippet::BindingTimescale::INVERT, CE_Snippet::BindingTimescale::POW }
 
enum  CE_Snippet::BindingRampType { CE_Snippet::BindingRampType::FLOAT, CE_Snippet::BindingRampType::VECTOR }
 
enum  CE_Snippet::BindingLayerType {
  CE_Snippet::BindingLayerType::INT, CE_Snippet::BindingLayerType::FLOAT, CE_Snippet::BindingLayerType::FLOAT2, CE_Snippet::BindingLayerType::FLOAT3,
  CE_Snippet::BindingLayerType::FLOAT4, CE_Snippet::BindingLayerType::FLOATN
}
 
enum  CE_Snippet::BindingLayerBorder {
  CE_Snippet::BindingLayerBorder::INPUT, CE_Snippet::BindingLayerBorder::CONSTANT, CE_Snippet::BindingLayerBorder::CLAMP, CE_Snippet::BindingLayerBorder::MIRROR,
  CE_Snippet::BindingLayerBorder::WRAP
}
 
enum  CE_Snippet::BindingOptionType { CE_Snippet::BindingOptionType::FLOAT, CE_Snippet::BindingOptionType::INT }
 

Functions

CE_API const char * CE_Snippet::bindingTypeToString (BindingType type)
 
CE_API const char * CE_Snippet::bindingAttribClassToString (BindingAttribClass type)
 
CE_API const char * CE_Snippet::bindingAttribTypeToString (BindingAttribType type)
 
CE_API const char * CE_Snippet::bindingVDBTypeToString (BindingVDBType type)
 
CE_API const char * CE_Snippet::bindingPrecisionToString (BindingPrecision type)
 
CE_API const char * CE_Snippet::bindingTimescaleToString (BindingTimescale type)
 
CE_API const char * CE_Snippet::bindingRampTypeToString (BindingRampType type)
 
CE_API const char * CE_Snippet::bindingLayerTypeToString (BindingLayerType type)
 
CE_API const char * CE_Snippet::bindingLayerBorderToString (BindingLayerBorder type)
 
CE_API const char * CE_Snippet::bindingOptionTypeToString (BindingOptionType type)
 
CE_API UT_StringHolder CE_Snippet::protectAts (UT_StringHolder code)
 
CE_API UT_StringHolder CE_Snippet::findIncludeFile (const char *path, bool searchcwd, UT_ErrorManager *error)
 
CE_API UT_StringHolder CE_Snippet::loadImport (const char *path, bool searchcwd, UT_ErrorManager *error)
 Loads an import, searching the include path to locate it. More...
 
CE_API UT_StringHolder CE_Snippet::expandImportDirectives (UT_StringHolder code, UT_ErrorManager *error)
 Expands all #import directives. More...
 
CE_API UT_StringHolder CE_Snippet::extractBindings (UT_StringHolder code, UT_Array< Binding > &bindings, UT_ErrorManager *error)
 
CE_API UT_StringHolder CE_Snippet::generateAtCode (UT_StringHolder code, RunOver runover, UT_Options *opt, UT_StringMap< UT_StringHolder > *globals, UT_StringMap< UT_StringHolder > *missing_globals, const UT_Array< Binding > &bindings, const char *kernelsig, const char *writebacksig, UT_ErrorManager *error)
 
CE_API UT_StringHolder CE_Snippet::restoreAts (UT_StringHolder code)
 Restore protected to be @ again. More...
 
CE_API bool CE_Snippet::parseType (const UT_StringRef &attribtypename, BindingAttribType &attribtype, BindingPrecision &precision, int &tuplesize)
 
CE_API UT_StringHolder CE_Snippet::computeSyntax (const char *code)
 
CE_API void CE_Snippet::buildArgumentSign (const Binding &binding, int p, int maxparam, UT_WorkBuffer &sign, UT_StringHolder &firstwriteable, bool &firstwriteable_forced, BindingVDBType &firstvdbtype, bool prefixbound, RunOver runover, bool fieldsarealigned, UT_WorkBuffer &paraminitcode)
 Append into sign the argument signature for a binding. More...
 
CE_API void CE_Snippet::buildKernelRunOverArguments (UT_WorkBuffer &signature, RunOver runover, bool singleworkgroup, bool filedsarealigned, bool prefixbound)
 
CE_API void CE_Snippet::addKernelArgument (UT_WorkBuffer &signature, const char *type, const char *name, bool prefixbound)
 
CE_API void CE_Snippet::buildKernelRunOverCode (UT_WorkBuffer &signature, RunOver runover, BindingVDBType firstvdbtype, bool singleworkgroup, bool fieldsarealigned, bool firstname_forced, bool prefixbound, UT_StringRef firstname)
 Append into sign the code to start the provided runover mode. More...