> Date:         Thu, 2 Sep 1999 14:45:02 -0700
> From: Tim Bray <[EMAIL PROTECTED]>
>
> I looked in the utils.../ColorCube.java file and find that he uses
> a QuadArray, which means that he declares 24 vertices and 24 triple-float
> colors... I can build something identical with 6 colors, 8 points, and
> a couple of index arrays.

You're correct in that indexed geometry is a convenient and compact
representation for creating, storing, and manipulating many objects.

However, for rendering on most accelerated 3D graphics platforms, vertices
must be expanded into linear arrays of memory before streaming them to the
hardware.  This means an indexed quad representation, for example, must be
expanded into 4 distinct vertices per quad even though you can represent it
in a indexed representation with a ratio that approaches 1 vertex per quad.

Thus if your primary motivation for creating an object is to immediately
render it then it makes no real sense to use an indexed representation since
it will need to be expanded by the renderer into a much larger data
structure anyway.  If you are planning on storing it or further manipulating
it, with the rendering just another aspect of your application, then you
might find it advantageous to use an indexed representation, but you should
probably run an analysis of your memory usage to determine the real
tradeoffs.

Reducing the number of vertices sent to the hardware is a key aspect of
increasing rendering performance for many classes of applications.  For such
applications avoiding indexed representations and using GeometryInfo and the
Stripifier utilities is very helpful.

-- Mark Hood

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to