Print at Sep 28, 2020, 6:50:21 AM

Posted by enkonyito at Nov 5, 2018, 4:31:34 PM
Re: How to find the vertices of a 3D shape?
I use your tutorial to complete my information on the Javadoc of Java3D.

In geometryArray, the data about the object of any shape that I want to find the vertices is stored.
} else if (node instanceof Shape3D) {
Shape3D shape = (Shape3D)node;
// Read object geometries
for (int i = 0, n = shape.numGeometries(); i < n; i++) {
readNodeGeometry(shape.getGeometry(i), parentTransformations, texCoordGeneration,
textureTransform, cullFace, backFaceNormalFlip);

private void readNodeGeometry(Geometry geometry,
Transform3D parentTransformations,
TexCoordGeneration texCoordGeneration,
Transform3D textureTransform,
int cullFace,
boolean backFaceNormalFlip) {
if (geometry instanceof GeometryArray) {
GeometryArray geometryArray = (GeometryArray)geometry;

The ideal would be to force to use TRIANGLE_ARRAY.
EnkoNyito gallery