Entity

io.github.srs.model.entity.Entity
See theEntity companion object
trait Entity

Represents a generic entity in a two-dimensional space.

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

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Robot
class Obstacle
class Light
class Boundary
Show all

Members list

Value members

Abstract methods

def id: UUID

The unique identifier for the entity.

The unique identifier for the entity.

Attributes

Returns

a unique identifier UUID.

The orientation of the entity in 2D space.

The orientation of the entity in 2D space.

Attributes

Returns

an Orientation representing the angle or facing direction of this entity.

The position of the entity in 2D space.

The position of the entity in 2D space.

Attributes

Returns

a Point2D representing the (x, y) coordinates of this entity.

The shape type of the entity.

The shape type of the entity.

Attributes

Returns

the ShapeType that defines the geometric shape of this entity.

Concrete methods

def collidesWith(other: Entity): Boolean
Extension method from Entity

Checks if this entity collides with another entity.

Checks if this entity collides with another entity.

Value parameters

other

the other entity to check for collision against this entity.

Attributes

Returns

true if the two entities collide, false otherwise.