Class representing a rectangle in space. The position is the center of the rectangle, and the extents is half the size (so, distance between the center and outermost part of the rectangle). This is meant to be used for checking for collisions between different types of shapes.
More...
#include <Shapes.h>
|
|
| Rectangle (const Vector2f &position, const Vector2f &extents) |
|
| Rectangle (const Rectf &rect) |
| virtual std::unique_ptr< Shape > | Clone () const override |
| virtual bool | IsColliding (const Shape &other) const override |
| virtual bool | Collides (const Point &p) const override |
| virtual bool | Collides (const Line &l) const override |
| virtual bool | Collides (const Circle &c) const override |
| virtual bool | Collides (const Rectangle &r) const override |
|
| Shape (const Vector2f &position) |
Class representing a rectangle in space. The position is the center of the rectangle, and the extents is half the size (so, distance between the center and outermost part of the rectangle). This is meant to be used for checking for collisions between different types of shapes.
◆ Clone()
| std::unique_ptr< Shape > Mochi::Physics::Rectangle::Clone |
( |
| ) |
const |
|
overridevirtual |
◆ Collides() [1/4]
| bool Mochi::Physics::Rectangle::Collides |
( |
const Circle & | c | ) |
const |
|
overridevirtual |
◆ Collides() [2/4]
| bool Mochi::Physics::Rectangle::Collides |
( |
const Line & | l | ) |
const |
|
overridevirtual |
◆ Collides() [3/4]
| bool Mochi::Physics::Rectangle::Collides |
( |
const Point & | p | ) |
const |
|
overridevirtual |
◆ Collides() [4/4]
| bool Mochi::Physics::Rectangle::Collides |
( |
const Rectangle & | r | ) |
const |
|
overridevirtual |
◆ IsColliding()
| bool Mochi::Physics::Rectangle::IsColliding |
( |
const Shape & | other | ) |
const |
|
overridevirtual |
The documentation for this struct was generated from the following files:
- Engine/src/Physics/Shapes.h
- Engine/src/Physics/Shapes.cpp