#include <CVEX_Value.h>
Public Member Functions | |
| CVEX_Value (const char *name, CVEX_Type type, bool varying) | |
| ~CVEX_Value () | |
| const char * | getName () const |
| Query name of VEX value. | |
| CVEX_Type | getType () const |
| Query type of VEX value. | |
| bool | isExport () const |
| Query whether the VEX value is an export (or read-only). | |
| bool | isVarying () const |
| Query whether the VEX value is uniform or varying. | |
| int | getArraySize () const |
| void * | getData () |
| bool | setData (void *data, int array_size) |
| bool | setData (UT_StringArray &stringdata) |
Friends | |
| class | CVEX_Context |
The CVEX_Value objects are created internally in the CVEX library. They provide a mapping from the CVEX library to the underlying VEX representation of objects.
Definition at line 43 of file CVEX_Value.h.
| CVEX_Value::CVEX_Value | ( | const char * | name, | |
| CVEX_Type | type, | |||
| bool | varying | |||
| ) |
| CVEX_Value::~CVEX_Value | ( | ) |
| int CVEX_Value::getArraySize | ( | ) | const [inline] |
Query the array size of the VEX value.
Definition at line 59 of file CVEX_Value.h.
| void* CVEX_Value::getData | ( | ) | [inline] |
Get the raw data pointer. For numeric types, the data refers to a raw array of data (depending on the getType() of the value.
int fpreal32 UT_Vector3 UT_Vector4 UT_Matrix3 UT_Matrix4 For CVEX_TYPE_STRING, the data will point to a UT_StringArray. Definition at line 71 of file CVEX_Value.h.
| const char* CVEX_Value::getName | ( | void | ) | const [inline] |
| CVEX_Type CVEX_Value::getType | ( | ) | const [inline] |
| bool CVEX_Value::isExport | ( | ) | const [inline] |
Query whether the VEX value is an export (or read-only).
Definition at line 53 of file CVEX_Value.h.
| bool CVEX_Value::isVarying | ( | ) | const [inline] |
Query whether the VEX value is uniform or varying.
Definition at line 55 of file CVEX_Value.h.
| bool CVEX_Value::setData | ( | UT_StringArray & | stringdata | ) |
When setting values for string types, you need to pass in a UT_StringArray instead of a void *. For input variables, the length of the array will determine whether the parameter is varying or uniform.
The CVEX_Value object will hold a pointer to the UT_StringArray, so the data must be persistent.
| bool CVEX_Value::setData | ( | void * | data, | |
| int | array_size | |||
| ) |
The array size is NOT the size in bytes, but rather the array size of the input data. It should either be 1 or N, where N is the number of values being computed by VEX.
When passing data for output variables, please check to see whether the output variable is uniform or varying. Varying values need to have a full array of data (including string arrays).
The CVEX_Value object will hold a pointer to the UT_StringArray, so the data must be persistent.
friend class CVEX_Context [friend] |
Definition at line 107 of file CVEX_Value.h.
1.5.9