module Oid::CollisionFuncs
Extended Modules
Defined in:
oid/core/collision_funcs.crInstance Method Summary
- #bounding_box_for_asset(e : Oid::CollidableEntity, asset_width, asset_height) : Oid::Element::BoundingBox
- #bounding_box_for_element(e : Oid::CollidableEntity) : Oid::Element::BoundingBox
-
#bounding_box_for_entity(e : Oid::CollidableEntity) : Oid::Element::BoundingBox
Will return a
Oid::Element::BoundingBox
for the provided entity or raise error -
#calc_overlap_rec(data)
Calculate the orgin and size of the overlap between two rectangles see
#rec_overlap_data
for +data+ format - #calc_rec_origin(origin_type : Oid::Enum::OriginType, width, height) : Oid::Vector2
- #collision_ray_box?(ray : Oid::Ray, box : Oid::Element::BoundingBox) : Bool
-
#collision_rec(e1 : Oid::CollidableEntity, e2 : Oid::CollidableEntity)
Return a rectangle that is the area of overlap with the collision
-
#collision_recs?(box1 : Oid::Element::BoundingBox, box2 : Oid::Element::BoundingBox) : Bool
Check collision between two bounding boxes
-
#collision_recs?(e1 : Oid::CollidableEntity, e2 : Oid::CollidableEntity) : Bool
Check collision between two Entites
-
#rec_overlap_data(box1 : Oid::Element::BoundingBox, box2 : Oid::Element::BoundingBox)
Formats the overlap data for two
Oid::Element::BoundingBox
objects
Instance Method Detail
Will return a Oid::Element::BoundingBox
for the provided entity or raise error
Calculate the orgin and size of the overlap between two rectangles
see #rec_overlap_data
for +data+ format
Return a rectangle that is the area of overlap with the collision
Check collision between two bounding boxes
Check collision between two Entites
Formats the overlap data for two Oid::Element::BoundingBox
objects