hello,
i've been going through the archives and i've almost got it i think...
just need a little bit more help-
i've loaded up a scene with the obj loader, and i can grab it's shape
and geometry; I can also generate a pick ray, and get the triangle
array from the geometry. i can retrieve the number of vertices from
the triangle array with getVertexCount; however, when i try to
getCoordinate, i get a java.lang.NullPointerException
I'm using :
int firstvert = 0
for(int i = 0; i < triCount; i++)
{
tArray0.getCoordinate(firstvert, tri[0]);
tArray0.getCoordinate(firstvert + 1, tri[1]);
tArray0.getCoordinate(firstvert + 2, tri[2]);
firstvert += 2;
boolean hit = Intersect.rayAndTriangle(pickry, tri, 0, dist);
if(hit)
{
System.out.println("got triangle " + i);
}
}
I'm going under the assumption that since I have vertices (from getVertexCount),
that I have coordinates... Is that not necessarily correct?
Thanks for any input.
-Ed
===========================================================================
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".