Skip to content

Instantly share code, notes, and snippets.

@twxia
Created December 4, 2013 12:24
Show Gist options
  • Select an option

  • Save twxia/7786663 to your computer and use it in GitHub Desktop.

Select an option

Save twxia/7786663 to your computer and use it in GitHub Desktop.
for (f_it = faces_begin(); f_it != faces_end(); ++f_it)
{
for (fv_it = fv_iter( f_it ); fv_it; ++fv_it)
{
sp_p data = property(VProp, v_it.handle());
double *d2p = data.pt.data() // this is point (x , y, z);
double *d3p = point(fv_it.handle()).data();
glTexCoord2f(d2p[0] + 0.5,d2p[1] + 0.5);
glVertex3f(d3p[0],d3p[1],d3p[2]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment