Package limn.render3d
Record Class Light.Spot
java.lang.Object
java.lang.Record
limn.render3d.Light.Spot
- All Implemented Interfaces:
Light
- Enclosing interface:
Light
public static record Light.Spot(Vec3 position, Vec3 direction, Vec3 color, float intensity, float range, float innerAngleRadians, float outerAngleRadians)
extends Record
implements Light
A cone light at
position aimed along direction (pointing away
from the light). Full intensity within innerAngleRadians, falling to
zero at outerAngleRadians; range as in Light.Point.-
Nested Class Summary
Nested classes/interfaces inherited from interface limn.render3d.Light
Light.Directional, Light.Point, Light.Spot -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.Returns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of theinnerAngleRadiansrecord component.floatReturns the value of theintensityrecord component.floatReturns the value of theouterAngleRadiansrecord component.position()Returns the value of thepositionrecord component.floatrange()Returns the value of therangerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Spot
public Spot(Vec3 position, Vec3 direction, Vec3 color, float intensity, float range, float innerAngleRadians, float outerAngleRadians) Creates an instance of aSpotrecord class.- Parameters:
position- the value for thepositionrecord componentdirection- the value for thedirectionrecord componentcolor- the value for thecolorrecord componentintensity- the value for theintensityrecord componentrange- the value for therangerecord componentinnerAngleRadians- the value for theinnerAngleRadiansrecord componentouterAngleRadians- the value for theouterAngleRadiansrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
direction
Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-
color
Returns the value of thecolorrecord component. -
intensity
public float intensity()Returns the value of theintensityrecord component. -
range
public float range()Returns the value of therangerecord component.- Returns:
- the value of the
rangerecord component
-
innerAngleRadians
public float innerAngleRadians()Returns the value of theinnerAngleRadiansrecord component.- Returns:
- the value of the
innerAngleRadiansrecord component
-
outerAngleRadians
public float outerAngleRadians()Returns the value of theouterAngleRadiansrecord component.- Returns:
- the value of the
outerAngleRadiansrecord component
-