StaticEntity

io.github.srs.model.StaticEntity
See theStaticEntity companion enum
object StaticEntity

Companion object for StaticEntity, providing factory methods for creating instances.

Attributes

Companion
enum
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def light(pos: Point2D, orient: Orientation, radius: Double, intensity: Double, attenuation: Double): Validation[StaticEntity]

Safely build a Light, reflecting the domain constraints.

Safely build a Light, reflecting the domain constraints.

Value parameters

attenuation

attenuation factor of the light

intensity

intensity of the light

orient

orientation of the light

pos

center position of the light

radius

radius of the light's influence

Attributes

Returns

Right with the created StaticEntity.Light if valid, otherwise Left with a validation error.

def obstacle(pos: Point2D, orient: Orientation, width: Int, height: Int): Validation[StaticEntity]

Safely build an Obstacle, reflecting the domain constraints.

Safely build an Obstacle, reflecting the domain constraints.

Value parameters

height

height of the obstacle

orient

orientation of the obstacle

pos

center position of the obstacle

width

width of the obstacle

Attributes

Returns

Right with the created StaticEntity.Obstacle if valid, otherwise Left with a validation error.