From: Allan Schaffer (allan++at++southpark.engr.sgi.com)
Date: 06/28/2000 10:33:25
On Jun 26, 7:47am, Mattias Roupe wrote:
> Does anyone know of any tools or code to convert a file of raw 3D data (XYZ
> coordinates separated by spaces) into Performer as triangle.
>
> The data has no grouping such as triangle stripsets/quadmeshes etc.
I don't know of any tools for this but it's (very, very, very)
easy to do in Performer. You'll need to:
- Read the X Y Z data into an in-memory array allocated
with pfMalloc(size, arena);
- Put it in a pfGeoSet via:
pfGSetAttr(gset, PFGS_COORD3, PFGS_PER_VERTEX, coordsarray, NULL);
- Put the pfGeoSet into the scene graph (see any of the Performer
sample programs in /usr/share/Performer/src/pguide/libpf/C that
have pfNewGSet() in them for an example)
- et voila'.
ps.
- It'll look uniformly white unless you somehow specify
colors or calculate normals as well. (You could run
in wireframe mode to view the shape, for testing)
Allan
-- Allan Schaffer allan++at++sgi.com Silicon Graphics http://reality.sgi.com/allan
This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 10:33:29 PDT