/** * Retrieve the number of objects on the screen, recursive method * * @return int the total object count for the screen. */ public int getNumObjects() { int objectCount = 0; ArrayList<Object3D> children = getChildrenCopy(); for (int i = 0, j = children.size(); i < j; i++) { Object3D child = children.get(i); if (child.getGeometry() != null && child.getGeometry().getVertices() != null && child.isVisible()) if (child.getNumChildren() > 0) { objectCount += child.getNumObjects() + 1; } else { objectCount++; } } return objectCount; } }
/** * Retrieve the number of triangles this scene contains, recursive method * * @return int the total triangle count for the scene. */ public int getNumTriangles() { int triangleCount = 0; ArrayList<Object3D> children = getChildrenCopy(); for (int i = 0, j = children.size(); i < j; i++) { Object3D child = children.get(i); if (child.getGeometry() != null && child.getGeometry().getVertices() != null && child.isVisible()) if (child.getNumChildren() > 0) { triangleCount += child.getNumTriangles(); } else { triangleCount += child.getGeometry().getVertices().limit() / 9; } } return triangleCount; }
/** * Retrieve the number of objects in the object, recursive method * * @return int the total object count for the object. */ public int getNumObjects() { int objectCount = 0; for (int i = 0, j = getNumChildren(); i < j; i++) { Object3D child = getChildAt(i); if (child.getGeometry() != null && child.getGeometry().getVertices() != null && child.isVisible()) { if (child.getNumChildren() > 0) { objectCount += child.getNumObjects() + 1; } else { objectCount++; } } } return objectCount; }
/** * Retrieve the number of triangles of the object, recursive method * * @return int the total triangle count for the object. */ public int getNumTriangles() { int triangleCount = 0; for (int i = 0, j = getNumChildren(); i < j; i++) { Object3D child = getChildAt(i); if (child.getGeometry() != null && child.getGeometry().getVertices() != null && child.isVisible()) { if (child.getNumChildren() > 0) { triangleCount += child.getNumTriangles(); } else { triangleCount += child.getGeometry().getVertices().limit() / 9; } } } return triangleCount; }
public void apply(INode node) { if(node instanceof Object3D) { Object3D o = (Object3D)node; if(!o.isVisible() || !o.isInFrustum()) return;
/** * Retrieve the number of objects on the screen, recursive method * * @return int the total object count for the screen. */ public int getNumObjects() { int objectCount = 0; ArrayList<Object3D> children = getChildrenCopy(); for (int i = 0, j = children.size(); i < j; i++) { Object3D child = children.get(i); if (child.getGeometry() != null && child.getGeometry().getVertices() != null && child.isVisible()) if (child.getNumChildren() > 0) { objectCount += child.getNumObjects() + 1; } else { objectCount++; } } return objectCount; } }
/** * Retrieve the number of triangles this scene contains, recursive method * * @return int the total triangle count for the scene. */ public int getNumTriangles() { int triangleCount = 0; ArrayList<Object3D> children = getChildrenCopy(); for (int i = 0, j = children.size(); i < j; i++) { Object3D child = children.get(i); if (child.getGeometry() != null && child.getGeometry().getVertices() != null && child.isVisible()) if (child.getNumChildren() > 0) { triangleCount += child.getNumTriangles(); } else { triangleCount += child.getGeometry().getVertices().limit() / 9; } } return triangleCount; }
/** * Retrieve the number of objects in the object, recursive method * * @return int the total object count for the object. */ public int getNumObjects() { int objectCount = 0; for (int i = 0, j = getNumChildren(); i < j; i++) { Object3D child = getChildAt(i); if (child.getGeometry() != null && child.getGeometry().getVertices() != null && child.isVisible()) if (child.getNumChildren() > 0) { objectCount += child.getNumObjects() + 1; } else { objectCount++; } } return objectCount; }
/** * Retrieve the number of triangles of the object, recursive method * * @return int the total triangle count for the object. */ public int getNumTriangles() { int triangleCount = 0; for (int i = 0, j = getNumChildren(); i < j; i++) { Object3D child = getChildAt(i); if (child.getGeometry() != null && child.getGeometry().getVertices() != null && child.isVisible()) if (child.getNumChildren() > 0) { triangleCount += child.getNumTriangles(); } else { triangleCount += child.getGeometry().getVertices().limit() / 9; } } return triangleCount; }
public void apply(INode node) { if(node instanceof Object3D) { Object3D o = (Object3D)node; if(!o.isVisible() || !o.isInFrustum()) return;