CLASS v1.8.0

Rect

kn::Rect

Declared in kraken/geometry/Rect.hpp

Reference

C++ API

x

variable
double x = 0

No description in the source header.

y

variable
double y = 0

No description in the source header.

w

variable
double w = 0

No description in the source header.

h

variable
double h = 0

No description in the source header.

Rect

function6 overloads
Rect()=default
Rect(const Vec2 &size)
Rect(const Vec2 &pos, const Vec2 &size)
template <typename T>
Rect(T x, T y, T w, T h)
template <typename T>
Rect(const Vec2 &pos, T w, T h)
template <typename T>
Rect(T x, T y, const Vec2 &size)

No description in the source header.

~Rect

function
~Rect()=default

No description in the source header.

copy

function
Rect copy() const

No description in the source header.

move

function
void move(const Vec2 &offset)

No description in the source header.

moved

function
Rect moved(const Vec2 &offset) const

No description in the source header.

inflate

function
void inflate(const Vec2 &offset)

No description in the source header.

fit

function
void fit(const Rect &other)

No description in the source header.

clamp

function2 overloads
void clamp(const Vec2 &min, const Vec2 &max)
void clamp(const Rect &other)

No description in the source header.

clamped

function2 overloads
Rect clamped(const Vec2 &min, const Vec2 &max) const
Rect clamped(const Rect &other) const

No description in the source header.

scaleBy

function2 overloads
void scaleBy(double factor)
void scaleBy(const Vec2 &factor)

No description in the source header.

scaledBy

function2 overloads
Rect scaledBy(double factor) const
Rect scaledBy(const Vec2 &factor) const

No description in the source header.

scaleTo

function
void scaleTo(const Vec2 &size)

No description in the source header.

scaledTo

function
Rect scaledTo(const Vec2 &size) const

No description in the source header.

getCorners

function
std::array< Vec2, 4 > getCorners() const

No description in the source header.

getEdges

function
std::array< Line, 4 > getEdges() const

No description in the source header.

operator==

function
bool operator==(const Rect &other) const

No description in the source header.

operator!=

function
bool operator!=(const Rect &other) const

No description in the source header.

operator SDL_Rect() const

No description in the source header.

operator SDL_FRect() const

No description in the source header.

setPos

function
void setPos(const Vec2 &pos)

No description in the source header.

setSize

function
void setSize(const Vec2 &size)

No description in the source header.

setLeft

function
void setLeft(double left)

No description in the source header.

setRight

function
void setRight(double right)

No description in the source header.

setTop

function
void setTop(double top)

No description in the source header.

setBottom

function
void setBottom(double bottom)

No description in the source header.

setTopLeft

function
void setTopLeft(const Vec2 &topLeft)

No description in the source header.

setTopMid

function
void setTopMid(const Vec2 &topMid)

No description in the source header.

setTopRight

function
void setTopRight(const Vec2 &topRight)

No description in the source header.

setMidLeft

function
void setMidLeft(const Vec2 &midLeft)

No description in the source header.

setCenter

function
void setCenter(const Vec2 &center)

No description in the source header.

setMidRight

function
void setMidRight(const Vec2 &midRight)

No description in the source header.

void setBottomLeft(const Vec2 &bottomLeft)

No description in the source header.

setBottomMid

function
void setBottomMid(const Vec2 &bottomMid)

No description in the source header.

void setBottomRight(const Vec2 &bottomRight)

No description in the source header.

getPos

function
Vec2 getPos() const

No description in the source header.

getSize

function
Vec2 getSize() const

No description in the source header.

getLeft

function
double getLeft() const

No description in the source header.

getRight

function
double getRight() const

No description in the source header.

getTop

function
double getTop() const

No description in the source header.

getBottom

function
double getBottom() const

No description in the source header.

getTopLeft

function
Vec2 getTopLeft() const

No description in the source header.

getTopMid

function
Vec2 getTopMid() const

No description in the source header.

getTopRight

function
Vec2 getTopRight() const

No description in the source header.

getMidLeft

function
Vec2 getMidLeft() const

No description in the source header.

getCenter

function
Vec2 getCenter() const

No description in the source header.

getMidRight

function
Vec2 getMidRight() const

No description in the source header.

Vec2 getBottomLeft() const

No description in the source header.

getBottomMid

function
Vec2 getBottomMid() const

No description in the source header.

Vec2 getBottomRight() const

No description in the source header.

Find your next step

Start typing to search the manual.