Forum Stats

  • 3,853,778 Users
  • 2,264,267 Discussions
  • 7,905,444 Comments

Discussions

How to set coordinates to a GeometryInfo object?

843799
843799 Member Posts: 49,999
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);
This discussion has been closed.