37 namespace HDK_Sample {
50 t = (
fpreal)i / (CV_SIZE-1);
69 s[i] = (
fpreal)i / (CV_SIZE-1);
83 for (i = 1; i <
n; i++)
91 printf(
"{%g,%g,%g}", v[0].
x(), v[0].
y(), v[0].
z());
92 for (i = 1; i <
n; i++)
93 printf(
", {%g,%g,%g}", v[i].
x(), v[i].
y(), v[i].
z());
111 printf(
"No output supported currently\n");
122 for (i = 0; i < list.
entries(); i++)
137 default:
printf(
"unknown");
break;
144 using namespace HDK_Sample;
182 map.
append(
"Mandril.pic");
183 memset(zero, 0,
sizeof(zero));
193 if (!cvex.
load(argc-1, argv+1))
195 fprintf(stderr,
"Unable to load cvex function: %s\n", argv[1]);
215 Pval->setTypedData(P, CV_SIZE);
220 Nval->setTypedData(N, CV_SIZE);
225 if (sval) sval->setTypedData(s, CV_SIZE);
226 if (tval) tval->setTypedData(t, CV_SIZE);
241 if (!CfVal && !OfVal)
242 fprintf(stderr,
"%s doesn't seem to write to Cf or Of\n", argv[1]);
259 printf(
"Calling VEX ----------------------------\n\n");
260 cvex.
run(CV_SIZE,
false);
261 printf(
"\n\nFinished VEX ----------------------------\n");
CVEX_ValueListT< PREC > & getInputList()
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
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)
int main(int argc, char *argv[])
const CVEX_ValueT< PREC > * findInput(const UT_StringRef &name, CVEX_Type type) const
Find an input by name/type.
GLuint GLsizei const GLchar * label
GLdouble GLdouble GLdouble z
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)
const CVEX_ValueT< PREC > * getValue(int i) const
Get a value by index.
GA_API const UT_StringHolder N
GLsizei const GLfloat * value
bool load(int argc, const char *const argv[])
ImageBuf OIIO_API zero(ROI roi, int nthreads=0)