HDK suggestion

   2442   2   0
User Avatar
Member
52 posts
Joined: July 2007
Offline
Hey guys,

I want to query point attribute within 10 points like P,Cd atrr, then want to
print them to a custom format.
which hdk api template should I use to query att?


any suggestions will be welcome!
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
Maybe help this:
GU_Detail *pgdp = (GU_Detail *)inputGeo(0, context);

GEO_Point *pt;
FOR_ALL_GPOINTS(pgdp, pt){

UT_Vector3 pos = pt.getPos();

GEO_AttributeHandle col= pgdp->getPointAttribute(“Cd”);
col.setElement(pt);
UT_Vector3 color = col.getV3();

printf(“color: %f, %f, %f\n”, color.x(), color.y(), color.z() );

}
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
52 posts
Joined: July 2007
Offline
cybermax
Maybe help this:
GU_Detail *pgdp = (GU_Detail *)inputGeo(0, context);

GEO_Point *pt;
FOR_ALL_GPOINTS(pgdp, pt){

UT_Vector3 pos = pt.getPos();

GEO_AttributeHandle col= pgdp->getPointAttribute(“Cd”);
col.setElement(pt);
UT_Vector3 color = col.getV3();

printf(“color: %f, %f, %f\n”, color.x(), color.y(), color.z() );

}
thanks,I will look into
  • Quick Links