LightDsl

io.github.srs.model.entity.staticentity.dsl.LightDsl
object LightDsl

The DSL for creating and configuring lights in the simulation.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
LightDsl.type

Members list

Value members

Concrete methods

def light: Light

Creates a new light with default properties.

Creates a new light with default properties.

Attributes

Returns

A new instance of Light with default values.

Extensions

Extensions

extension (light: Light)
infix def at(pos: Point2D): Light

Sets the position of the light.

Sets the position of the light.

Value parameters

pos

the position of the light.

Attributes

Returns

The updated light with the specified position.

infix def validate: Validation[Light]

Provides an extension method for the Light class to allow for a more fluent DSL.

Provides an extension method for the Light class to allow for a more fluent DSL.

Attributes

infix def withAttenuation(attenuation: Double): Light

Sets the attenuation of the light

Sets the attenuation of the light

Value parameters

attenuation

the attenuation factor of the light.

Attributes

Returns

The updated light with the specified attenuation.

infix def withId(id: UUID): Light

Sets the unique identifier for the light.

Sets the unique identifier for the light.

Value parameters

id

the unique identifier for the light.

Attributes

Returns

the updated light with the specified identifier.

infix def withIlluminationRadius(radius: Double): Light

Sets the illumination radius of the light, which defines how far the light can illuminate. This is different from the radius of the light bulb, as it defines the effective range of the light's illumination.

Sets the illumination radius of the light, which defines how far the light can illuminate. This is different from the radius of the light bulb, as it defines the effective range of the light's illumination.

Value parameters

radius

the illumination radius of the light.

Attributes

Returns

The updated light with the specified illumination radius.

infix def withIntensity(intensity: Double): Light

Sets the intensity of the light

Sets the intensity of the light

Value parameters

intensity

the intensity of the light.

Attributes

Returns

The updated light with the specified intensity.

infix def withOrientation(orientation: Orientation): Light

Sets the orientation of the light.

Sets the orientation of the light.

Value parameters

orientation

the orientation of the light.

Attributes

Returns

The updated light with the specified orientation.

infix def withRadius(radius: Double): Light

Sets the radius of the light, which defines the dimension of the light bulb.

Sets the radius of the light, which defines the dimension of the light bulb.

Value parameters

radius

the radius of the light bulb.

Attributes

Returns

The updated light with the specified radius.