You say there are more than 2000 vertices in the geometry, but you only
make an array to hold 2000?  That could be a problem, though I think the
real problem is that you are not allocating the colors...

  int i;
  for(i=0; i<colorArray.length; i++)
    colorArray[i] = new Color3f();

Same thing for coordinates...

J. Lee Dixon
Software Engineer
SAIC - Celebration, FL
[EMAIL PROTECTED]


-----Original Message-----
From: SHRAVAN SHEELA [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 03, 2000 3:55 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Geometry Array - getColors(index, Color3f[ ])


Hi,

I get a NullPointer Exception with the following code... What is going
wrong.
Color3f[] colorArray = new Color3f[2000];
//quadArray is in my Geometry, the number of vertices in the geometry
is
more than 2000.
   quadArray.getColors(0,colorArray)
//similar problem with getCoordinates(..)

Thanks.
SSK

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

========================================================================
===
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".

===========================================================================
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