Package limn.render3d

Class Primitives

java.lang.Object
limn.render3d.Primitives

public final class Primitives extends Object
Procedural MeshData for common shapes, each with POSITION, NORMAL and UV0. Upload with Graphics3D.upload(...).
  • Method Details

    • cube

      public static MeshData cube(float size)
      An axis-aligned cube of the given edge length, centered at the origin.
    • sphere

      public static MeshData sphere(float radius, int rings, int sectors)
      A UV sphere of the given radius, centered at the origin.
    • plane

      public static MeshData plane(float width, float depth)
      A flat plane in the XZ axis (normal +Y), centered at the origin.