Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to set coordinates to a GeometryInfo object?

843799May 21 2010
I have created a GeometryInfo object and filled it with coordinates from a Shape3d object with the setCoordinates method. I then call getCoordinates() and this returns null. Why does this happen ? I have printed out the coordinates, to prove that they are not null. This is my code:

GeometryInfo gi = new GeometryInfo(GeometryInfo.TRIANGLE_STRIP_ARRAY);
Point3f[] coords=theShape.getHJ();//getHJ my own method which returns the //coordinates
for(int k=0;k<coords.length;k++)
System.out.println(coords[k]);
gi.setCoordinates(coords);
gi.setStripCounts(theShape.getstripCounts());

int[] indices=gi.getCoordinateIndices();
Point3f[] vertices=gi.getCoordinates();
System.out.println("vertices "+indices);
System.out.println("indices "+indices);
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2010
Added on May 21 2010
0 comments
214 views