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!

Number of vertices in shape

843799Jan 21 2003 — edited Jan 22 2003
Hello,
I have the following problem:
I load an .obj file containing a certain number of vertices into my Java3D application
ObjectFile f = new ObjectFile();
Then I access these vertices/coordinates via
GeometryInfo gi = new GeometryInfo((GeometryArray)shape.getGeometry());
GemometryArray ga = gi.getGeometryArray();

// create array which holds vertices as Point3d
verticesArr = new Point3d[ga.getVertexCount()]

// fill in array with all vertices
for (int i=0; i<ga.getVertexCount(); i++) {
verticesArr[i] = new Point3d();
ga.getCoordinates(i, verticesArr);
}




My problem is, that the number of vertices (i.e. ga.getVertexCount) in the loaded shape does not equal the number of vertices in the original file that I load!
How can that be? Does Java3D increase the number of vertices or am I getting something wrong?

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 19 2003
Added on Jan 21 2003
6 comments
174 views