Two-dimensional bounding rectangle with integer values. More...

#include <Urho3D/Math/Rect.h>

Collaboration diagram for Urho3D::IntRect:

Public Member Functions

 IntRect ()
 Construct a zero rect.
 IntRect (const IntVector2 &min, const IntVector2 &max)
 Construct from minimum and maximum vectors.
 IntRect (int left, int top, int right, int bottom)
 Construct from coordinates.
 IntRect (const int *data)
 Construct from an int array.
bool operator== (const IntRect &rhs) const
 Test for equality with another rect.
bool operator!= (const IntRect &rhs) const
 Test for inequality with another rect.
IntVector2 Size () const
 Return size.
int Width () const
 Return width.
int Height () const
 Return height.
Intersection IsInside (const IntVector2 &point) const
 Test whether a point is inside.
void Clip (const IntRect &rect)
void Merge (const IntRect &rect)
const int * Data () const
 Return integer data.
String ToString () const
 Return as string.

Public Attributes

int left_
 Left coordinate.
int top_
 Top coordinate.
int right_
 Right coordinate.
int bottom_
 Bottom coordinate.

Static Public Attributes

static const IntRect ZERO
 Zero-sized rect.

Detailed Description

Two-dimensional bounding rectangle with integer values.

Member Function Documentation

void Urho3D::IntRect::Clip ( const IntRect rect)

Clip with another rect. Since IntRect does not have an undefined state like Rect, return (0, 0, 0, 0) if the result is empty.

Here is the call graph for this function:

void Urho3D::IntRect::Merge ( const IntRect rect)

Merge a rect. If this rect was empty, become the other rect. If the other rect is empty, do nothing.

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • Source/Urho3D/Math/Rect.h
  • Source/Urho3D/Math/Rect.cpp