Package limn.render3d
Record Class Light.Point
java.lang.Object
java.lang.Record
limn.render3d.Light.Point
- All Implemented Interfaces:
Light
- Enclosing interface:
Light
public static record Light.Point(Vec3 position, Vec3 color, float intensity, float range)
extends Record
implements Light
An omnidirectional light at
position with inverse-square falloff.
range > 0 applies a smooth windowing cutoff at that distance;
range ≤ 0 means unbounded (pure inverse-square).-
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.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 theintensityrecord component.static Light.PointA positioned light falling off with distance.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
-
Point
Creates an instance of aPointrecord class.- Parameters:
position- the value for thepositionrecord componentcolor- the value for thecolorrecord componentintensity- the value for theintensityrecord componentrange- the value for therangerecord component
-
-
Method Details
-
of
A positioned light falling off with distance. -
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
-
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
-