HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_IntrinsicMacros.h File Reference
#include <GA/GA_IntrinsicDef.h>
#include <GA/GA_IntrinsicEval.h>
#include <UT/UT_Assert.h>
#include <UT/UT_StringArray.h>
#include <UT/UT_StackAlloc.h>
#include <stdio.h>
+ Include dependency graph for GA_IntrinsicMacros.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GA_START_INTRINSIC_DEF(CLASS, NUM_INTRINSICS)
 
#define GA_END_INTRINSIC_DEF(CLASS, BASECLASS)
 
#define GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, STORAGE)
 
#define GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, STORAGE)
 
#define GA_INTRINSIC_OPTIONS(ID, OPTIONS)   myEval[ID].myOptions = &OPTIONS;
 
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)   GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_INT)
 
#define GA_INTRINSIC_DEF_VARYING_I(ID, NAME, TUPLESIZE_FUNC)   GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_INT)
 
#define GA_INTRINSIC_I(CLASS, ID, NAME, EVAL)
 
#define GA_INTRINSIC_CONST_I(CLASS, ID, NAME, VALUE)
 
#define GA_INTRINSIC_METHOD_I(CLASS, ID, NAME, METHOD)
 
#define GA_INTRINSIC_TUPLE_I(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_TUPLE_METHOD_I(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_ARRAY_I(CLASS, ID, NAME, ARRAY_TYPE, METHOD)
 
#define GA_INTRINSIC_VARYING_I(CLASS, ID, NAME, TSIZE, EVAL)
 
#define GA_INTRINSIC_SET_I(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_METHOD_I(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_SET_TUPLE_I(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_TUPLE_METHOD_I(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)   GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_FLOAT)
 
#define GA_INTRINSIC_DEF_VARYING_F(ID, NAME, TUPLESIZE_FUNC)   GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_FLOAT)
 
#define GA_INTRINSIC_F(CLASS, ID, NAME, EVAL)
 
#define GA_INTRINSIC_CONST_F(CLASS, ID, NAME, VALUE)
 
#define GA_INTRINSIC_METHOD_F(CLASS, ID, NAME, METHOD)
 
#define GA_INTRINSIC_TUPLE_F(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_TUPLE_METHOD_F(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_ARRAY_F(CLASS, ID, NAME, ARRAY_TYPE, METHOD)
 
#define GA_INTRINSIC_VARYING_F(CLASS, ID, NAME, TSIZE, EVAL)
 
#define GA_INTRINSIC_SET_F(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_METHOD_F(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_SET_TUPLE_F(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_TUPLE_METHOD_F(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)   GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_STRING)
 
#define GA_INTRINSIC_DEF_VARYING_S(ID, NAME, TUPLESIZE_FUNC)   GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_STRING)
 
#define GA_INTRINSIC_S(CLASS, ID, NAME, EVAL)
 
#define GA_INTRINSIC_CONST_S(CLASS, ID, NAME, VALUE)
 
#define GA_INTRINSIC_METHOD_S(CLASS, ID, NAME, METHOD)
 
#define GA_INTRINSIC_TUPLE_S(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_TUPLE_METHOD_S(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_ARRAY_S(CLASS, ID, NAME, ARRAY_TYPE, METHOD)
 
#define GA_INTRINSIC_VARYING_S(CLASS, ID, NAME, TSIZE, EVAL)
 
#define GA_INTRINSIC_SET_S(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_METHOD_S(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_SET_TUPLE_S(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_TUPLE_METHOD_S(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)   GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_DICT)
 
#define GA_INTRINSIC_DEF_VARYING_D(ID, NAME, TUPLESIZE_FUNC)   GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_DICT)
 
#define GA_INTRINSIC_D(CLASS, ID, NAME, EVAL)
 
#define GA_INTRINSIC_CONST_D(CLASS, ID, NAME, VALUE)
 
#define GA_INTRINSIC_METHOD_D(CLASS, ID, NAME, METHOD)
 
#define GA_INTRINSIC_TUPLE_D(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_TUPLE_METHOD_D(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_ARRAY_D(CLASS, ID, NAME, ARRAY_TYPE, METHOD)
 
#define GA_INTRINSIC_VARYING_D(CLASS, ID, NAME, TSIZE, EVAL)
 
#define GA_INTRINSIC_SET_D(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_METHOD_D(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_SET_TUPLE_D(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_TUPLE_METHOD_D(CLASS, ID, METHOD)
 

Macro Definition Documentation

#define GA_END_INTRINSIC_DEF (   CLASS,
  BASECLASS 
)
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 276 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_ARRAY_D (   CLASS,
  ID,
  NAME,
  ARRAY_TYPE,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size tsize(const CLASS *o) { return o->METHOD().entries(); } \
static GA_Size eval(const CLASS *o, UT_Array<UT_OptionsHolder> &v) \
{ \
const ARRAY_TYPE &array = o->METHOD(); \
for (exint i = 0; i < size; ++i) { v[i].append(array(i)); } \
return v.entries(); \
} \
}; \
GA_INTRINSIC_DEF_VARYING_D(ID, NAME, callbacks::tsize) \
myEval[ID].myDA = callbacks::eval; \
}
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
GLsizeiptr size
Definition: glcorearb.h:663
GLenum array
Definition: glew.h:9108
const GLdouble * v
Definition: glcorearb.h:836
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_VARYING_D(ID, NAME, TUPLESIZE_FUNC)
#define const
Definition: zconf.h:214
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 852 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_ARRAY_F (   CLASS,
  ID,
  NAME,
  ARRAY_TYPE,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size tsize(const CLASS *o) { return o->METHOD().entries(); } \
static GA_Size eval(const CLASS *o, fpreal64 *v, GA_Size size) \
{ \
const ARRAY_TYPE &array = o->METHOD(); \
size = SYSmin(size, array.entries()); \
for (exint i = 0; i < size; ++i) { v[i] = array(i); } \
return size; \
} \
}; \
GA_INTRINSIC_DEF_VARYING_F(ID, NAME, callbacks::tsize) \
myEval[ID].myF = callbacks::eval; \
}
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
GLsizeiptr size
Definition: glcorearb.h:663
double fpreal64
Definition: SYS_Types.h:201
GLenum array
Definition: glew.h:9108
const GLdouble * v
Definition: glcorearb.h:836
#define GA_INTRINSIC_DEF_VARYING_F(ID, NAME, TUPLESIZE_FUNC)
HUSD_API bool eval(VtValue &val, T &ret_val)
#define const
Definition: zconf.h:214
#define SYSmin(a, b)
Definition: SYS_Math.h:1536
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 623 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_ARRAY_I (   CLASS,
  ID,
  NAME,
  ARRAY_TYPE,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size tsize(const CLASS *o) { return o->METHOD().entries(); } \
static GA_Size eval(const CLASS *o, int64 *v, GA_Size size) \
{ \
const ARRAY_TYPE &array = o->METHOD(); \
size = SYSmin(size, array.entries()); \
for (exint i = 0; i < size; ++i) { v[i] = array(i); } \
return size; \
} \
}; \
GA_INTRINSIC_DEF_VARYING_I(ID, NAME, callbacks::tsize) \
myEval[ID].myI = callbacks::eval; \
}
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
GLsizeiptr size
Definition: glcorearb.h:663
GLenum array
Definition: glew.h:9108
const GLdouble * v
Definition: glcorearb.h:836
long long int64
Definition: SYS_Types.h:116
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_VARYING_I(ID, NAME, TUPLESIZE_FUNC)
#define const
Definition: zconf.h:214
#define SYSmin(a, b)
Definition: SYS_Math.h:1536
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 504 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_ARRAY_S (   CLASS,
  ID,
  NAME,
  ARRAY_TYPE,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size tsize(const CLASS *o) { return o->METHOD().entries(); } \
static GA_Size eval(const CLASS *o, UT_StringArray &v) \
{ \
const ARRAY_TYPE &array = o->METHOD(); \
for (exint i = 0; i < size; ++i) { v[i].append(array(i)); } \
return v.entries(); \
} \
}; \
GA_INTRINSIC_DEF_VARYING_S(ID, NAME, callbacks::tsize) \
myEval[ID].mySA = callbacks::eval; \
}
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
GLsizeiptr size
Definition: glcorearb.h:663
GLenum array
Definition: glew.h:9108
const GLdouble * v
Definition: glcorearb.h:836
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_VARYING_S(ID, NAME, TUPLESIZE_FUNC)
#define const
Definition: zconf.h:214
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 727 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_CONST_D (   CLASS,
  ID,
  NAME,
  VALUE 
)
Value:
{ \
struct callbacks { \
static GA_Size evalD(const CLASS *, UT_OptionsHolder &v) \
{ v = VALUE; return 1; } \
static GA_Size evalDA(const CLASS *, UT_Array<UT_OptionsHolder> &v) \
{ v.append(VALUE); return 1; } \
}; \
GA_INTRINSIC_DEF_D(ID, NAME, 1) \
myEval[ID].myD = callbacks::evalD; \
myEval[ID].myDA = callbacks::evalDA; \
}
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836

Definition at line 818 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_CONST_F (   CLASS,
  ID,
  NAME,
  VALUE 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *, fpreal64 *v, GA_Size) \
{ v[0] = VALUE; return 1; } \
}; \
GA_INTRINSIC_DEF_F(ID, NAME, 1) \
myEval[ID].myF = callbacks::eval; \
}
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 595 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_CONST_I (   CLASS,
  ID,
  NAME,
  VALUE 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *, int64 *v, GA_Size) \
{ v[0] = VALUE; return 1; } \
static GA_Size evalF(const CLASS *, fpreal64 *v, GA_Size) \
{ v[0] = VALUE; return 1; } \
}; \
GA_INTRINSIC_DEF_I(ID, NAME, 1) \
myEval[ID].myI = callbacks::eval; \
myEval[ID].myF = callbacks::evalF; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836
long long int64
Definition: SYS_Types.h:116
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)

Definition at line 456 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_CONST_S (   CLASS,
  ID,
  NAME,
  VALUE 
)
Value:
{ \
struct callbacks { \
static GA_Size evalS(const CLASS *, UT_String &v) \
{ v = VALUE; return 1; } \
static GA_Size evalSA(const CLASS *, UT_StringArray &v) \
{ v.append(VALUE); return 1; } \
}; \
GA_INTRINSIC_DEF_S(ID, NAME, 1) \
myEval[ID].myS = callbacks::evalS; \
myEval[ID].mySA = callbacks::evalSA; \
}
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836

Definition at line 693 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_D (   CLASS,
  ID,
  NAME,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size evalD(const CLASS *o, UT_OptionsHolder &v) \
{ v = EVAL(o); return 1; } \
static GA_Size evalDA(const CLASS *o, UT_Array<UT_OptionsHolder> &v) \
{ v.append(EVAL(o)); return 1; } \
}; \
GA_INTRINSIC_DEF_D(ID, NAME, 1) \
myEval[ID].myD = callbacks::evalD; \
myEval[ID].myDA = callbacks::evalDA; \
}
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836

Definition at line 807 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF (   ID,
  NAME,
  TUPLESIZE,
  STORAGE 
)
Value:
myEval[ID].myId = ID; \
myEval[ID].myName = NAME; \
myEval[ID].myStore = STORAGE; \
myEval[ID].myTupleSize = TUPLESIZE;

Definition at line 421 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_D (   ID,
  NAME,
  TUPLESIZE 
)    GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_DICT)

Definition at line 801 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_F (   ID,
  NAME,
  TUPLESIZE 
)    GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_FLOAT)

Definition at line 581 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_I (   ID,
  NAME,
  TUPLESIZE 
)    GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_INT)

Definition at line 439 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_S (   ID,
  NAME,
  TUPLESIZE 
)    GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_STRING)

Definition at line 676 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_VARYING (   ID,
  NAME,
  TUPLESIZE_FUNC,
  STORAGE 
)
Value:
myEval[ID].myId = ID; \
myEval[ID].myName = NAME; \
myEval[ID].myStore = STORAGE; \
myEval[ID].myTupleSizeCB = TUPLESIZE_FUNC;

Definition at line 426 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_VARYING_D (   ID,
  NAME,
  TUPLESIZE_FUNC 
)    GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_DICT)

Definition at line 804 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_VARYING_F (   ID,
  NAME,
  TUPLESIZE_FUNC 
)    GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_FLOAT)

Definition at line 584 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_VARYING_I (   ID,
  NAME,
  TUPLESIZE_FUNC 
)    GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_INT)

Definition at line 442 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_VARYING_S (   ID,
  NAME,
  TUPLESIZE_FUNC 
)    GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_STRING)

Definition at line 679 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_F (   CLASS,
  ID,
  NAME,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, fpreal64 *v, GA_Size) \
{ v[0] = EVAL(o); return 1; } \
}; \
GA_INTRINSIC_DEF_F(ID, NAME, 1) \
myEval[ID].myF = callbacks::eval; \
}
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 587 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_I (   CLASS,
  ID,
  NAME,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, int64 *v, GA_Size) \
{ v[0] = EVAL(o); return 1; } \
static GA_Size evalF(const CLASS *o, fpreal64 *v, GA_Size) \
{ v[0] = EVAL(o); return 1; } \
}; \
GA_INTRINSIC_DEF_I(ID, NAME, 1) \
myEval[ID].myI = callbacks::eval; \
myEval[ID].myF = callbacks::evalF; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836
long long int64
Definition: SYS_Types.h:116
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 445 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_METHOD_D (   CLASS,
  ID,
  NAME,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size evalD(const CLASS *o, UT_OptionsHolder &v) \
{ v = o->METHOD(); return 1; } \
static GA_Size evalDA(const CLASS *o, UT_Array<UT_OptionsHolder> &v) \
{ v.append(o->METHOD()); return 1; } \
}; \
GA_INTRINSIC_DEF_D(ID, NAME, 1) \
myEval[ID].myD = callbacks::evalD; \
myEval[ID].myDA = callbacks::evalDA; \
}
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836

Definition at line 829 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_METHOD_F (   CLASS,
  ID,
  NAME,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, fpreal64 *v, GA_Size) \
{ v[0] = o->METHOD(); return 1; } \
}; \
GA_INTRINSIC_DEF_F(ID, NAME, 1) \
myEval[ID].myF = callbacks::eval; \
}
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 603 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_METHOD_I (   CLASS,
  ID,
  NAME,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, int64 *v, GA_Size) \
{ v[0] = o->METHOD(); return 1; } \
static GA_Size evalF(const CLASS *o, fpreal64 *v, GA_Size) \
{ v[0] = o->METHOD(); return 1; } \
}; \
GA_INTRINSIC_DEF_I(ID, NAME, 1) \
myEval[ID].myI = callbacks::eval; \
myEval[ID].myF = callbacks::evalF; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836
long long int64
Definition: SYS_Types.h:116
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)

Definition at line 467 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_METHOD_S (   CLASS,
  ID,
  NAME,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size evalS(const CLASS *o, UT_String &v) \
{ v = o->METHOD(); return 1; } \
static GA_Size evalSA(const CLASS *o, UT_StringArray &v) \
{ v.append(o->METHOD()); return 1; } \
}; \
GA_INTRINSIC_DEF_S(ID, NAME, 1) \
myEval[ID].myS = callbacks::evalS; \
myEval[ID].mySA = callbacks::evalSA; \
}
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836

Definition at line 704 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_OPTIONS (   ID,
  OPTIONS 
)    myEval[ID].myOptions = &OPTIONS;

Definition at line 435 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_S (   CLASS,
  ID,
  NAME,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size evalS(const CLASS *o, UT_String &v) \
{ v = EVAL(o); return 1; } \
static GA_Size evalSA(const CLASS *o, UT_StringArray &v) \
{ v.append(EVAL(o)); return 1; } \
}; \
GA_INTRINSIC_DEF_S(ID, NAME, 1) \
myEval[ID].myS = callbacks::evalS; \
myEval[ID].mySA = callbacks::evalSA; \
}
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 682 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_D (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setDS(CLASS *o, const UT_OptionsHolder *v, GA_Size sz) \
{ return SETFUNC(o, v[0]) ? 1 : 0; } \
static GA_Size setDA(CLASS *o, const UT_Array<UT_OptionsHolder> &a) \
{ return SETFUNC(o, a(0)) ? 1 : 0; } \
}; \
myEval[ID].mySetDS = callbacks::setDS; \
myEval[ID].mySetDA = callbacks::setDA; \
myEval[ID].myReadOnly = false; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221

Definition at line 870 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_F (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ SETFUNC(o, v[0]); return 1; } \
}; \
myEval[ID].mySetF = callbacks::setFunc; \
myEval[ID].myReadOnly = false; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836

Definition at line 642 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_I (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const int64 *v, GA_Size sz) \
{ return SETFUNC(o, v[0]) ? 1 : 0; } \
static GA_Size setFuncF(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ return SETFUNC(o, v[0]) ? 1 : 0; } \
}; \
myEval[ID].mySetI = callbacks::setFunc; \
myEval[ID].mySetF = callbacks::setFuncF; \
myEval[ID].myReadOnly = false; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836
long long int64
Definition: SYS_Types.h:116

Definition at line 523 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_METHOD_D (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setDS(CLASS *o, const UT_OptionsHolder *v, GA_Size) \
{ return o->METHOD(v[0]) ? 1 : 0; } \
static GA_Size setDA(CLASS *o, const UT_Array<UT_OptionsHolder> &a) \
{ return o->METHOD(a(0)) ? 1 : 0; } \
}; \
myEval[ID].mySetDS = callbacks::setDS; \
myEval[ID].mySetDA = callbacks::setDA; \
myEval[ID].myReadOnly = false; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221

Definition at line 881 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_METHOD_F (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ o->METHOD(v[0]); return 1; } \
}; \
myEval[ID].mySetF = callbacks::setFunc; \
myEval[ID].myReadOnly = false; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836

Definition at line 650 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_METHOD_I (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const int64 *v, GA_Size sz) \
{ return o->METHOD(v[0]) ? 1 : 0; } \
static GA_Size setFuncF(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ return o->METHOD(v[0]) ? 1 : 0; } \
}; \
myEval[ID].mySetI = callbacks::setFunc; \
myEval[ID].mySetF = callbacks::setFuncF; \
myEval[ID].myReadOnly = false; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836
long long int64
Definition: SYS_Types.h:116

Definition at line 534 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_METHOD_S (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setSS(CLASS *o, const char **v, GA_Size) \
{ return o->METHOD(v[0]) ? 1 : 0; } \
static GA_Size setSA(CLASS *o, const UT_StringArray &a) \
{ return o->METHOD(a(0)) ? 1 : 0; } \
}; \
myEval[ID].mySetSS = callbacks::setSS; \
myEval[ID].mySetSA = callbacks::setSA; \
myEval[ID].myReadOnly = false; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221

Definition at line 756 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_S (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setSS(CLASS *o, const char **v, GA_Size sz) \
{ return SETFUNC(o, v[0]) ? 1 : 0; } \
static GA_Size setSA(CLASS *o, const UT_StringArray &a) \
{ return SETFUNC(o, a(0)) ? 1 : 0; } \
}; \
myEval[ID].mySetSS = callbacks::setSS; \
myEval[ID].mySetSA = callbacks::setSA; \
myEval[ID].myReadOnly = false; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221

Definition at line 745 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_D (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setDA(CLASS *o, const UT_Array<UT_OptionsHolder> &a) \
{ return SETFUNC(o, a); } \
static GA_Size setDS(CLASS *o, const UT_OptionsHolder *v, GA_Size sz) \
{ \
UT_Array<UT_OptionsHolder> array; \
array.resize(sz); \
for (exint i = 0; i < sz; ++i) array(i) = v[i]; \
return SETFUNC(o, array); \
} \
}; \
myEval[ID].mySetDS = callbacks::setDS; \
myEval[ID].mySetDA = callbacks::setDA; \
myEval[ID].myReadOnly = false; \
}
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
GLenum array
Definition: glew.h:9108
const GLdouble * v
Definition: glcorearb.h:836
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 892 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_F (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ return SETFUNC(o, v, sz); } \
}; \
myEval[ID].mySetF = callbacks::setFunc; \
myEval[ID].myReadOnly = false; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836

Definition at line 658 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_I (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const int64 *v, GA_Size sz) \
{ return SETFUNC(o, v, sz); } \
static GA_Size setFuncF(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ \
int64 *tmp = (int64 *)UTstackAlloc(sizeof(int64) * sz); \
for (exint i = 0; i < sz; i++) { tmp[i] = v[i]; } \
int result = SETFUNC(o, tmp, sz); \
UTstackFree(tmp); \
return result; \
} \
}; \
myEval[ID].mySetI = callbacks::setFunc; \
myEval[ID].mySetF = callbacks::setFuncF; \
myEval[ID].myReadOnly = false; \
}
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
#define UTstackAlloc(size)
Definition: UT_StackAlloc.h:34
GLuint64EXT * result
Definition: glew.h:14311
const GLdouble * v
Definition: glcorearb.h:836
long long int64
Definition: SYS_Types.h:116
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
#define UTstackFree(ptr)
Definition: UT_StackAlloc.h:38

Definition at line 545 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_METHOD_D (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setDA(CLASS *o, const UT_Array<UT_OptionsHolder> &a) \
{ return o->METHOD(a); } \
static GA_Size setDS(CLASS *o, const UT_OptionsHolder *v, GA_Size sz) \
{ \
UT_Array<UT_OptionsHolder> array; \
array.resize(sz); \
for (exint i = 0; i < sz; ++i) array(i) = v[i]; \
return o->METHOD(array); \
} \
}; \
myEval[ID].mySetDS = callbacks::setDS; \
myEval[ID].mySetDA = callbacks::setDA; \
myEval[ID].myReadOnly = false; \
}
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
GLenum array
Definition: glew.h:9108
const GLdouble * v
Definition: glcorearb.h:836
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 908 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_METHOD_F (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ return o->METHOD(v[0], sz); } \
}; \
myEval[ID].mySetF = callbacks::setFunc; \
myEval[ID].myReadOnly = false; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836

Definition at line 666 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_METHOD_I (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const int64 *v, GA_Size sz) \
{ return o->METHOD(v[0], sz); } \
static GA_Size setFuncF(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ \
int64 *tmp = (int64 *)UTstackAlloc(sizeof(int64) * sz); \
for (exint i = 0; i < sz; i++) { tmp[i] = v[i]; } \
int result = o->SETFUNC(tmp, sz); \
UTstackFree(tmp); \
return result; \
} \
}; \
myEval[ID].mySetI = callbacks::setFunc; \
myEval[ID].mySetF = callbacks::setFuncF; \
myEval[ID].myReadOnly = false; \
}
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
#define UTstackAlloc(size)
Definition: UT_StackAlloc.h:34
GLuint64EXT * result
Definition: glew.h:14311
const GLdouble * v
Definition: glcorearb.h:836
long long int64
Definition: SYS_Types.h:116
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
#define UTstackFree(ptr)
Definition: UT_StackAlloc.h:38

Definition at line 562 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_METHOD_S (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setSA(CLASS *o, const UT_StringArray &a) \
{ return o->METHOD(a); } \
static GA_Size setSS(CLASS *o, const char **v, GA_Size sz) \
{ \
UT_StringArray array; \
array.resize(sz); \
for (exint i = 0; i < sz; ++i) array(i) = v[i]; \
return o->METHOD(array); \
} \
}; \
myEval[ID].mySetSS = callbacks::setSS; \
myEval[ID].mySetSA = callbacks::setSA; \
myEval[ID].myReadOnly = false; \
}
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
GLenum array
Definition: glew.h:9108
const GLdouble * v
Definition: glcorearb.h:836
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 783 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_S (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setSA(CLASS *o, const UT_StringArray &a) \
{ return SETFUNC(o, a); } \
static GA_Size setSS(CLASS *o, const char **v, GA_Size sz) \
{ \
UT_StringArray array; \
array.resize(sz); \
for (exint i = 0; i < sz; ++i) array(i) = v[i]; \
return SETFUNC(o, array); \
} \
}; \
myEval[ID].mySetSS = callbacks::setSS; \
myEval[ID].mySetSA = callbacks::setSA; \
myEval[ID].myReadOnly = false; \
}
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
GLenum array
Definition: glew.h:9108
const GLdouble * v
Definition: glcorearb.h:836
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 767 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_D (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE) \
myEval[ID].myDA = EVAL; \
}
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)

Definition at line 840 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_F (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE) \
myEval[ID].myF = EVAL; \
}
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)

Definition at line 611 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_I (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size evalF(const CLASS *o, fpreal64 *v, GA_Size sz) \
{ int64 tmp[TUPLESIZE]; \
int result = EVAL(o, tmp, SYSmin(sz, TUPLESIZE)); \
for (int i = 0; i < SYSmin(sz, TUPLESIZE); i++) \
v[i] = tmp[i]; \
return result; } \
}; \
GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE) \
myEval[ID].myI = EVAL; \
myEval[ID].myF = callbacks::evalF; \
}
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
GLuint64EXT * result
Definition: glew.h:14311
const GLdouble * v
Definition: glcorearb.h:836
long long int64
Definition: SYS_Types.h:116
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)
#define SYSmin(a, b)
Definition: SYS_Math.h:1536
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 478 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_METHOD_D (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size evalDA(const CLASS *o, UT_Array<UT_OptionsHolder> &v) \
{ o->EVAL(v); return v.entries(); } \
}; \
GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE) \
myEval[ID].myDA = callbacks::eval; \
}
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 844 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_METHOD_F (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, fpreal64 *v, GA_Size sz) \
{ return o->EVAL(v, sz); } \
}; \
GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE) \
myEval[ID].myF = callbacks::eval; \
}
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
const GLdouble * v
Definition: glcorearb.h:836
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 615 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_METHOD_I (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, int64 *v, GA_Size sz) \
{ return o->EVAL(v, sz); } \
static GA_Size evalF(const CLASS *o, fpreal64 *v, GA_Size sz) \
{ int64 tmp[TUPLESIZE]; \
int result = o->EVAL(tmp, SYSmin(sz, TUPLESIZE)); \
for (exint i = 0; i < SYSmin(sz, TUPLESIZE); i++) { v[i] = tmp[i]; } \
return result; } \
}; \
GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE) \
myEval[ID].myI = callbacks::eval; \
}
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
double fpreal64
Definition: SYS_Types.h:201
GLuint64EXT * result
Definition: glew.h:14311
const GLdouble * v
Definition: glcorearb.h:836
long long int64
Definition: SYS_Types.h:116
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)
#define SYSmin(a, b)
Definition: SYS_Math.h:1536
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))

Definition at line 491 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_METHOD_S (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size evalSA(const CLASS *o, UT_StringArray &v) \
{ o->EVAL(v); return v.entries(); } \
}; \
GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE) \
myEval[ID].mySA = callbacks::eval; \
}
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
const GLdouble * v
Definition: glcorearb.h:836
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 719 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_S (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE) \
myEval[ID].mySA = EVAL; \
}
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)

Definition at line 715 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_VARYING_D (   CLASS,
  ID,
  NAME,
  TSIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_VARYING_D(ID, NAME, TSIZE) \
myEval[ID].myDA = EVAL; \
}
#define GA_INTRINSIC_DEF_VARYING_D(ID, NAME, TUPLESIZE_FUNC)

Definition at line 865 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_VARYING_F (   CLASS,
  ID,
  NAME,
  TSIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_VARYING_F(ID, NAME, TSIZE) \
myEval[ID].myF = EVAL; \
}
#define GA_INTRINSIC_DEF_VARYING_F(ID, NAME, TUPLESIZE_FUNC)

Definition at line 637 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_VARYING_I (   CLASS,
  ID,
  NAME,
  TSIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_VARYING_I(ID, NAME, TSIZE) \
myEval[ID].myI = EVAL; \
}
#define GA_INTRINSIC_DEF_VARYING_I(ID, NAME, TUPLESIZE_FUNC)

Definition at line 518 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_VARYING_S (   CLASS,
  ID,
  NAME,
  TSIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_VARYING_S(ID, NAME, TSIZE) \
myEval[ID].mySA = EVAL; \
}
#define GA_INTRINSIC_DEF_VARYING_S(ID, NAME, TUPLESIZE_FUNC)

Definition at line 740 of file GA_IntrinsicMacros.h.

#define GA_START_INTRINSIC_DEF (   CLASS,
  NUM_INTRINSICS 
)

The intrinsic macros help declaring intrinsic attributes for an object (i.e. a primitive). Typically, you'll have code like

enum {
ga_INTRINISIC_VAR1,
ga_INTRINISIC_VAR2,
ga_NUM_INTRINSICS
}
GA_START_INTRINSIC_DEF(ClassName, ga_NUM_INTRINSICS)
GA_INTRINSIC_I(ClassName, ga_INTRINSIC_VAR1, "name1",
EvaluationCallback)
GA_INTRINSIC_VARYING_F(ClassName, ga_INTRINISIC_VAR2, "name2",
TupleSizeMethod,
EvaluationCallback)
GA_END_INTRINSIC_DEF(ClassName, BaseClassName)

There are several ways to declare intrinsic access methods:

GA_INTRINSIC_I(ClassName, Enum, Name, Callback)

  • Tuple size is fixed at 1
  • Callback returns value: static exint callback(const ClassName *obj); static fpreal callback(const ClassName *obj); static const char *callback(const ClassName *obj);

GA_INTRINSIC_CONST_I(ClassName, Enum, Name, Value)

  • Tuple size is fixed at 1
  • int/float/(const char *) Value is specified

GA_INTRINSIC_METHOD_I(ClassName, Enum, Name, MethodName)

  • Tuple size is fixed at 1
  • MethodName specifies a public method on ClassName which returns the value. exint ClassName::MethodName() const; fpreal ClassName::MethodName() const; const char *ClassName::MethodName() const;

GA_INTRINSIC_TUPLE_I(ClassName, Enum, Name, TUPLE_SIZE, Callback)

  • TUPLE_SIZE is a constant value
  • Callback fills value (returning number of items set): static int callback(const ClassName *obj, int64 *v, GA_Size sz); static int callback(const ClassName *obj, fpreal64 *v, GA_Size sz); static void callback(const ClassName *obj, UT_StringArray &v);

GA_INTRINSIC_TUPLE_METHOD_I(ClassName, Enum, Name, TUPLE_SIZE, MethodName)

  • TUPLE_SIZE is a constant value
  • MethodName is a public method on ClassName which fills the value, returning the number of items set: int ClassName::MethodName(int64 *v, GA_Size sz) const; int ClassName::MethodName(fpreal64 *v, GA_Size sz) const; void ClassName::MethodName(UT_StringArray &v, GA_Size sz) const;

GA_INTRINSIC_ARRAY_I(ClassName, Enum, Name, ArrayType, MethodName)

  • ArrayType specifies an array which has:
    • entries() const: Return number of elements in the array
    • operator()(exint i) const: Returning the element of the array
  • MethodName is a public method on ClassName which returns the a const reference to an ArrayType object. const ArrayType &ClassName::MethodName() const

GA_INTRINSIC_VARYING_I(ClassName, Enum, Name, TupleSizeCallback, Callback)

  • TupleSizeCallback is a function returning the tuple size static int tuplesizecallback(const ClassName *obj)
  • Callback fills value, returning number of items set: static int callback(const ClassName *obj, int64 *v, GA_Size sz); static int callback(const ClassName *obj, fpreal64 *v, GA_Size sz); static int callback(const ClassName *obj, UT_StringArray &v);

For setting values, there are similar macros. The tuple size and name are usually defined by the evaluation macros. If there is no "get" method, you can still declare the intrinsic using: GA_INTRINSIC_DEF_I(Enum, Name, TupleSize) GA_INTRINSIC_DEF_VARYING_I(Enum, Name, TupleSizeFunc)

GA_INTRINSIC_SET_I(ClassName, Enum, Callback)

  • Callback specifies a static function which sets the value, returning false if unable to set (i.e. invalid value). The function can take a 32/64 bit value. static bool set(ClassName *o, exint v); static bool set(ClassName *o, fpreal v); static bool set(ClassName *o, const char *v);

GA_INTRINSIC_SET_METHOD_I(ClassName, Enum, MethodName)

  • MethodName specifies a public method on ClassName which sets the value. The method can take 32/64 bit values bool ClassName::MethodName(exint value); bool ClassName::MethodName(fpreal value);

GA_INTRINSIC_SET_TUPLE_I(ClassName, Enum, Callback)

  • Callback specifies a static function which sets the value, returning the number of values set. static int set(ClassName *o, const int64 *v, int tuple_size); static int set(ClassName *o, const fpreal64 *v, int tuple_size); static int set(ClassName *o, const UT_StringArray &v);

GA_INTRINSIC_SET_TUPLE_METHOD_I(ClassName, Enum, Callback)

  • Callback specifies a static function which sets the value, returning the number of values set. int ClassName::set(const int64 *v, int tuple_size); int ClassName::set(const fpreal64 *v, int tuple_size); int ClassName::set(const UT_StringArray &v);
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 125 of file GA_IntrinsicMacros.h.