ObstacleDsl

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

The DSL for creating and configuring obstacles in the simulation.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Creates a new obstacle with default properties.

Creates a new obstacle with default properties.

Attributes

Returns

A new instance of Obstacle with default values.

Extensions

Extensions

extension (obstacle: Obstacle)
infix def at(pos: Point2D): Obstacle

Sets the position of the obstacle.

Sets the position of the obstacle.

Value parameters

pos

the position of the obstacle.

Attributes

Returns

The updated obstacle with the specified position.

Validates the obstacle's properties. This method allows ensuring that the obstacle properties reflect domain constraints.

Validates the obstacle's properties. This method allows ensuring that the obstacle properties reflect domain constraints.

Attributes

Returns

Right if the obstacle is valid, otherwise Left with an error message.

infix def withHeight(height: Double): Obstacle

Sets the height of the obstacle.

Sets the height of the obstacle.

Value parameters

height

the height of the obstacle.

Attributes

Returns

The updated obstacle with the specified height.

infix def withId(id: UUID): Obstacle

Sets the unique identifier for the obstacle.

Sets the unique identifier for the obstacle.

Value parameters

id

the unique identifier for the obstacle.

Attributes

Returns

the updated obstacle with the specified identifier.

infix def withOrientation(orientation: Orientation): Obstacle

Sets the orientation of the obstacle.

Sets the orientation of the obstacle.

Value parameters

orientation

the orientation of the obstacle.

Attributes

Returns

The updated obstacle with the specified orientation.

infix def withWidth(width: Double): Obstacle

Sets the width of the obstacle.

Sets the width of the obstacle.

Value parameters

width

the width of the obstacle.

Attributes

Returns

The updated obstacle with the specified width.