Public Types | Public Member Functions | Public Attributes

rect2d_t< T > Struct Template Reference
[Core Geometry Objects]

templated 2D rectangle More...

#include <geometry_2d.h>

Collaboration diagram for rect2d_t< T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef point2d_t< T > point_t

Public Member Functions

 rect2d_t (void) throw ()
 rect2d_t (T iLeft, T iTop, T iRight, T iBottom) throw ()
void inflate (const rect2d_t &r) throw ()
 expand rect to fully contain input rect
bool isValid (void) const throw ()
 valid?
void expand (T s) throw ()
 expand rect in all dimensions by provided amount
bool isEmpty (void) const throw ()
 null size?
void shift (T dx, T dy) throw ()
 move rect by specified dx,dy amount
bool contains (const point_t &pt) const throw ()
 does this rect contain the specified point?
bool contains (float x, float y) const throw ()
 does this rect contain the specified point?
bool contains (const rect2d_t &r) const throw ()
 does this rect fully contain the specified rect?
bool intersects (const rect2d_t &r) const throw ()
 does this rect intersect the specified rect?
void expandToInclude (const point_t &p) throw ()
 expand to include the given point
void expandToInclude (T x, T y) throw ()
 expand to include the given point
void set (T in_left, T in_top, T in_right, T in_bottom) throw ()
 explicitly set the rect coordinates
void fromPoints (const point_t &p0, const point_t &p1) throw ()
 minimum bounding rect containing the two points
void scale (float rX, float rY) throw ()
 scale out in X and Y directions
void clear (void) throw ()
 reset rect to be null rectangle at (0,0)
void dump (const char *title) const throw ()
 debug helper to dump rectangle to std err
point_t getTopLeft (void) const throw ()
 return top left coordinate
point_t getBottomRight (void) const throw ()
 return top right coordinate

Public Attributes

left
top
right
bottom

Detailed Description

template<class T>
struct rect2d_t< T >

templated 2D rectangle

Definition at line 135 of file geometry_2d.h.


Member Typedef Documentation

template<class T>
typedef point2d_t<T> rect2d_t< T >::point_t

Definition at line 136 of file geometry_2d.h.


The documentation for this struct was generated from the following file: