Class CircleShape

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

public final class CircleShape extends Object implements Shape
A circle centered at the emitter origin, lying in the plane perpendicular to axis. t parameterizes the angle around the circle (t * 2π), giving deterministic, evenly distributed points. The emission direction is the radial outward normal in the circle's plane.
  • Constructor Details

    • CircleShape

      public CircleShape(double radius, @NotNull @NotNull CircleShape.Axis axis)
    • CircleShape

      public CircleShape(double radius)
  • Method Details

    • getRadius

      public double getRadius()
    • getAxis

      @NotNull public @NotNull CircleShape.Axis getAxis()
    • 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.