38 namespace HDK_Sample {
51 t = (
fpreal)i / (CV_SIZE-1);
70 s[i] = (
fpreal)i / (CV_SIZE-1);
84 for (i = 1; i <
n; i++)
92 printf(
"{%g,%g,%g}", v[0].
x(), v[0].
y(), v[0].
z());
93 for (i = 1; i <
n; i++)
94 printf(
", {%g,%g,%g}", v[i].
x(), v[i].
y(), v[i].
z());
112 printf(
"No output supported currently\n");
123 for (i = 0; i < list.
entries(); i++)
138 default:
printf(
"unknown");
break;
145 using namespace HDK_Sample;
183 map.
append(
"Mandril.pic");
184 memset(zero, 0,
sizeof(zero));
194 if (!cvex.
load(argc-1, argv+1))
196 fprintf(stderr,
"Unable to load cvex function: %s\n", argv[1]);
216 Pval->setTypedData(P, CV_SIZE);
221 Nval->setTypedData(N, CV_SIZE);
226 if (sval) sval->setTypedData(s, CV_SIZE);
227 if (tval) tval->setTypedData(t, CV_SIZE);
242 if (!CfVal && !OfVal)
243 fprintf(stderr,
"%s doesn't seem to write to Cf or Of\n", argv[1]);
260 printf(
"Calling VEX ----------------------------\n\n");
261 cvex.
run(CV_SIZE,
false);
262 printf(
"\n\nFinished VEX ----------------------------\n");
CVEX_ValueListT< PREC > & getInputList()
GLuint GLsizei const GLchar * label
bool addInput(const UT_StringHolder &name, CVEX_Type type, bool varying)
CVEX_Type getType() const
Query type of VEX value.
auto printf(const S &fmt, const T &...args) -> int
GLsizei const GLfloat * value
GLdouble GLdouble GLdouble z
const CVEX_ValueT< PREC > * findOutput(const UT_StringRef &name, CVEX_Type type) const
Find an output by name/type.
const UT_StringHolder & getName() const
Query name of VEX value.
List of input or output values for a CVEX_Context.
A class representing a VEX value.
bool setTypedData(VEXint< PREC > *data, int array_size)
const CVEX_ValueT< PREC > * findInput(const UT_StringRef &name, CVEX_Type type) const
Find an input by name/type.
bool run(int array_size, bool interruptable, CVEX_RunDataT< PREC > *rundata=nullptr)
auto fprintf(std::FILE *f, const S &fmt, const T &...args) -> int
void assign(T xx=0.0f, T yy=0.0f, T zz=0.0f)
Set the values of the vector components.
const CVEX_ValueListT< PREC > & getOutputList() const
bool isExport() const
Query whether the VEX value is an export (or read-only)
int theMain(int argc, char *argv[])
const CVEX_ValueT< PREC > * getValue(int i) const
Get a value by index.
GA_API const UT_StringHolder N
bool load(int argc, const char *const argv[])
ImageBuf OIIO_API zero(ROI roi, int nthreads=0)