Two-dimensional bounding rectangle. More...

#include <Rect.h>

Collaboration diagram for Urho3D::Rect:
[legend]

Public Member Functions

 Rect ()
 Construct an undefined 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.
 
 Rect (const Vector4 &vector)
 Construct from a Vector4.
 
 Rect (const float *data)
 Construct from a float array.
 
 Rect (const Rect &rect)
 Copy-construct from another rect.
 
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.
 
Intersection IsInside (const Vector2 &point) const
 Test whether a point is inside.
 
const void * Data () const
 Return float data.
 
Vector4 ToVector4 () const
 Return as a vector.
 
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:
  • /home/travis/build/urho3d/Urho3D/Source/Urho3D/Math/Rect.h
  • /home/travis/build/urho3d/Urho3D/Source/Urho3D/Math/Rect.cpp