Fundamental to all rendering systems is the modeling primitive. A
modeling primitive is an abstract data type that allows complex mathematical or geometric
objects to be succinctly and simply described by a compact list of numbers. NuGraf sports
a rich set of basic built-in primitives, ranging from simple polygon descriptions to
complex bicubic and NURBS patches. A complete list includes: indexed polygons with holes,
user-defined primitives, cones, cylinders, discs, NURBS patches, bicubic patches, prisms,
rectangles, spheres and superquadrics. Each primitive has predefined (u,v) texture
coordinates, U/V tangent vectors, vertex normals and a number of user-settable control
options (such as the dynamic subdivision level).
The "Indexed Polygon" primitive is the backbone and workhorse of the
NuGraf Toolkit; it can accept any form of polygonal or meshed geometry, including those
with holes, and store them compactly along with their associated normals, vertex colors,
(u,v) texture coordinates, U/V tangent vectors and vertex opacities. Likewise, the
"User Defined Primitive" is an equally capable primitive that allows the
polygonal data to be fed directly into the renderer from the host application's dataspace
using a complex callback mechanism strategy. A companion to these mesh primitives are the
'Indexed Polygon Manipulation Routines'; these routines, developed and refined over a
number of years, allow the meshes to be welded, smoothed, optimized, have their normals
unified & flipped, have double sided polygons removed and so forth (these functions
can be interactively evaluated in Okino's "NuGraf" product).
Once a primitive is defined and sent to the toolkit it can be "instanced" one or
more times, with each instance becoming an entity unto itself. Each instance of a
primitive references the same geometry data in memory but uses a different transformation
matrix, different attributes and different assigned materials.