Class CubeShape

java.lang.Object
me.deecaad.core.utils.shape.CubeShape
All Implemented Interfaces:
Shape

public final class CubeShape extends Object implements Shape
An axis-aligned cube centered at the emitter origin with edge length size. Samples are uniform random points; hollow restricts them to the surface (one of six faces). The emission direction is zero, so the emitter falls back to its own direction provider.
  • Constructor Details

    • CubeShape

      public CubeShape(double size, boolean hollow)
    • CubeShape

      public CubeShape(double size)
  • Method Details

    • getSize

      public double getSize()
    • isHollow

      public boolean isHollow()
    • getPoint

      @NotNull public @NotNull ShapePoint getPoint(double t)
      Description copied from interface: Shape
      Returns one sample from this shape. For random shapes (sphere, cone, cube) t is ignored; for deterministic shapes (point, line, circle) t parameterizes the sample.
      Specified by:
      getPoint in interface Shape
      Parameters:
      t - Normalized parameter in [0, 1).
      Returns:
      The non-null shape point.