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!
HDK suggestion
2442 2 0- horizon1231
- Member
- 52 posts
- Joined: July 2007
- Offline
- cybermax
- 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() );
}
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]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
- horizon1231
- Member
- 52 posts
- Joined: July 2007
- Offline
cybermaxthanks,I will look into
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() );
}
-
- Quick Links