Basics
Guides
API Reference
Basics
Guides
API Reference
[17:7] extends: Mesh
Wraps JavaFX TriangleMesh, the standard concrete Mesh implementation that stores points (float triples X, Y, Z), texture coordinates (float pairs U, V), optional normals (float triples Nx, Ny, Nz), and face indices. The vertex format controls whether each face point references just a position and texCoord ("POINT_TEXCOORD") or position, normal, and texCoord ("POINT_NORMAL_TEXCOORD"). Face indices group those references into triangles.
TriangleMesh (Format = "POINT_TEXCOORD")
Creates a new TriangleMesh with the given vertex format. Default is POINT_TEXCOORD which matches JavaFX's no-argument constructor.
Format is an fxvertexformat value or VertexFormat name (a string), or a wrapper/AJO. Defaults to "POINT_TEXCOORD".addPoints (list Floats)
Appends point coordinates (X, Y, Z float triples) to the mesh.
Floats is a list of doubles in [x0, y0, z0, x1, y1, z1, ...] order.this objectaddTexCoords (list Floats)
Appends texture coordinates (U, V float pairs) to the mesh.
Floats is a list of doubles in [u0, v0, u1, v1, ...] order.this objectaddNormals (list Floats)
Appends normal coordinates (Nx, Ny, Nz float triples) to the mesh. Only used when the mesh's vertex format is POINT_NORMAL_TEXCOORD.
Floats is a list of doubles in [nx0, ny0, nz0, ...] order.this objectaddFaces (list Ints)
Appends face index data. Each face references vertices by their position in the points, normals, and texCoords lists.
Ints is a list of ints with the face index data.this objectpointCount ()
Returns the number of points (X, Y, Z triples) in the mesh.
An int with the point count.faceCount ()
Returns the number of triangle faces in the mesh.
An int with the face count.setVertexFormat (Format)
Sets the vertex format. Valid names are "POINT_TEXCOORD" and "POINT_NORMAL_TEXCOORD".
Format is an fxvertexformat value or VertexFormat name (a string), or a wrapper/AJO.this object for chaininggetVertexFormat ()
Returns the current VertexFormat for this mesh.
An AJO wrapping javafx.scene.shape.VertexFormat.vertexFormatProperty ()
Returns the ObjectProperty backing the vertex format.
An AJO wrapping javafx.beans.property.ObjectPropertygetPointElementSize ()
Returns the number of floats per point in the points buffer (always 3 for X, Y, Z).
An int with the point element size.getNormalElementSize ()
Returns the number of floats per normal in the normals buffer (3 for Nx, Ny, Nz when normals are in use).
An int with the normal element size.getTexCoordElementSize ()
Returns the number of floats per texture coordinate (always 2 for U, V).
An int with the tex coord element size.getFaceElementSize ()
Returns the number of int indices per face. This depends on the vertex format (6 for POINT_TEXCOORD, 9 for POINT_NORMAL_TEXCOORD).
An int with the face element size.getPoints ()
Returns the observable float array holding mesh point coordinates.
An AJO wrapping javafx.collections.ObservableFloatArray.getNormals ()
Returns the observable float array holding mesh normal coordinates. Only populated when the vertex format is POINT_NORMAL_TEXCOORD.
An AJO wrapping javafx.collections.ObservableFloatArray.getTexCoords ()
Returns the observable float array holding mesh texture coordinates.
An AJO wrapping javafx.collections.ObservableFloatArray.getFaces ()
Returns the observable int array holding mesh face indices.
An AJO wrapping javafx.collections.ObservableIntegerArray.getFaceSmoothingGroups ()
Returns the observable int array holding per-face smoothing-group bits.
An AJO wrapping javafx.collections.ObservableIntegerArray.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.