Package me.deecaad.core.utils.shape
Class ConeShape
java.lang.Object
me.deecaad.core.utils.shape.ConeShape
- All Implemented Interfaces:
Shape
A cone with apex at the emitter origin, axis along local +Z, half-angle
halfAngleRadians
and length. Samples are random uniform-solid-angle directions within the cone; the offset
places each sample on the cone's "spread surface" at the chosen direction times length.
The emission direction is the chosen unit direction (outward along the cone).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledouble@NotNull ShapePointgetPoint(double t) Returns one sample from this shape.
-
Constructor Details
-
ConeShape
public ConeShape(double halfAngleRadians, double length) - Parameters:
halfAngleRadians- Half the cone's opening angle, in radians.0= pure +Z;π/2= full hemisphere.length- Distance from the apex along the chosen direction at which the offset is placed.
-
-
Method Details
-
getHalfAngleRadians
public double getHalfAngleRadians() -
getLength
public double getLength() -
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.
-