[Sidefx-houdini-list] HDK version of HScript primuv()

Olex P hoknamahn at gmail.com
Thu Feb 19 10:00:50 EST 2009

Hello hList,

Is anyone knows how to achieve (within the HDK) the same functionality which
HScript expression function primuv() has?
There is a method from GEO_Primitive class:

virtual bool evaluateInteriorPoint(GEO_Vertex &result,
GEO_AttributeHandleList &hlist, fpreal u, fpreal v) const;

It looks like what I'm looking for but I'm not sure how to deal with
GEO_AttributeHandleList &hlist.
Is it the object that determines which attributes to sample, how to
interpolate them etc? How shall I initialize it?

For instance:

const GEO_Primitive *ppr;
GEO_Point *ppt;
GEO_Vertex result;
GEO_AttributeHandleList hlist;
UT_Vector4 pos;
float u = 0.0f;
float v = 0.0f;

hlist.bindDetail(gdp); // Not sure should I do this
ppr->evaluateInteriorPoint(result, hlist, u, v);
ppt = result.getPt(); // This is only for a test purposes I'd rather sample
something else than P

In my case ppt is always zero that means ppr->evaluateInteriorPoint(result,
hlist, u, v) call fails?
Any suggestions?


More information about the Sidefx-houdini-list mailing list