grinliz::Rectangle2< T > Struct Template Reference

#include <glrectangle.h>

List of all members.


Detailed Description

template<class T>
struct grinliz::Rectangle2< T >

A rectangle structure.


Public Member Functions

void Set (T _xmin, T _ymin, T _xmax, T _ymax)
 Initialize. Convenience function.
void Zero ()
 Set all the members to zero.
void FromPair (T x0, T y0, T x1, T y1)
bool Intersect (const Rectangle2< T > &rect) const
 Return true if the rectangles intersect.
bool Contains (const Rectangle2< T > &rect) const
 Return true if 'rect' is inside this.
void DoUnion (const Rectangle2< T > &rect)
 Merge the rect into this.
void DoUnion (T x, T y)
 Merge the rect into this.
void DoIntersection (const Rectangle2< T > &rect)
 Turn this into the intersection.
void DoClip (const Rectangle2< T > &rect)
 Clip this to the passed in rectangle. Will become invalid if they don't intersect.
void Scale (T x, T y)
 Scale all coordinates by the given ratios:.
void EdgeAdd (T i)
 Changes the boundaries.
void Edge (int i, Vector2< T > *head, Vector2< T > *tail)
 Query the edge of the rectangle. The edges are ordered: bottom, right, top, left.


Member Function Documentation

template<class T>
void grinliz::Rectangle2< T >::FromPair ( x0,
y0,
x1,
y1 
) [inline]

Creates the rectangle from 2 points, which can be in any relationship to each other.


The documentation for this struct was generated from the following file:
Generated on Fri Mar 23 19:36:26 2007 for Lilith3D by  doxygen 1.5.1-p1