Class PrimitiveMeshes
java.lang.Object
dev.engine.graphics.common.mesh.PrimitiveMeshes
Factory for common primitive meshes.
All meshes have position (loc 0, 3 floats) + normal (loc 1, 3 floats) + uv (loc 2, 2 floats).
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic MeshDatacone(int segments) Cone along Y axis, radius 0.5, height 1.static MeshDatacube()A 1x1x1 cube centered at origin.static MeshDatacylinder(int segments) Cylinder along Y axis, radius 0.5, height 1.static MeshDataFullscreen triangle for post-processing.static MeshDataplane(int subdivisionsX, int subdivisionsZ) Subdivided plane in the XZ plane.static MeshDataquad()A 1x1 quad centered at origin in the XY plane, facing +Z.static MeshDataquad(float uvScale) A 1x1 quad with the given UV scale.static MeshDatasphere()UV sphere with default detail (32 segments, 16 rings).static MeshDatasphere(int segments, int rings) UV sphere with given segments and rings.
-
Field Details
-
STANDARD_FORMAT
-
-
Method Details
-
quad
A 1x1 quad centered at origin in the XY plane, facing +Z. -
quad
A 1x1 quad with the given UV scale. uvScale=3 means UVs go 0→3, tiling the texture 3 times. -
cube
A 1x1x1 cube centered at origin. 24 vertices (4 per face with correct normals). -
sphere
UV sphere with given segments and rings. -
sphere
UV sphere with default detail (32 segments, 16 rings). -
cylinder
Cylinder along Y axis, radius 0.5, height 1. -
cone
Cone along Y axis, radius 0.5, height 1. Tip at Y=0.5. -
plane
Subdivided plane in the XZ plane. -
fullscreenTriangle
Fullscreen triangle for post-processing. Position only, no normals/UVs.
-