File: Collides.html

package info (click to toggle)
openlayer 2.1-2.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 3,392 kB
  • ctags: 2,317
  • sloc: ansic: 10,433; cpp: 9,890; xml: 109; makefile: 90; sh: 36
file content (10 lines) | stat: -rw-r--r-- 2,962 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transistional//EN"><html><head><title>OpenLayer Offline Manual</title><style type="text/css" media="all">@import "../CrystalStyle.css";</style><body bgcolor="FFFFFF" ><div align="center" style="pagestyle"><table width="60%"><tr><td><div class="parentLinks"><a href="../index.html">OpenLayer</a> | <a href="../Shape.html">Shape</a> | <a href="../Shape/Line.html">Line</a> | <a href="../Line/Collides.html">Collides</a></div><br><div class="BigHeader">Collides</div><br><div class=""><div class="Surrounded"><table><tr valign="top"><td align="right"><div class="FuncDef"><strong><font color="#777733">bool</font> <a href="..//Collides.html"><font color="#0000CC">Collides</font></a>(</strong></div></td><td><div class="FuncDef"><strong><font color="#777733">const</font> <a href="../Shape/Line.html"><font color="#0000CC">Line</font></a> &amp;other )
<br></strong></div></td></tr></table>
<br>Returns true if the two line segments collide.
<br></div></div><br><div class="MediumHeader">Examples</div><br><div class="Code"><a href="../Shape/Line.html"><font color="#0000CC">Line</font></a>&nbsp;myLine(&nbsp;...&nbsp;);
<br><a href="../Shape/Line.html"><font color="#0000CC">Line</font></a>&nbsp;otherLine(&nbsp;...&nbsp;);
<br>
<br><font color="#999922">//&nbsp;Test&nbsp;if&nbsp;the&nbsp;two&nbsp;line&nbsp;segments&nbsp;collide&nbsp;//</font>
<br><font color="#447711">if</font>(&nbsp;myLine.<a href="..//Collides.html"><font color="#0000CC">Collides</font></a>(&nbsp;otherLine&nbsp;))&nbsp;{
<br>&nbsp;&nbsp;allegro_message(&nbsp;<font color="#CC0000">"Collision!"</font>&nbsp;);
<br>}</div><div class=""><br><br><div class="MediumHeader">Other functions of the class <a href="../Shape/Line.html"><font color="#0000CC">Line</font></a></div><div class="Surrounded"><table size="100%" cellpadding="0" cellspacing="0"><tr><td halign="center" class="funclist"><a href="../Line/Draw.html">Draw</a></td><td width="65%" halign="center"><div class="smalltext">Draws the line to the screen filled with a color</div></td></tr><tr><td halign="center" class="funclist"><a href="../Line/GetIntersectionPoint.html">GetIntersectionPoint</a></td><td width="65%" halign="center"><div class="smalltext">Returns the intersection point between two lines</div></td></tr><tr><td halign="center" class="funclist"><a href="../Line/Collides.html">Collides</a></td><td width="65%" halign="center"><div class="smalltext">Tests if the two line segments collide</div></td></tr><tr><td halign="center" class="funclist"><a href="../Line/GetNormal.html">GetNormal</a></td><td width="65%" halign="center"><div class="smalltext">Returns the normal of the line</div></td></tr></table></div><br><div class=""><a href="../index.html">Back to the main page of the manual</a></div><br>Questions about Collides? Click <a href="http://crystalstorm.ath.cx/index.php?lan=en&page=CreateFeedback&subject=Collides">here.</a></div></td></tr></table></body></html>