/datum/shape
A simple geometric shape for testing collisions and intersections. This one is a single point.
Vars | |
bounds_x | Distance from the shape's leftmost to rightmost extent. |
---|---|
bounds_y | Distance from the shape's topmost to bottommost extent. |
center_x | Horizontal position of the shape's center point. |
center_y | Vertical position of the shape's center point. |
Procs | |
contains_atom | Returns TRUE if the atom is in or on the shape, otherwise FALSE. |
contains_coords | Returns TRUE if the coord datum is in or on the shape, otherwise FALSE. |
contains_xy | Returns TRUE if the coordinates x, y are in or on the shape, otherwise FALSE. |
intersects_aabb | Returns TRUE if this shape's bounding box intersects the provided shape's bounding box, otherwise FALSE. Generally faster than a full intersection test. |
intersects_rect | Returns TRUE if this shape intersects the provided rectangle shape, otherwise FALSE. |
set_shape | Assign shape variables. |
Var Details
bounds_x
Distance from the shape's leftmost to rightmost extent.
bounds_y
Distance from the shape's topmost to bottommost extent.
center_x
Horizontal position of the shape's center point.
center_y
Vertical position of the shape's center point.
Proc Details
contains_atom
Returns TRUE if the atom is in or on the shape, otherwise FALSE.
contains_coords
Returns TRUE if the coord datum is in or on the shape, otherwise FALSE.
contains_xy
Returns TRUE if the coordinates x, y are in or on the shape, otherwise FALSE.
intersects_aabb
Returns TRUE if this shape's bounding box intersects the provided shape's bounding box, otherwise FALSE. Generally faster than a full intersection test.
intersects_rect
Returns TRUE if this shape intersects the provided rectangle shape, otherwise FALSE.
set_shape
Assign shape variables.