Package me.deecaad.core.utils.shape
Class SphereShape
java.lang.Object
me.deecaad.core.utils.shape.SphereShape
- All Implemented Interfaces:
Shape
A sphere centered at the emitter origin. When
hollow is true, samples lie on the
surface; otherwise they fill the volume. Sampling is random; t is ignored. The emission
direction is the radial outward normal.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull ShapePointgetPoint(double t) Returns one sample from this shape.doublebooleanisHollow()
-
Constructor Details
-
SphereShape
public SphereShape(double radius, boolean hollow) -
SphereShape
public SphereShape(double radius)
-
-
Method Details
-
getRadius
public double getRadius() -
isHollow
public boolean isHollow() -
getPoint
Description copied from interface:ShapeReturns one sample from this shape. For random shapes (sphere, cone, cube)tis ignored; for deterministic shapes (point, line, circle)tparameterizes the sample.
-