> 6. Null pointer exceptions from GeomInfoConverter
>
> If you get a null pointer excepting when trying to use
> Triangulator, this can be caused by a couple things.
> You may have forgotten to call the setStripCounts
> method of GeometryInfo. If you don't set this, the
> Triangulator has no way of telling how big each of the
> polygons are that you've given it. If you're doing
> this, and you still get this error, you may not be
> calling setCoordinateIndicies . If you have only
> coordinate data to set, and no coordinate indices to
> set, you must call the recomputeIndices method.
This is a strange FAQ since there's nothing in Java 3D called
"GeomInfoConverter." Plus, the last sentence here is misleading.
I think what you're talking about is when your data isn't indexed
(meaning you have coordinate data but no indices). In that case,
calling recomputeIndices isn't the right thing to do. The
Triangulator will simply indexify the data for you, so you don't
need to do anything. In other words, the triangulator will work
on indexed or non-indexed data.
The recomputeIndices method should almost never be used. I created it
for certain .obj files that were not indexed correctly; two indices
had exactly the same position but two different indexes. When this
happens, the NormalGenerator and Stripifyer will treat it as two
separate points, meaning you'll get a crease in the model there
(NormalGenerator) and your strips won't be able to cross there
(Stripifyer).
The recomputeIndices() function has two lines:
unindexify();
indexify();
The indexify() function uses a hash table to find if two
coordinates (or colors, or normals, or texcoords) are
equal. If they are equal, they get the same index.
That gives the NormalGenerator and Stripifier the connection
information they need.
-Paul
===========================================================================
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".