Urho3D
Public Member Functions | Public Attributes | Static Public Attributes
Urho3D::Rect Class Reference

Two-dimensional bounding rectangle. More...

#include <Rect.h>

List of all members.

Public Member Functions

 Rect ()
 Construct an undefined rect.
 Rect (const Rect &rect)
 Copy-construct from another rect.
 Rect (const Vector2 &min, const Vector2 &max)
 Construct from minimum and maximum vectors.
 Rect (float left, float top, float right, float bottom)
 Construct from coordinates.
Rectoperator= (const Rect &rhs)
 Assign from another rect.
bool operator== (const Rect &rhs) const
 Test for equality with another rect.
bool operator!= (const Rect &rhs) const
 Test for inequality with another rect.
void Define (const Rect &rect)
 Define from another rect.
void Define (const Vector2 &min, const Vector2 &max)
 Define from minimum and maximum vectors.
void Define (const Vector2 &point)
 Define from a point.
void Merge (const Vector2 &point)
 Merge a point.
void Merge (const Rect &rect)
 Merge a rect.
void Clear ()
 Clear to undefined state.
void Clip (const Rect &rect)
 Clip with another rect.
Vector2 Center () const
 Return center.
Vector2 Size () const
 Return size.
Vector2 HalfSize () const
 Return half-size.
bool Equals (const Rect &rhs) const
 Test for equality with another rect with epsilon.
const void * Data () const
 Return float data.
String ToString () const
 Return as string.

Public Attributes

Vector2 min_
 Minimum vector.
Vector2 max_
 Maximum vector.
bool defined_
 Defined flag.

Static Public Attributes

static const Rect FULL
 Rect in the range (-1, -1) - (1, 1)
static const Rect POSITIVE
 Rect in the range (0, 0) - (1, 1)
static const Rect ZERO
 Zero-sized rect.

Detailed Description

Two-dimensional bounding rectangle.


The documentation for this class was generated from the following files: