Represents a wall entity that acts as a collision barrier in the
simulation.
Walls are static rectangular obstacles that can block movement and provide boundaries within the simulation space.They support dynamic resizing and participate in the collision detection system .
Value parameters
- height
-
the height of the wall in simulation units
- id
-
unique identifier for this wall instance
- position
-
the 2D coordinates of the wall 's top -left corner
- width
-
the width of the wall in simulation units
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Entitytrait SizeChangingEntitytrait Collidabletrait Sizedtrait Positionedclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Creates a copy of this entity with a new height.
Creates a copy of this entity with a new height.
Value parameters
- newHeight
-
the new height value
Attributes
- Returns
-
a new instance with the updated height
Creates a copy of this entity with new dimensions.
Creates a copy of this entity with new dimensions.
Value parameters
- newHeight
-
the new height value
- newWidth
-
the new width value
Attributes
- Returns
-
a new instance with the updated dimensions
Creates a copy of this entity with a new width.
Creates a copy of this entity with a new width.
Value parameters
- newWidth
-
the new width value
Attributes
- Returns
-
a new instance with the updated width
Inherited methods
Returns the bottom-left corner coordinates of this entity.
Returns the bottom-left corner coordinates of this entity.
Attributes
- Returns
-
the position vector representing the bottom-left corner
- Inherited from:
- Collidable
Returns the bottom-right corner coordinates of this entity.
Returns the bottom-right corner coordinates of this entity.
Attributes
- Returns
-
the position vector representing the bottom-right corner
- Inherited from:
- Collidable
Returns the center point of this entity's bounding rectangle.
Returns the center point of this entity's bounding rectangle.
Attributes
- Returns
-
the position vector representing the geometric center
- Inherited from:
- Collidable
Checks if this entity collides with another positioned entity.
Checks if this entity collides with another positioned entity.
Performs axis-aligned bounding box collision detection by checking for overlap on both horizontal and vertical axes. Both overlaps must be true for a collision to be detected.
Value parameters
- other
-
the other positioned entity to check collision against
Attributes
- Returns
-
true if the entities' bounding boxes overlap
- Inherited from:
- Collidable
Checks if a point is contained within this entity's bounds.
Checks if a point is contained within this entity's bounds.
Uses inclusive bounds checking on the left and top edges, and exclusive on the right and bottom edges to prevent edge overlap issues.
Value parameters
- point
-
the 2D point to test for containment
Attributes
- Returns
-
true if the point is within this entity's rectangular bounds
- Inherited from:
- Collidable
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Returns the top-left corner coordinates of this entity.
Returns the top-left corner coordinates of this entity.
Attributes
- Returns
-
the position vector representing the top-left corner
- Inherited from:
- Collidable
Returns the top-right corner coordinates of this entity.
Returns the top-right corner coordinates of this entity.
Attributes
- Returns
-
the position vector representing the top-right corner
- Inherited from:
- Collidable
Returns all four corner vertices of this entity's bounding rectangle.
Returns all four corner vertices of this entity's bounding rectangle.
Attributes
- Returns
-
sequence containing topLeft, topRight, bottomLeft, and bottomRight vertices
- Inherited from:
- Collidable