![]() |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
#include <Rectangle.hpp>
Public Member Functions | |
| constexpr | Rectangle (::Vector2 position, ::Vector2 size) |
| constexpr | Rectangle (::Vector2 size) |
| constexpr | Rectangle (::Vector4 rect) |
| constexpr | Rectangle (const ::Rectangle &rect) |
| constexpr | Rectangle (float x) |
| constexpr | Rectangle (float x, float y) |
| constexpr | Rectangle (float x, float y, float width) |
| constexpr | Rectangle (float x, float y, float width, float height) |
| bool | CheckCollision (::Rectangle rec2) const |
| Check collision between two rectangles. | |
| bool | CheckCollision (::Vector2 center, float radius) const |
| Check collision between circle and rectangle. | |
| bool | CheckCollision (::Vector2 point) const |
| Check if point is inside rectangle. | |
| void | Draw (::Color color) const |
| void | Draw (::Vector2 origin, float rotation, ::Color color) const |
| void | DrawGradient (::Color topLeft, ::Color bottomLeft, ::Color bottomRight, ::Color topRight) const |
| void | DrawGradientH (::Color color1, ::Color color2) const |
| void | DrawGradientV (::Color color1, ::Color color2) const |
| void | DrawLines (::Color color) const |
| void | DrawLines (::Color color, float lineThick) const |
| void | DrawRounded (float roundness, int segments, ::Color color) const |
| void | DrawRoundedLines (float roundness, int segments, ::Color color) const |
| void | DrawRoundedLines (float roundness, int segments, float lineThick, ::Color color) const |
| ::Rectangle | GetCollision (::Rectangle rec2) const |
| Get collision rectangle for two rectangles collision. | |
| float | GetHeight () const |
| Retrieves the height value for the object. | |
| Vector2 | GetPosition () const |
| Vector2 | GetSize () const |
| float | GetWidth () const |
| Retrieves the width value for the object. | |
| float | GetX () const |
| Retrieves the x value for the object. | |
| float | GetY () const |
| Retrieves the y value for the object. | |
| constexpr | operator::Vector4 () const |
| Rectangle & | operator= (const ::Rectangle &rect) |
| void | SetHeight (float value) |
| Sets the height value for the object. | |
| Rectangle & | SetPosition (const ::Vector2 &position) |
| Rectangle & | SetPosition (float newX, float newY) |
| Rectangle & | SetShapesTexture (const ::Texture2D &texture) |
| Rectangle & | SetSize (const ::Vector2 &size) |
| Rectangle & | SetSize (float newWidth, float newHeight) |
| void | SetWidth (float value) |
| Sets the width value for the object. | |
| void | SetX (float value) |
| Sets the x value for the object. | |
| void | SetY (float value) |
| Sets the y value for the object. | |
| constexpr ::Vector4 | ToVector4 () const |
Static Public Member Functions | |
| static void | Draw (::Vector2 position, ::Vector2 size, ::Color color) |
| static void | Draw (int posX, int posY, int width, int height, ::Color color) |
| Draw a color-filled rectangle. | |
Protected Member Functions | |
| void | set (const ::Rectangle &rect) |
Rectangle type.
Definition at line 12 of file Rectangle.hpp.
|
inlineconstexpr |
Definition at line 14 of file Rectangle.hpp.
|
inlineconstexpr |
Definition at line 16 of file Rectangle.hpp.
|
inlineconstexpr |
Definition at line 17 of file Rectangle.hpp.
|
inlineconstexpr |
Definition at line 18 of file Rectangle.hpp.
|
inlineconstexpr |
Definition at line 19 of file Rectangle.hpp.
|
inlineconstexpr |
Definition at line 20 of file Rectangle.hpp.
|
inlineconstexpr |
Definition at line 22 of file Rectangle.hpp.
|
inlineconstexpr |
Definition at line 23 of file Rectangle.hpp.
|
inlineconstexpr |
Definition at line 24 of file Rectangle.hpp.
|
inline |
Check collision between two rectangles.
Definition at line 107 of file Rectangle.hpp.
|
inline |
Check collision between circle and rectangle.
Definition at line 122 of file Rectangle.hpp.
|
inline |
Check if point is inside rectangle.
Definition at line 117 of file Rectangle.hpp.
|
inline |
Definition at line 51 of file Rectangle.hpp.
|
inline |
Definition at line 53 of file Rectangle.hpp.
|
inlinestatic |
Definition at line 47 of file Rectangle.hpp.
|
inlinestatic |
Draw a color-filled rectangle.
Definition at line 43 of file Rectangle.hpp.
|
inline |
Definition at line 77 of file Rectangle.hpp.
|
inline |
Definition at line 67 of file Rectangle.hpp.
|
inline |
Definition at line 57 of file Rectangle.hpp.
|
inline |
Definition at line 81 of file Rectangle.hpp.
|
inline |
Definition at line 90 of file Rectangle.hpp.
|
inline |
Definition at line 92 of file Rectangle.hpp.
|
inline |
Definition at line 96 of file Rectangle.hpp.
|
inline |
Definition at line 100 of file Rectangle.hpp.
|
inline |
Get collision rectangle for two rectangles collision.
Definition at line 112 of file Rectangle.hpp.
|
inline |
Retrieves the height value for the object.
Definition at line 29 of file Rectangle.hpp.
|
inline |
Definition at line 141 of file Rectangle.hpp.
|
inline |
Definition at line 126 of file Rectangle.hpp.
|
inline |
Retrieves the width value for the object.
Definition at line 28 of file Rectangle.hpp.
|
inline |
Retrieves the x value for the object.
Definition at line 26 of file Rectangle.hpp.
|
inline |
Retrieves the y value for the object.
Definition at line 27 of file Rectangle.hpp.
|
inlineexplicitconstexpr |
Definition at line 38 of file Rectangle.hpp.
|
inline |
Definition at line 31 of file Rectangle.hpp.
|
inlineprotected |
Definition at line 151 of file Rectangle.hpp.
|
inline |
Sets the height value for the object.
| value | The value of which to set height to. |
Definition at line 29 of file Rectangle.hpp.
|
inline |
Definition at line 149 of file Rectangle.hpp.
|
inline |
Definition at line 143 of file Rectangle.hpp.
|
inline |
Definition at line 136 of file Rectangle.hpp.
|
inline |
Definition at line 134 of file Rectangle.hpp.
|
inline |
Definition at line 128 of file Rectangle.hpp.
|
inline |
Sets the width value for the object.
| value | The value of which to set width to. |
Definition at line 28 of file Rectangle.hpp.
|
inline |
Sets the x value for the object.
| value | The value of which to set x to. |
Definition at line 26 of file Rectangle.hpp.
|
inline |
Sets the y value for the object.
| value | The value of which to set y to. |
Definition at line 27 of file Rectangle.hpp.
|
inline |
Definition at line 36 of file Rectangle.hpp.