io.github.srs.model

Members list

Type members

Classlikes

trait Entity

Represents a generic entity in a two-dimensional space.

Represents a generic entity in a two-dimensional space.

An entity is characterized by its position, shape, and orientation.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Obstacle
class Light
object ModelModule

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
trait Orientation

Represents an orientation in a two-dimensional plane.

Represents an orientation in a two-dimensional plane.

The orientation is expressed in degrees but can also be converted to radians.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Orientation

Companion object for Orientation, providing a factory method.

Companion object for Orientation, providing a factory method.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
object Point2D

Companion object for Point2D, providing convenient factory methods.

Companion object for Point2D, providing convenient factory methods.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Point2D.type
enum ShapeType

ShapeType represents different geometric shapes used in the simulation.

ShapeType represents different geometric shapes used in the simulation.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
enum StaticEntity(val position: Point2D, val orientation: Orientation) extends Entity

Represents a static entity in a two-dimensional space.

Represents a static entity in a two-dimensional space.

A static entity is characterized by its position, orientation, and shape.

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
trait Entity
class Object
trait Matchable
class Any
Show all
Known subtypes
class Obstacle
class Light
object StaticEntity

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

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

Attributes

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

Types

type Point2D = (Double, Double)

Represents a point in a two-dimensional Cartesian coordinate system.

Represents a point in a two-dimensional Cartesian coordinate system.

A Point2D is defined as a tuple of two Double values: (x, y).

Attributes

Extensions

Extensions

extension (p: Point2D)
def distanceTo(other: Point2D): Double

Computes the Euclidean distance between this point and another point.

Computes the Euclidean distance between this point and another point.

The Euclidean distance is calculated as:

sqrt((x2 - x1)^2 + (y2 - y1)^2)

Value parameters

other

the other point to which the distance is measured.

Attributes

Returns

the Euclidean distance between this point and other.