zengine/doc/html/classZE_1_1ZRect.html

988 lines
37 KiB
HTML
Raw Normal View History

2003-04-27 22:15:26 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ZE::ZRect class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3-rc2 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>ZE::ZRect Class Reference</h1><code>#include &lt;<a class="el" href="ZE__ZRect_8h-source.html">ZE_ZRect.h</a>&gt;</code>
<p>
<a href="classZE_1_1ZRect-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classZE_1_1ZRect.html">ZRect</a> Rectangle class, used to define a rectangular area or perform operations on the defined area.
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a0">ZRect</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Default constructor for <a class="el" href="classZE_1_1ZRect.html">ZRect</a>.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a1">ZRect</a> (float x, float y, float width, float height)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Constructor for <a class="el" href="classZE_1_1ZRect.html">ZRect</a> that takes inital values.</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a2">ZRect</a> (const SDL_Rect &amp;rect)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Constructor for <a class="el" href="classZE_1_1ZRect.html">ZRect</a> that uses an SDL_Rect.</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a3">ZRect</a> (const ZRect &amp;rhs)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Copy constructor for <a class="el" href="classZE_1_1ZRect.html">ZRect</a>.</em> <a href="#a3"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>const ZRect &amp;&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a4">operator=</a> (const ZRect &amp;rhs)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Overload for = operator with <a class="el" href="classZE_1_1ZRect.html">ZRect</a>.</em> <a href="#a4"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a5">~ZRect</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Virtual Destructor.</em> <a href="#a5"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a6">operator&lt;</a> (const ZRect &amp;rhs) const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Overload for &lt; operator with <a class="el" href="classZE_1_1ZRect.html">ZRect</a>, based upon location then size.</em> <a href="#a6"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a7">Draw</a> (Uint8 red, Uint8 green, Uint8 blue, Uint8 alpha=255) const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Draw rectangle. (filled).</em> <a href="#a7"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a8">Move</a> (float x, float y)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Changes the location of the rectangle.</em> <a href="#a8"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a9">MoveRel</a> (float xMove, float yMove)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Changes the location of the rectangle based upon the current location.</em> <a href="#a9"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a10">Resize</a> (float width, float height)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Resize rectangle.</em> <a href="#a10"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a11">ResizeRel</a> (float widthChange, float heightChange)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Grows or shrinks current rectangle.</em> <a href="#a11"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a12">Intersects</a> (const ZRect &amp;rect) const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Check if one <a class="el" href="classZE_1_1ZRect.html">ZRect</a> intersects another.</em> <a href="#a12"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a13">Contains</a> (float x, float y) const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Check if a rectangle contains a given point.</em> <a href="#a13"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a14">Contains</a> (const ZRect &amp;rect) const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Check if a rectangle contains a given point.</em> <a href="#a14"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>ZRect&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a15">Intersection</a> (const ZRect &amp;rect) const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Finds intersection of two rectangles.</em> <a href="#a15"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>SDL_Rect&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a16">SDLrect</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns an SDL_Rect representing the rectangle.</em> <a href="#a16"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a17">X</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns X Location.</em> <a href="#a17"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a18">Y</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns Y Location.</em> <a href="#a18"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a19">Left</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Return position of left side.</em> <a href="#a19"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a20">Right</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Return position of right side.</em> <a href="#a20"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a21">Top</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Return position of top side.</em> <a href="#a21"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a22">Bottom</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Return position of bottom side.</em> <a href="#a22"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a23">Width</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns Width.</em> <a href="#a23"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#a24">Height</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns Height.</em> <a href="#a24"></a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="n0" doxytag="ZE::ZRect::rX"></a>
float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#n0">rX</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>X Position of top left corner of rectangle.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="n1" doxytag="ZE::ZRect::rY"></a>
float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#n1">rY</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Y Position of top left corner of rectangle.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="n2" doxytag="ZE::ZRect::rWidth"></a>
float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#n2">rWidth</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Width of Rectangle.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="n3" doxytag="ZE::ZRect::rHeight"></a>
float&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZRect.html#n3">rHeight</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Height of Rectangle.</em></font><br><br></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="ZE::ZRect::ZRect"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> ZE::ZRect::ZRect </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Default constructor, initializes all values to zero. </td>
</tr>
</table>
<a name="a1" doxytag="ZE::ZRect::ZRect"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> ZE::ZRect::ZRect </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>x</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>y</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>width</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>height</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Constructor for <a class="el" href="classZE_1_1ZRect.html">ZRect</a> that takes inital values for all four members. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>x</em>&nbsp;</td><td>Value for x position. </td></tr>
<tr><td valign=top><em>y</em>&nbsp;</td><td>Value for y position. </td></tr>
<tr><td valign=top><em>width</em>&nbsp;</td><td>Value for width. </td></tr>
<tr><td valign=top><em>height</em>&nbsp;</td><td>Value for height. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="a2" doxytag="ZE::ZRect::ZRect"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> ZE::ZRect::ZRect </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const SDL_Rect &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>rect</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Constructor for <a class="el" href="classZE_1_1ZRect.html">ZRect</a> that initializes from an SDL_Rect. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>rect</em>&nbsp;</td><td>SDL_Rect to intialize from. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="a3" doxytag="ZE::ZRect::ZRect"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> ZE::ZRect::ZRect </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const ZRect &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>rhs</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Takes a <a class="el" href="classZE_1_1ZRect.html">ZRect</a> and constructs a new identical rectangle. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>rhs</em>&nbsp;</td><td>Rectangle to construct from. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="a5" doxytag="ZE::ZRect::~ZRect"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> ZE::ZRect::~ZRect </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Virtual destructor making future inheritance safe. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a4" doxytag="ZE::ZRect::operator="></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const ZRect &amp; ZE::ZRect::operator= </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const ZRect &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>rhs</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Copies all values from one <a class="el" href="classZE_1_1ZRect.html">ZRect</a> into another. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>rhs</em>&nbsp;</td><td>Rectangle to copy values from. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>New value of the <a class="el" href="classZE_1_1ZRect.html">ZRect</a>. </dd></dl>
</td>
</tr>
</table>
<a name="a6" doxytag="ZE::ZRect::operator<"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool ZE::ZRect::operator&lt; </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const ZRect &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>rhs</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Rectangles are sorted by y value, followed by x value, if they start at the same place, the smaller of the two is deemed less than the other. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>rhs</em>&nbsp;</td><td>Rectangle to compare. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>True if this rectangle is smaller than the rhs rectangle, false otherwise. </dd></dl>
</td>
</tr>
</table>
<a name="a7" doxytag="ZE::ZRect::Draw"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ZE::ZRect::Draw </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">Uint8&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>red</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>Uint8&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>green</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>Uint8&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>blue</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>Uint8&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>alpha</em> = 255</td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Draw the <a class="el" href="classZE_1_1ZRect.html">ZRect</a>, this function is mainly provided for testing purposes. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>red</em>&nbsp;</td><td>Red component of color (0-255). </td></tr>
<tr><td valign=top><em>green</em>&nbsp;</td><td>Green component of color (0-255). </td></tr>
<tr><td valign=top><em>blue</em>&nbsp;</td><td>Blue component of color (0-255). </td></tr>
<tr><td valign=top><em>alpha</em>&nbsp;</td><td>Alpha component of color (0-255). </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="a8" doxytag="ZE::ZRect::Move"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ZE::ZRect::Move </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>x</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>y</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Changes the current x,y position of the rectangle. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>x</em>&nbsp;</td><td>New x position for rectangle. </td></tr>
<tr><td valign=top><em>y</em>&nbsp;</td><td>New y position for rectangle. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="a9" doxytag="ZE::ZRect::MoveRel"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ZE::ZRect::MoveRel </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>xMove</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>yMove</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Changes the current x,y position of the rectangle relative to the current location. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>xMove</em>&nbsp;</td><td>Offset for new x position from current. </td></tr>
<tr><td valign=top><em>yMove</em>&nbsp;</td><td>Offset for new y position from current. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="a10" doxytag="ZE::ZRect::Resize"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ZE::ZRect::Resize </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>width</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>height</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Changes the current width and height of the rectangle. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>width</em>&nbsp;</td><td>New width for rectangle. </td></tr>
<tr><td valign=top><em>height</em>&nbsp;</td><td>New height for rectangle. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="a11" doxytag="ZE::ZRect::ResizeRel"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ZE::ZRect::ResizeRel </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>widthChange</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>heightChange</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Changes the current width and height of the rectangle based upon current values. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>widthChange</em>&nbsp;</td><td>Amount to add or subtract from width. </td></tr>
<tr><td valign=top><em>heightChange</em>&nbsp;</td><td>Amount to add or subtract from height. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="a12" doxytag="ZE::ZRect::Intersects"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool ZE::ZRect::Intersects </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const ZRect &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>rect</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Checks for overlap and returns boolean value based on if overlap exists. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>rect</em>&nbsp;</td><td>Rectangle to check for intersection with. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>True if intersection occured, false otherwise. </dd></dl>
</td>
</tr>
</table>
<a name="a13" doxytag="ZE::ZRect::Contains"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool ZE::ZRect::Contains </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>x</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>float&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>y</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Checks point against boundaries of rectangle and returns result. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>x</em>&nbsp;</td><td>X value of point to check. </td></tr>
<tr><td valign=top><em>y</em>&nbsp;</td><td>Y value of poitn to check. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Boolean variable, true if point is inside rectangle, false otherwise. </dd></dl>
</td>
</tr>
</table>
<a name="a14" doxytag="ZE::ZRect::Contains"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool ZE::ZRect::Contains </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const ZRect &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>rect</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Checks point against boundaries of rectangle and returns result. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>rect</em>&nbsp;</td><td>Rectangle to check for point. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Boolean variable, true if point is inside rectangle, false otherwise. </dd></dl>
</td>
</tr>
</table>
<a name="a15" doxytag="ZE::ZRect::Intersection"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> ZRect ZE::ZRect::Intersection </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const ZRect &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>rect</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Checks for intersection, and returns rectangle where the two rectangles intersect. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>rect</em>&nbsp;</td><td>Rectangle to check intersection with. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="classZE_1_1ZRect.html">ZRect</a> describing intersection area. </dd></dl>
</td>
</tr>
</table>
<a name="a16" doxytag="ZE::ZRect::SDLrect"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> SDL_Rect ZE::ZRect::SDLrect </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Makes a SDL_Rect representing the rectangle, for use where functions require an SDL_Rect. <dl compact><dt><b>Returns:</b></dt><dd>SDL_Rect representing the <a class="el" href="classZE_1_1ZRect.html">ZRect</a>. </dd></dl>
</td>
</tr>
</table>
<a name="a17" doxytag="ZE::ZRect::X"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float ZE::ZRect::X </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Access private X location member. <dl compact><dt><b>Returns:</b></dt><dd>Value of mX. </dd></dl>
</td>
</tr>
</table>
<a name="a18" doxytag="ZE::ZRect::Y"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float ZE::ZRect::Y </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Access private Y location member. <dl compact><dt><b>Returns:</b></dt><dd>Value of mY. </dd></dl>
</td>
</tr>
</table>
<a name="a19" doxytag="ZE::ZRect::Left"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float ZE::ZRect::Left </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Find X position of left side of rectangle. <dl compact><dt><b>Returns:</b></dt><dd>X position of left side. </dd></dl>
</td>
</tr>
</table>
<a name="a20" doxytag="ZE::ZRect::Right"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float ZE::ZRect::Right </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Find X position of right side of rectangle. <dl compact><dt><b>Returns:</b></dt><dd>X position of right side. </dd></dl>
</td>
</tr>
</table>
<a name="a21" doxytag="ZE::ZRect::Top"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float ZE::ZRect::Top </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Find Y position of top side of rectangle. <dl compact><dt><b>Returns:</b></dt><dd>Y position of top side. </dd></dl>
</td>
</tr>
</table>
<a name="a22" doxytag="ZE::ZRect::Bottom"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float ZE::ZRect::Bottom </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Find Y position of left side of rectangle. <dl compact><dt><b>Returns:</b></dt><dd>Y position of bottom side. </dd></dl>
</td>
</tr>
</table>
<a name="a23" doxytag="ZE::ZRect::Width"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float ZE::ZRect::Width </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Access private width member. <dl compact><dt><b>Returns:</b></dt><dd>Value of mWidth. </dd></dl>
</td>
</tr>
</table>
<a name="a24" doxytag="ZE::ZRect::Height"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float ZE::ZRect::Height </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Access private height member. <dl compact><dt><b>Returns:</b></dt><dd>Value of mHeight. </dd></dl>
</td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li>/include/<a class="el" href="ZE__ZRect_8h-source.html">ZE_ZRect.h</a><li>/src/<a class="el" href="ZE__ZRect_8cpp.html">ZE_ZRect.cpp</a></ul>
2003-04-27 22:15:26 +00:00
<hr><address style="align: right;"><small>Generated on Sun Apr 27 18:16:26 2003 for ZEngine by
2003-04-27 22:15:26 +00:00
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.3-rc2 </small></address>
</body>
</html>