Main Page   Class Hierarchy   Compound List   File List   Compound Members  

KrTRect Struct Template Reference

A rectangle structure. More...

#include <krmath.h>

List of all members.

Public Methods

Width () const
 width of the rectangle.

Height () const
 height of the rectangle.

void Set (T _xmin, T _ymin, T _xmax, T _ymax)
 Initialize. Convenience function.

bool IsValid () const
 Return true if this is potentially a valid rectangle.

bool Intersect (const KrTRect< T > &rect) const
 Return true if the rectangles intersect.

bool HasInside (const KrTRect< T > &rect) const
 Return true if 'rect' is inside this.

void DoUnion (const KrTRect< T > &rect)
 Merge the rect into this.

void DoIntersection (const KrTRect< T > &rect)
 Turn this into the intersection.


Public Attributes

xmin
 the lower x (inclusive).

ymin
 the lower y (inclusive).

xmax
 the upper x (inclusive).

ymax
 the upper y (inclusive).


Detailed Description

template<class T>
struct KrTRect< T >

A rectangle structure.


The documentation for this struct was generated from the following file:
Generated on Fri Aug 9 22:18:40 2002 for Kyra by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001