polyIsoSurface routine from GU_Detail.h

   2196   2   0
User Avatar
Member
166 posts
Joined: Feb. 2006
Offline
// poly-iso surfaces
GU_PrimPoly *polyIsoSurface(float (*ptOutside)(const UT_Vector3 &),
const UT_BoundingBox &bbox,
int xdiv, int ydiv, int zdiv);

I am a bit puzzled how to use this function. It looks like it is the one i need but not sure.

The part that confuses me is
float (*ptOutside)(const UT_Vector3 &)
.
Could it be my array of points/vectors? Would someone from SESI be kind to give me an example pleeeeease… Mark? Edward?Luca?… :roll:
Also is it doing something like this algorithm?
http://astronomy.swin.edu.au/~pbourke/modelling/polygonise/ [astronomy.swin.edu.au]

Cheers to any response.
Time to get out of this messy world.
User Avatar
Staff
2075 posts
Joined: July 2005
Offline
Le_monkey_butt
// poly-iso surfaces
GU_PrimPoly *polyIsoSurface(float (*ptOutside)(const UT_Vector3 &),
const UT_BoundingBox &bbox,
int xdiv, int ydiv, int zdiv);

I am a bit puzzled how to use this function. It looks like it is the one i need but not sure.

Cheers to any response.


Try this:

static float sphere(const UT_Vector3 &p) { return p.length()-1; }


UT_BoundingBox box;
box.initBounds(-1, -1, -1);
box.enlargeBounds(1, 1, 1);
gdp.polyIsoSurphace(sphere, box, 10, 10, 10);
User Avatar
Member
166 posts
Joined: Feb. 2006
Offline
Cheers Mark!
Time to get out of this messy world.
  • Quick Links