started woking on figuring out doxygen documentation and added readme
This commit is contained in:
parent
c598f3e106
commit
3f0556341c
1192 changed files with 199462 additions and 29 deletions
631
doc/doxygen/html/d9/d09/src_2math_2rectangle_8c.html
Normal file
631
doc/doxygen/html/d9/d09/src_2math_2rectangle_8c.html
Normal file
|
|
@ -0,0 +1,631 @@
|
|||
<!-- HTML header for doxygen 1.9.2-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" class="dark-mode">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Archeus: /home/herbglitch/programs/archeus/arc/src/math/rectangle.c File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../cookie.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../../doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../../doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../doxygen-awesome-darkmode-toggle.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Archeus<span id="projectnumber"> 0.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">A C library and game engine that focuses on documentation</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(1); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d9/d09/src_2math_2rectangle_8c.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">rectangle.c File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><code>#include "<a class="el" href="../../d2/d14/math_2rectangle_8h_source.html">arc/math/rectangle.h</a>"</code><br />
|
||||
</div>
|
||||
<p><a href="../../d9/d09/src_2math_2rectangle_8c_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a910c21230647ae28c55194d255bc8a7d" id="r_a910c21230647ae28c55194d255bc8a7d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a910c21230647ae28c55194d255bc8a7d">ARC_Rect_CenterOn</a> (<a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect, <a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *bounds)</td></tr>
|
||||
<tr class="memdesc:a910c21230647ae28c55194d255bc8a7d"><td class="mdescLeft"> </td><td class="mdescRight">centers rect on given bounds <br /></td></tr>
|
||||
<tr class="separator:a910c21230647ae28c55194d255bc8a7d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae1d122bd28d683c9cd4bde56859ef844" id="r_ae1d122bd28d683c9cd4bde56859ef844"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ae1d122bd28d683c9cd4bde56859ef844">ARC_FRect_CenterOn</a> (<a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect, <a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *bounds)</td></tr>
|
||||
<tr class="memdesc:ae1d122bd28d683c9cd4bde56859ef844"><td class="mdescLeft"> </td><td class="mdescRight">centers rect on given bounds <br /></td></tr>
|
||||
<tr class="separator:ae1d122bd28d683c9cd4bde56859ef844"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8e74551a0f97bd4fcaf3b1f6041d0cc5" id="r_a8e74551a0f97bd4fcaf3b1f6041d0cc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a8e74551a0f97bd4fcaf3b1f6041d0cc5">ARC_Rect_CastToFRect</a> (<a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect)</td></tr>
|
||||
<tr class="memdesc:a8e74551a0f97bd4fcaf3b1f6041d0cc5"><td class="mdescLeft"> </td><td class="mdescRight">casts Rect to FRect <br /></td></tr>
|
||||
<tr class="separator:a8e74551a0f97bd4fcaf3b1f6041d0cc5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2716384cea95edfab47befa78b60fc00" id="r_a2716384cea95edfab47befa78b60fc00"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a2716384cea95edfab47befa78b60fc00">ARC_FRect_CastToRect</a> (<a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect)</td></tr>
|
||||
<tr class="memdesc:a2716384cea95edfab47befa78b60fc00"><td class="mdescLeft"> </td><td class="mdescRight">casts FRect to Rect <br /></td></tr>
|
||||
<tr class="separator:a2716384cea95edfab47befa78b60fc00"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a05c6b1799b44d3c011ea03510f05fab9" id="r_a05c6b1799b44d3c011ea03510f05fab9"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#a05c6b1799b44d3c011ea03510f05fab9">ARC_Rect_Intersects</a> (<a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect1, <a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect2)</td></tr>
|
||||
<tr class="memdesc:a05c6b1799b44d3c011ea03510f05fab9"><td class="mdescLeft"> </td><td class="mdescRight">checks if two ARC_Rects intersect <br /></td></tr>
|
||||
<tr class="separator:a05c6b1799b44d3c011ea03510f05fab9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac3baf11e6f7624a21a553383176d6c6f" id="r_ac3baf11e6f7624a21a553383176d6c6f"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac3baf11e6f7624a21a553383176d6c6f">ARC_FRect_Intersects</a> (<a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect1, <a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect2)</td></tr>
|
||||
<tr class="memdesc:ac3baf11e6f7624a21a553383176d6c6f"><td class="mdescLeft"> </td><td class="mdescRight">checks if two ARC_FRects intersect <br /></td></tr>
|
||||
<tr class="separator:ac3baf11e6f7624a21a553383176d6c6f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aca466591cebea1e1d30f7c2d161f5f0f" id="r_aca466591cebea1e1d30f7c2d161f5f0f"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#aca466591cebea1e1d30f7c2d161f5f0f">ARC_Rect_IntersectsPoint</a> (<a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect, <a class="el" href="../../d2/d9d/structARC__Point.html">ARC_Point</a> *point)</td></tr>
|
||||
<tr class="memdesc:aca466591cebea1e1d30f7c2d161f5f0f"><td class="mdescLeft"> </td><td class="mdescRight">checks if <a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> intersects with point <br /></td></tr>
|
||||
<tr class="separator:aca466591cebea1e1d30f7c2d161f5f0f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9ee5256187b0430f60a252ef7d6e331c" id="r_a9ee5256187b0430f60a252ef7d6e331c"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#a9ee5256187b0430f60a252ef7d6e331c">ARC_FRect_IntersectsPoint</a> (<a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect, <a class="el" href="../../d2/d9d/structARC__Point.html">ARC_Point</a> *point)</td></tr>
|
||||
<tr class="memdesc:a9ee5256187b0430f60a252ef7d6e331c"><td class="mdescLeft"> </td><td class="mdescRight">checks if <a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> intersects with point <br /></td></tr>
|
||||
<tr class="separator:a9ee5256187b0430f60a252ef7d6e331c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae533a88317c303e0efa00f95887b419f" id="r_ae533a88317c303e0efa00f95887b419f"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#ae533a88317c303e0efa00f95887b419f">ARC_Rect_LineIntersects</a> (<a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect, int32_t *x1, int32_t *y1, int32_t *x2, int32_t *y2)</td></tr>
|
||||
<tr class="memdesc:ae533a88317c303e0efa00f95887b419f"><td class="mdescLeft"> </td><td class="mdescRight">checks if <a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> intersects a line <br /></td></tr>
|
||||
<tr class="separator:ae533a88317c303e0efa00f95887b419f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8d7a17b45e6a54a50df9b3930b3ace79" id="r_a8d7a17b45e6a54a50df9b3930b3ace79"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a8d7a17b45e6a54a50df9b3930b3ace79">ARC_FRect_CollideAndSlide</a> (<a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect, <a class="el" href="../../db/d86/structARC__Vector2.html">ARC_Vector2</a> *velocity, <a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *wall)</td></tr>
|
||||
<tr class="memdesc:a8d7a17b45e6a54a50df9b3930b3ace79"><td class="mdescLeft"> </td><td class="mdescRight">checks for a <a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> on <a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> collision and slides on collision <br /></td></tr>
|
||||
<tr class="separator:a8d7a17b45e6a54a50df9b3930b3ace79"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a2716384cea95edfab47befa78b60fc00" name="a2716384cea95edfab47befa78b60fc00"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a2716384cea95edfab47befa78b60fc00">◆ </a></span>ARC_FRect_CastToRect()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> ARC_FRect_CastToRect </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *</td> <td class="paramname"><span class="paramname"><em>rect</em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>casts FRect to Rect </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">rect</td><td><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> to be casted</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00025">25</a> of file <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html">rectangle.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 25</span> {</div>
|
||||
<div class="line"><span class="lineno"> 26</span> <span class="keywordflow">return</span> (<a class="code hl_struct" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a>){</div>
|
||||
<div class="line"><span class="lineno"> 27</span> .x = (int32_t)rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a>,</div>
|
||||
<div class="line"><span class="lineno"> 28</span> .y = (int32_t)rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a>,</div>
|
||||
<div class="line"><span class="lineno"> 29</span> .w = (int32_t)rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a>,</div>
|
||||
<div class="line"><span class="lineno"> 30</span> .h = (int32_t)rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a>,</div>
|
||||
<div class="line"><span class="lineno"> 31</span> };</div>
|
||||
<div class="line"><span class="lineno"> 32</span>}</div>
|
||||
<div class="ttc" id="astructARC__FRect_html_a460013a43c318245a00b717165431387"><div class="ttname"><a href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">ARC_FRect::y</a></div><div class="ttdeci">float y</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00028">rectangle.h:28</a></div></div>
|
||||
<div class="ttc" id="astructARC__FRect_html_a7c5955f28e78ffd886648a54d73d55d8"><div class="ttname"><a href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">ARC_FRect::x</a></div><div class="ttdeci">float x</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00027">rectangle.h:27</a></div></div>
|
||||
<div class="ttc" id="astructARC__FRect_html_aadfc2f14c698cfb8e8e576c4ff3161bb"><div class="ttname"><a href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">ARC_FRect::w</a></div><div class="ttdeci">float w</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00029">rectangle.h:29</a></div></div>
|
||||
<div class="ttc" id="astructARC__FRect_html_ace1a858037a966ec9b3135ee118b3cc4"><div class="ttname"><a href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">ARC_FRect::h</a></div><div class="ttdeci">float h</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00030">rectangle.h:30</a></div></div>
|
||||
<div class="ttc" id="astructARC__Rect_html"><div class="ttname"><a href="../../d0/d18/structARC__Rect.html">ARC_Rect</a></div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00012">rectangle.h:12</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
<p class="reference">References <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00030">ARC_FRect::h</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00029">ARC_FRect::w</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00027">ARC_FRect::x</a>, and <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00028">ARC_FRect::y</a>.</p>
|
||||
|
||||
<p class="reference">Referenced by <a class="el" href="../../d2/de6/packages_2graphics_2sdl_2rectangle_8c_source.html#l00015">ARC_FRect_Render()</a>, and <a class="el" href="../../d2/de6/packages_2graphics_2sdl_2rectangle_8c_source.html#l00020">ARC_FRect_RenderFill()</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae1d122bd28d683c9cd4bde56859ef844" name="ae1d122bd28d683c9cd4bde56859ef844"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae1d122bd28d683c9cd4bde56859ef844">◆ </a></span>ARC_FRect_CenterOn()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void ARC_FRect_CenterOn </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *</td> <td class="paramname"><span class="paramname"><em>rect</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *</td> <td class="paramname"><span class="paramname"><em>bounds</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>centers rect on given bounds </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">rect</td><td><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> to be centered </td></tr>
|
||||
<tr><td class="paramname">bounds</td><td><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> area to center rect on </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00011">11</a> of file <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html">rectangle.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 11</span> {</div>
|
||||
<div class="line"><span class="lineno"> 12</span> rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> = (bounds-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + (bounds-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a> / 2.0f)) - (rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a> / 2.0f);</div>
|
||||
<div class="line"><span class="lineno"> 13</span> rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> = (bounds-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + (bounds-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a> / 2.0f)) - (rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a> / 2.0f);</div>
|
||||
<div class="line"><span class="lineno"> 14</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
<p class="reference">References <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00030">ARC_FRect::h</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00029">ARC_FRect::w</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00027">ARC_FRect::x</a>, and <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00028">ARC_FRect::y</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a8d7a17b45e6a54a50df9b3930b3ace79" name="a8d7a17b45e6a54a50df9b3930b3ace79"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a8d7a17b45e6a54a50df9b3930b3ace79">◆ </a></span>ARC_FRect_CollideAndSlide()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void ARC_FRect_CollideAndSlide </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *</td> <td class="paramname"><span class="paramname"><em>rect</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../db/d86/structARC__Vector2.html">ARC_Vector2</a> *</td> <td class="paramname"><span class="paramname"><em>velocity</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *</td> <td class="paramname"><span class="paramname"><em>wall</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>checks for a <a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> on <a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> collision and slides on collision </p>
|
||||
<dl class="section note"><dt>Note</dt><dd>need to update this documenation to word it better</dd></dl>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">rect</td><td><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> that might collide with the wall </td></tr>
|
||||
<tr><td class="paramname">velocity</td><td>the ammount <a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> will move </td></tr>
|
||||
<tr><td class="paramname">wall</td><td><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> that might have collision with rect</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section note"><dt>Note</dt><dd>velocity is updated based on colliding, rect's values are not changed, velocity should be applied after </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00074">74</a> of file <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html">rectangle.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 74</span> {</div>
|
||||
<div class="line"><span class="lineno"> 75</span> <a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> nextRectPosition = {</div>
|
||||
<div class="line"><span class="lineno"> 76</span> .x = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a42edc95888c030b994268da65efc7e2d">x</a>,</div>
|
||||
<div class="line"><span class="lineno"> 77</span> .y = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a8bff4a083df18e51a0792c0c837344f0">y</a>,</div>
|
||||
<div class="line"><span class="lineno"> 78</span> .w = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a>,</div>
|
||||
<div class="line"><span class="lineno"> 79</span> .h = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a></div>
|
||||
<div class="line"><span class="lineno"> 80</span> };</div>
|
||||
<div class="line"><span class="lineno"> 81</span> </div>
|
||||
<div class="line"><span class="lineno"> 82</span> <span class="comment">//there is no collision, return</span></div>
|
||||
<div class="line"><span class="lineno"> 83</span> <span class="keywordflow">if</span>(!<a class="code hl_function" href="#ac3baf11e6f7624a21a553383176d6c6f">ARC_FRect_Intersects</a>(&nextRectPosition, wall)){</div>
|
||||
<div class="line"><span class="lineno"> 84</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 85</span> }</div>
|
||||
<div class="line"><span class="lineno"> 86</span> </div>
|
||||
<div class="line"><span class="lineno"> 87</span> nextRectPosition.<a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a42edc95888c030b994268da65efc7e2d">x</a>;</div>
|
||||
<div class="line"><span class="lineno"> 88</span> nextRectPosition.<a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a>;</div>
|
||||
<div class="line"><span class="lineno"> 89</span> <span class="keywordflow">if</span>(<a class="code hl_function" href="#ac3baf11e6f7624a21a553383176d6c6f">ARC_FRect_Intersects</a>(&nextRectPosition, wall)){</div>
|
||||
<div class="line"><span class="lineno"> 90</span> velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a42edc95888c030b994268da65efc7e2d">x</a> = 0;</div>
|
||||
<div class="line"><span class="lineno"> 91</span> }</div>
|
||||
<div class="line"><span class="lineno"> 92</span> </div>
|
||||
<div class="line"><span class="lineno"> 93</span> nextRectPosition.<a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a>;</div>
|
||||
<div class="line"><span class="lineno"> 94</span> nextRectPosition.<a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a8bff4a083df18e51a0792c0c837344f0">y</a>;</div>
|
||||
<div class="line"><span class="lineno"> 95</span> <span class="keywordflow">if</span>(<a class="code hl_function" href="#ac3baf11e6f7624a21a553383176d6c6f">ARC_FRect_Intersects</a>(&nextRectPosition, wall)){</div>
|
||||
<div class="line"><span class="lineno"> 96</span> velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a8bff4a083df18e51a0792c0c837344f0">y</a> = 0;</div>
|
||||
<div class="line"><span class="lineno"> 97</span> }</div>
|
||||
<div class="line"><span class="lineno"> 98</span>}</div>
|
||||
<div class="ttc" id="asrc_2math_2rectangle_8c_html_ac3baf11e6f7624a21a553383176d6c6f"><div class="ttname"><a href="#ac3baf11e6f7624a21a553383176d6c6f">ARC_FRect_Intersects</a></div><div class="ttdeci">int32_t ARC_FRect_Intersects(ARC_FRect *rect1, ARC_FRect *rect2)</div><div class="ttdoc">checks if two ARC_FRects intersect</div><div class="ttdef"><b>Definition</b> <a href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00042">rectangle.c:42</a></div></div>
|
||||
<div class="ttc" id="astructARC__FRect_html"><div class="ttname"><a href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a></div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00026">rectangle.h:26</a></div></div>
|
||||
<div class="ttc" id="astructARC__Vector2_html_a42edc95888c030b994268da65efc7e2d"><div class="ttname"><a href="../../db/d86/structARC__Vector2.html#a42edc95888c030b994268da65efc7e2d">ARC_Vector2::x</a></div><div class="ttdeci">float x</div><div class="ttdef"><b>Definition</b> <a href="../../d1/d03/vector2_8h_source.html#l00009">vector2.h:9</a></div></div>
|
||||
<div class="ttc" id="astructARC__Vector2_html_a8bff4a083df18e51a0792c0c837344f0"><div class="ttname"><a href="../../db/d86/structARC__Vector2.html#a8bff4a083df18e51a0792c0c837344f0">ARC_Vector2::y</a></div><div class="ttdeci">float y</div><div class="ttdef"><b>Definition</b> <a href="../../d1/d03/vector2_8h_source.html#l00009">vector2.h:9</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
<p class="reference">References <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00042">ARC_FRect_Intersects()</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00030">ARC_FRect::h</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00029">ARC_FRect::w</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00027">ARC_FRect::x</a>, <a class="el" href="../../d1/d03/vector2_8h_source.html#l00009">ARC_Vector2::x</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00028">ARC_FRect::y</a>, and <a class="el" href="../../d1/d03/vector2_8h_source.html#l00009">ARC_Vector2::y</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac3baf11e6f7624a21a553383176d6c6f" name="ac3baf11e6f7624a21a553383176d6c6f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac3baf11e6f7624a21a553383176d6c6f">◆ </a></span>ARC_FRect_Intersects()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int32_t ARC_FRect_Intersects </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *</td> <td class="paramname"><span class="paramname"><em>rect1</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *</td> <td class="paramname"><span class="paramname"><em>rect2</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>checks if two ARC_FRects intersect </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">rect1</td><td><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> that will be checked against rect2 </td></tr>
|
||||
<tr><td class="paramname">rect2</td><td><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> that will be checked against rect1</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>1 if they intersect, 0 if they don't intersect </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00042">42</a> of file <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html">rectangle.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 42</span> {</div>
|
||||
<div class="line"><span class="lineno"> 43</span> <span class="keywordflow">if</span>(rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> <= rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a> && rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a> >= rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> &&</div>
|
||||
<div class="line"><span class="lineno"> 44</span> rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> <= rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a> && rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a> >= rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a>){</div>
|
||||
<div class="line"><span class="lineno"> 45</span> <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><span class="lineno"> 46</span> }</div>
|
||||
<div class="line"><span class="lineno"> 47</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 48</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
<p class="reference">References <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00030">ARC_FRect::h</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00029">ARC_FRect::w</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00027">ARC_FRect::x</a>, and <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00028">ARC_FRect::y</a>.</p>
|
||||
|
||||
<p class="reference">Referenced by <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00074">ARC_FRect_CollideAndSlide()</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a9ee5256187b0430f60a252ef7d6e331c" name="a9ee5256187b0430f60a252ef7d6e331c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a9ee5256187b0430f60a252ef7d6e331c">◆ </a></span>ARC_FRect_IntersectsPoint()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int32_t ARC_FRect_IntersectsPoint </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *</td> <td class="paramname"><span class="paramname"><em>rect</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../d2/d9d/structARC__Point.html">ARC_Point</a> *</td> <td class="paramname"><span class="paramname"><em>point</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>checks if <a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> intersects with point </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">rect</td><td><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> that will be checked against point </td></tr>
|
||||
<tr><td class="paramname">point</td><td><a class="el" href="../../d2/d9d/structARC__Point.html">ARC_Point</a> that will be checked against rect</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>1 if they intersect, 0 if they don't intersect </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00058">58</a> of file <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html">rectangle.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 58</span> {</div>
|
||||
<div class="line"><span class="lineno"> 59</span> <span class="keywordflow">if</span>(rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> <= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#aec135156ef69b46e71be21a02aad82e2">x</a> && rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a> >= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#aec135156ef69b46e71be21a02aad82e2">x</a> &&</div>
|
||||
<div class="line"><span class="lineno"> 60</span> rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> <= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#a0b72b34f989c0351e5e64ba0b46bac8c">y</a> && rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a> >= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#a0b72b34f989c0351e5e64ba0b46bac8c">y</a>){</div>
|
||||
<div class="line"><span class="lineno"> 61</span> <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><span class="lineno"> 62</span> }</div>
|
||||
<div class="line"><span class="lineno"> 63</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 64</span>}</div>
|
||||
<div class="ttc" id="astructARC__Point_html_a0b72b34f989c0351e5e64ba0b46bac8c"><div class="ttname"><a href="../../d2/d9d/structARC__Point.html#a0b72b34f989c0351e5e64ba0b46bac8c">ARC_Point::y</a></div><div class="ttdeci">int32_t y</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d91/point_8h_source.html#l00012">point.h:12</a></div></div>
|
||||
<div class="ttc" id="astructARC__Point_html_aec135156ef69b46e71be21a02aad82e2"><div class="ttname"><a href="../../d2/d9d/structARC__Point.html#aec135156ef69b46e71be21a02aad82e2">ARC_Point::x</a></div><div class="ttdeci">int32_t x</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d91/point_8h_source.html#l00011">point.h:11</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
<p class="reference">References <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00030">ARC_FRect::h</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00029">ARC_FRect::w</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00027">ARC_FRect::x</a>, <a class="el" href="../../d2/d91/point_8h_source.html#l00011">ARC_Point::x</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00028">ARC_FRect::y</a>, and <a class="el" href="../../d2/d91/point_8h_source.html#l00012">ARC_Point::y</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a8e74551a0f97bd4fcaf3b1f6041d0cc5" name="a8e74551a0f97bd4fcaf3b1f6041d0cc5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a8e74551a0f97bd4fcaf3b1f6041d0cc5">◆ </a></span>ARC_Rect_CastToFRect()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> ARC_Rect_CastToFRect </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *</td> <td class="paramname"><span class="paramname"><em>rect</em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>casts Rect to FRect </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">rect</td><td><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> to be casted</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00016">16</a> of file <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html">rectangle.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 16</span> {</div>
|
||||
<div class="line"><span class="lineno"> 17</span> <span class="keywordflow">return</span> (<a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a>){</div>
|
||||
<div class="line"><span class="lineno"> 18</span> .x = (float)rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a>,</div>
|
||||
<div class="line"><span class="lineno"> 19</span> .y = (<span class="keywordtype">float</span>)rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a>,</div>
|
||||
<div class="line"><span class="lineno"> 20</span> .w = (float)rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a>,</div>
|
||||
<div class="line"><span class="lineno"> 21</span> .h = (<span class="keywordtype">float</span>)rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a>,</div>
|
||||
<div class="line"><span class="lineno"> 22</span> };</div>
|
||||
<div class="line"><span class="lineno"> 23</span>}</div>
|
||||
<div class="ttc" id="astructARC__Rect_html_a0c6f8364cb183d5fd271f2f6d9a11128"><div class="ttname"><a href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">ARC_Rect::x</a></div><div class="ttdeci">int32_t x</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00013">rectangle.h:13</a></div></div>
|
||||
<div class="ttc" id="astructARC__Rect_html_a2ed00701687a538b3c7df0a6a47697dd"><div class="ttname"><a href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">ARC_Rect::w</a></div><div class="ttdeci">int32_t w</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00015">rectangle.h:15</a></div></div>
|
||||
<div class="ttc" id="astructARC__Rect_html_a33859912d1bcd75496e12de4e3a08a3c"><div class="ttname"><a href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">ARC_Rect::y</a></div><div class="ttdeci">int32_t y</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00014">rectangle.h:14</a></div></div>
|
||||
<div class="ttc" id="astructARC__Rect_html_a75f17b793a867572a521906a514a312b"><div class="ttname"><a href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">ARC_Rect::h</a></div><div class="ttdeci">int32_t h</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00016">rectangle.h:16</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
<p class="reference">References <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00016">ARC_Rect::h</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00015">ARC_Rect::w</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00013">ARC_Rect::x</a>, and <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00014">ARC_Rect::y</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a910c21230647ae28c55194d255bc8a7d" name="a910c21230647ae28c55194d255bc8a7d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a910c21230647ae28c55194d255bc8a7d">◆ </a></span>ARC_Rect_CenterOn()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void ARC_Rect_CenterOn </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *</td> <td class="paramname"><span class="paramname"><em>rect</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *</td> <td class="paramname"><span class="paramname"><em>bounds</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>centers rect on given bounds </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">rect</td><td><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> to be centered </td></tr>
|
||||
<tr><td class="paramname">bounds</td><td><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> area to center rect on </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00006">6</a> of file <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html">rectangle.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 6</span> {</div>
|
||||
<div class="line"><span class="lineno"> 7</span> rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> = (bounds-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> + (bounds-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a> / 2)) - (rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a> / 2);</div>
|
||||
<div class="line"><span class="lineno"> 8</span> rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> = (bounds-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> + (bounds-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a> / 2)) - (rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a> / 2);</div>
|
||||
<div class="line"><span class="lineno"> 9</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
<p class="reference">References <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00016">ARC_Rect::h</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00015">ARC_Rect::w</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00013">ARC_Rect::x</a>, and <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00014">ARC_Rect::y</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a05c6b1799b44d3c011ea03510f05fab9" name="a05c6b1799b44d3c011ea03510f05fab9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a05c6b1799b44d3c011ea03510f05fab9">◆ </a></span>ARC_Rect_Intersects()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int32_t ARC_Rect_Intersects </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *</td> <td class="paramname"><span class="paramname"><em>rect1</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *</td> <td class="paramname"><span class="paramname"><em>rect2</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>checks if two ARC_Rects intersect </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">rect1</td><td><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> that will be checked against rect2 </td></tr>
|
||||
<tr><td class="paramname">rect2</td><td><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> that will be checked against rect1</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>1 if they intersect, 0 if they don't intersect </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00034">34</a> of file <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html">rectangle.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 34</span> {</div>
|
||||
<div class="line"><span class="lineno"> 35</span> <span class="keywordflow">if</span>(rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> <= rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> + rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a> && rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> + rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a> >= rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> &&</div>
|
||||
<div class="line"><span class="lineno"> 36</span> rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> <= rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> + rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a> && rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> + rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a> >= rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a>){</div>
|
||||
<div class="line"><span class="lineno"> 37</span> <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><span class="lineno"> 38</span> }</div>
|
||||
<div class="line"><span class="lineno"> 39</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 40</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
<p class="reference">References <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00016">ARC_Rect::h</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00015">ARC_Rect::w</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00013">ARC_Rect::x</a>, and <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00014">ARC_Rect::y</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aca466591cebea1e1d30f7c2d161f5f0f" name="aca466591cebea1e1d30f7c2d161f5f0f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aca466591cebea1e1d30f7c2d161f5f0f">◆ </a></span>ARC_Rect_IntersectsPoint()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int32_t ARC_Rect_IntersectsPoint </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *</td> <td class="paramname"><span class="paramname"><em>rect</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../d2/d9d/structARC__Point.html">ARC_Point</a> *</td> <td class="paramname"><span class="paramname"><em>point</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>checks if <a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> intersects with point </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">rect</td><td><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> that will be checked against point </td></tr>
|
||||
<tr><td class="paramname">point</td><td><a class="el" href="../../d2/d9d/structARC__Point.html">ARC_Point</a> that will be checked against rect</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>1 if they intersect, 0 if they don't intersect </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00050">50</a> of file <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html">rectangle.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 50</span> {</div>
|
||||
<div class="line"><span class="lineno"> 51</span> <span class="keywordflow">if</span>(rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> <= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#aec135156ef69b46e71be21a02aad82e2">x</a> && rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> + rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a> >= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#aec135156ef69b46e71be21a02aad82e2">x</a> &&</div>
|
||||
<div class="line"><span class="lineno"> 52</span> rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> <= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#a0b72b34f989c0351e5e64ba0b46bac8c">y</a> && rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> + rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a> >= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#a0b72b34f989c0351e5e64ba0b46bac8c">y</a>){</div>
|
||||
<div class="line"><span class="lineno"> 53</span> <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><span class="lineno"> 54</span> }</div>
|
||||
<div class="line"><span class="lineno"> 55</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 56</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
<p class="reference">References <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00016">ARC_Rect::h</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00015">ARC_Rect::w</a>, <a class="el" href="../../d2/d91/point_8h_source.html#l00011">ARC_Point::x</a>, <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00013">ARC_Rect::x</a>, <a class="el" href="../../d2/d91/point_8h_source.html#l00012">ARC_Point::y</a>, and <a class="el" href="../../d2/d14/math_2rectangle_8h_source.html#l00014">ARC_Rect::y</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae533a88317c303e0efa00f95887b419f" name="ae533a88317c303e0efa00f95887b419f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae533a88317c303e0efa00f95887b419f">◆ </a></span>ARC_Rect_LineIntersects()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int32_t ARC_Rect_LineIntersects </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *</td> <td class="paramname"><span class="paramname"><em>rect</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int32_t *</td> <td class="paramname"><span class="paramname"><em>x1</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int32_t *</td> <td class="paramname"><span class="paramname"><em>y1</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int32_t *</td> <td class="paramname"><span class="paramname"><em>x2</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int32_t *</td> <td class="paramname"><span class="paramname"><em>y2</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>checks if <a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> intersects a line </p>
|
||||
<dl class="section note"><dt>Note</dt><dd>need to update this documenation to word it better</dd></dl>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">rect</td><td><a class="el" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> that will be checked against line </td></tr>
|
||||
<tr><td class="paramname">x1</td><td>first point's x value </td></tr>
|
||||
<tr><td class="paramname">y1</td><td>first point's y value </td></tr>
|
||||
<tr><td class="paramname">y2</td><td>second point's x value </td></tr>
|
||||
<tr><td class="paramname">y2</td><td>second point's y value</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>1 if they intersect, 0 if they don't intersect </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html#l00066">66</a> of file <a class="el" href="../../d9/d09/src_2math_2rectangle_8c_source.html">rectangle.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 66</span> {</div>
|
||||
<div class="line"><span class="lineno"> 67</span> <span class="comment">//TODO: Replace soon</span></div>
|
||||
<div class="line"><span class="lineno"> 68</span> <span class="comment">// return SDL_IntersectRectAndLine((SDL_Rect *) rect, x1, y1, x2, y2);</span></div>
|
||||
<div class="line"><span class="lineno"> 69</span> <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><span class="lineno"> 70</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- HTML footer for doxygen 1.9.2-->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul><li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../dir_ae9a93452e2a84339148a16bcf2eb561.html">math</a></li><li class="navelem"><a class="el" href="../../d9/d09/src_2math_2rectangle_8c.html">rectangle.c</a></li></ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
// script for doxygen 1.9.1
|
||||
$(function() {
|
||||
toggleButton = document.createElement('doxygen-awesome-dark-mode-toggle')
|
||||
toggleButton.title = "Toggle Light/Dark Mode"
|
||||
$(document).ready(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
$(window).resize(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
13
doc/doxygen/html/d9/d09/src_2math_2rectangle_8c.js
Normal file
13
doc/doxygen/html/d9/d09/src_2math_2rectangle_8c.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
var src_2math_2rectangle_8c =
|
||||
[
|
||||
[ "ARC_FRect_CastToRect", "d9/d09/src_2math_2rectangle_8c.html#a2716384cea95edfab47befa78b60fc00", null ],
|
||||
[ "ARC_FRect_CenterOn", "d9/d09/src_2math_2rectangle_8c.html#ae1d122bd28d683c9cd4bde56859ef844", null ],
|
||||
[ "ARC_FRect_CollideAndSlide", "d9/d09/src_2math_2rectangle_8c.html#a8d7a17b45e6a54a50df9b3930b3ace79", null ],
|
||||
[ "ARC_FRect_Intersects", "d9/d09/src_2math_2rectangle_8c.html#ac3baf11e6f7624a21a553383176d6c6f", null ],
|
||||
[ "ARC_FRect_IntersectsPoint", "d9/d09/src_2math_2rectangle_8c.html#a9ee5256187b0430f60a252ef7d6e331c", null ],
|
||||
[ "ARC_Rect_CastToFRect", "d9/d09/src_2math_2rectangle_8c.html#a8e74551a0f97bd4fcaf3b1f6041d0cc5", null ],
|
||||
[ "ARC_Rect_CenterOn", "d9/d09/src_2math_2rectangle_8c.html#a910c21230647ae28c55194d255bc8a7d", null ],
|
||||
[ "ARC_Rect_Intersects", "d9/d09/src_2math_2rectangle_8c.html#a05c6b1799b44d3c011ea03510f05fab9", null ],
|
||||
[ "ARC_Rect_IntersectsPoint", "d9/d09/src_2math_2rectangle_8c.html#aca466591cebea1e1d30f7c2d161f5f0f", null ],
|
||||
[ "ARC_Rect_LineIntersects", "d9/d09/src_2math_2rectangle_8c.html#ae533a88317c303e0efa00f95887b419f", null ]
|
||||
];
|
||||
273
doc/doxygen/html/d9/d09/src_2math_2rectangle_8c_source.html
Normal file
273
doc/doxygen/html/d9/d09/src_2math_2rectangle_8c_source.html
Normal file
|
|
@ -0,0 +1,273 @@
|
|||
<!-- HTML header for doxygen 1.9.2-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" class="dark-mode">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Archeus: /home/herbglitch/programs/archeus/arc/src/math/rectangle.c Source File</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../cookie.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../../doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../../doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../doxygen-awesome-darkmode-toggle.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Archeus<span id="projectnumber"> 0.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">A C library and game engine that focuses on documentation</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(1); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d9/d09/src_2math_2rectangle_8c_source.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">rectangle.c</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../d9/d09/src_2math_2rectangle_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#include "<a class="code" href="../../d2/d14/math_2rectangle_8h.html">arc/math/rectangle.h</a>"</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//VERY TEMP</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// #include <SDL.h></span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
|
||||
<div class="foldopen" id="foldopen00006" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"><a class="line" href="../../d2/d14/math_2rectangle_8h.html#a910c21230647ae28c55194d255bc8a7d"> 6</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#a910c21230647ae28c55194d255bc8a7d">ARC_Rect_CenterOn</a>(<a class="code hl_struct" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect, <a class="code hl_struct" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *bounds){</div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> = (bounds-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> + (bounds-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a> / 2)) - (rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a> / 2);</div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> = (bounds-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> + (bounds-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a> / 2)) - (rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a> / 2);</div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
|
||||
<div class="foldopen" id="foldopen00011" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="../../d2/d14/math_2rectangle_8h.html#ae1d122bd28d683c9cd4bde56859ef844"> 11</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#ae1d122bd28d683c9cd4bde56859ef844">ARC_FRect_CenterOn</a>(<a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect, <a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *bounds){</div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> = (bounds-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + (bounds-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a> / 2.0f)) - (rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a> / 2.0f);</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> = (bounds-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + (bounds-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a> / 2.0f)) - (rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a> / 2.0f);</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
|
||||
<div class="foldopen" id="foldopen00016" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="../../d2/d14/math_2rectangle_8h.html#a8e74551a0f97bd4fcaf3b1f6041d0cc5"> 16</a></span><a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> <a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#a8e74551a0f97bd4fcaf3b1f6041d0cc5">ARC_Rect_CastToFRect</a>(<a class="code hl_struct" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect){</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keywordflow">return</span> (<a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a>){</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> .x = (float)rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a>,</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> .y = (<span class="keywordtype">float</span>)rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a>,</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> .w = (float)rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a>,</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> .h = (<span class="keywordtype">float</span>)rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a>,</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> };</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
|
||||
<div class="foldopen" id="foldopen00025" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="../../d2/d14/math_2rectangle_8h.html#a2716384cea95edfab47befa78b60fc00"> 25</a></span><a class="code hl_struct" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> <a class="code hl_function" href="../../d2/d14/math_2rectangle_8h.html#a2716384cea95edfab47befa78b60fc00">ARC_FRect_CastToRect</a>(<a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect){</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">return</span> (<a class="code hl_struct" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a>){</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> .x = (int32_t)rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a>,</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> .y = (int32_t)rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a>,</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> .w = (int32_t)rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a>,</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> .h = (int32_t)rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a>,</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> };</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
|
||||
<div class="foldopen" id="foldopen00034" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="../../d2/d14/math_2rectangle_8h.html#a05c6b1799b44d3c011ea03510f05fab9"> 34</a></span>int32_t <a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#a05c6b1799b44d3c011ea03510f05fab9">ARC_Rect_Intersects</a>(<a class="code hl_struct" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect1, <a class="code hl_struct" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect2){</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">if</span>(rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> <= rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> + rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a> && rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> + rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a> >= rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> &&</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> <= rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> + rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a> && rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> + rect1-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a> >= rect2-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a>){</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
|
||||
<div class="foldopen" id="foldopen00042" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="../../d2/d14/math_2rectangle_8h.html#ac3baf11e6f7624a21a553383176d6c6f"> 42</a></span>int32_t <a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#ac3baf11e6f7624a21a553383176d6c6f">ARC_FRect_Intersects</a>(<a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect1, <a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect2){</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">if</span>(rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> <= rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a> && rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a> >= rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> &&</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> <= rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a> && rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + rect1-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a> >= rect2-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a>){</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> }</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
|
||||
<div class="foldopen" id="foldopen00050" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="../../d2/d14/math_2rectangle_8h.html#aca466591cebea1e1d30f7c2d161f5f0f"> 50</a></span>int32_t <a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#aca466591cebea1e1d30f7c2d161f5f0f">ARC_Rect_IntersectsPoint</a>(<a class="code hl_struct" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect, <a class="code hl_struct" href="../../d2/d9d/structARC__Point.html">ARC_Point</a> *point){</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">if</span>(rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> <= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#aec135156ef69b46e71be21a02aad82e2">x</a> && rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">x</a> + rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">w</a> >= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#aec135156ef69b46e71be21a02aad82e2">x</a> &&</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> <= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#a0b72b34f989c0351e5e64ba0b46bac8c">y</a> && rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">y</a> + rect-><a class="code hl_variable" href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">h</a> >= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#a0b72b34f989c0351e5e64ba0b46bac8c">y</a>){</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> }</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
|
||||
<div class="foldopen" id="foldopen00058" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="../../d2/d14/math_2rectangle_8h.html#a9ee5256187b0430f60a252ef7d6e331c"> 58</a></span>int32_t <a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#a9ee5256187b0430f60a252ef7d6e331c">ARC_FRect_IntersectsPoint</a>(<a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect, <a class="code hl_struct" href="../../d2/d9d/structARC__Point.html">ARC_Point</a> *point){</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">if</span>(rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> <= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#aec135156ef69b46e71be21a02aad82e2">x</a> && rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a> >= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#aec135156ef69b46e71be21a02aad82e2">x</a> &&</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> <= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#a0b72b34f989c0351e5e64ba0b46bac8c">y</a> && rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a> >= point-><a class="code hl_variable" href="../../d2/d9d/structARC__Point.html#a0b72b34f989c0351e5e64ba0b46bac8c">y</a>){</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> }</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
|
||||
<div class="foldopen" id="foldopen00066" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="../../d2/d14/math_2rectangle_8h.html#ae533a88317c303e0efa00f95887b419f"> 66</a></span>int32_t <a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#ae533a88317c303e0efa00f95887b419f">ARC_Rect_LineIntersects</a>(<a class="code hl_struct" href="../../d0/d18/structARC__Rect.html">ARC_Rect</a> *rect, int32_t *x1, int32_t *y1, int32_t *x2, int32_t *y2){</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">//TODO: Replace soon</span></div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="comment">// return SDL_IntersectRectAndLine((SDL_Rect *) rect, x1, y1, x2, y2);</span></div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment">//TODO: position 1px away from colliding, so if velocity is greater than 2px it doesn't have weird gap spacing</span></div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment">// might need to check diagnals as well, this is a rudamentry implementation</span></div>
|
||||
<div class="foldopen" id="foldopen00074" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="../../d2/d14/math_2rectangle_8h.html#a8d7a17b45e6a54a50df9b3930b3ace79"> 74</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#a8d7a17b45e6a54a50df9b3930b3ace79">ARC_FRect_CollideAndSlide</a>(<a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *rect, <a class="code hl_struct" href="../../db/d86/structARC__Vector2.html">ARC_Vector2</a> *velocity, <a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> *wall){</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_struct" href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a> nextRectPosition = {</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> .x = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a42edc95888c030b994268da65efc7e2d">x</a>,</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> .y = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a8bff4a083df18e51a0792c0c837344f0">y</a>,</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> .w = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">w</a>,</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> .h = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">h</a></div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> };</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="comment">//there is no collision, return</span></div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">if</span>(!<a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#ac3baf11e6f7624a21a553383176d6c6f">ARC_FRect_Intersects</a>(&nextRectPosition, wall)){</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> }</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> nextRectPosition.<a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> + velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a42edc95888c030b994268da65efc7e2d">x</a>;</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> nextRectPosition.<a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a>;</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">if</span>(<a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#ac3baf11e6f7624a21a553383176d6c6f">ARC_FRect_Intersects</a>(&nextRectPosition, wall)){</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a42edc95888c030b994268da65efc7e2d">x</a> = 0;</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> }</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> nextRectPosition.<a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a> = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">x</a>;</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> nextRectPosition.<a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> = rect-><a class="code hl_variable" href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">y</a> + velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a8bff4a083df18e51a0792c0c837344f0">y</a>;</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">if</span>(<a class="code hl_function" href="../../d9/d09/src_2math_2rectangle_8c.html#ac3baf11e6f7624a21a553383176d6c6f">ARC_FRect_Intersects</a>(&nextRectPosition, wall)){</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> velocity-><a class="code hl_variable" href="../../db/d86/structARC__Vector2.html#a8bff4a083df18e51a0792c0c837344f0">y</a> = 0;</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> }</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span>}</div>
|
||||
</div>
|
||||
<div class="ttc" id="amath_2rectangle_8h_html"><div class="ttname"><a href="../../d2/d14/math_2rectangle_8h.html">rectangle.h</a></div></div>
|
||||
<div class="ttc" id="amath_2rectangle_8h_html_a2716384cea95edfab47befa78b60fc00"><div class="ttname"><a href="../../d2/d14/math_2rectangle_8h.html#a2716384cea95edfab47befa78b60fc00">ARC_FRect_CastToRect</a></div><div class="ttdeci">ARC_Rect ARC_FRect_CastToRect(ARC_FRect *rect)</div><div class="ttdoc">casts FRect to Rect</div><div class="ttdef"><b>Definition</b> <a href="#l00025">rectangle.c:25</a></div></div>
|
||||
<div class="ttc" id="asrc_2math_2rectangle_8c_html_a05c6b1799b44d3c011ea03510f05fab9"><div class="ttname"><a href="../../d9/d09/src_2math_2rectangle_8c.html#a05c6b1799b44d3c011ea03510f05fab9">ARC_Rect_Intersects</a></div><div class="ttdeci">int32_t ARC_Rect_Intersects(ARC_Rect *rect1, ARC_Rect *rect2)</div><div class="ttdoc">checks if two ARC_Rects intersect</div><div class="ttdef"><b>Definition</b> <a href="#l00034">rectangle.c:34</a></div></div>
|
||||
<div class="ttc" id="asrc_2math_2rectangle_8c_html_a8d7a17b45e6a54a50df9b3930b3ace79"><div class="ttname"><a href="../../d9/d09/src_2math_2rectangle_8c.html#a8d7a17b45e6a54a50df9b3930b3ace79">ARC_FRect_CollideAndSlide</a></div><div class="ttdeci">void ARC_FRect_CollideAndSlide(ARC_FRect *rect, ARC_Vector2 *velocity, ARC_FRect *wall)</div><div class="ttdoc">checks for a ARC_Rect on ARC_Rect collision and slides on collision</div><div class="ttdef"><b>Definition</b> <a href="#l00074">rectangle.c:74</a></div></div>
|
||||
<div class="ttc" id="asrc_2math_2rectangle_8c_html_a8e74551a0f97bd4fcaf3b1f6041d0cc5"><div class="ttname"><a href="../../d9/d09/src_2math_2rectangle_8c.html#a8e74551a0f97bd4fcaf3b1f6041d0cc5">ARC_Rect_CastToFRect</a></div><div class="ttdeci">ARC_FRect ARC_Rect_CastToFRect(ARC_Rect *rect)</div><div class="ttdoc">casts Rect to FRect</div><div class="ttdef"><b>Definition</b> <a href="#l00016">rectangle.c:16</a></div></div>
|
||||
<div class="ttc" id="asrc_2math_2rectangle_8c_html_a910c21230647ae28c55194d255bc8a7d"><div class="ttname"><a href="../../d9/d09/src_2math_2rectangle_8c.html#a910c21230647ae28c55194d255bc8a7d">ARC_Rect_CenterOn</a></div><div class="ttdeci">void ARC_Rect_CenterOn(ARC_Rect *rect, ARC_Rect *bounds)</div><div class="ttdoc">centers rect on given bounds</div><div class="ttdef"><b>Definition</b> <a href="#l00006">rectangle.c:6</a></div></div>
|
||||
<div class="ttc" id="asrc_2math_2rectangle_8c_html_a9ee5256187b0430f60a252ef7d6e331c"><div class="ttname"><a href="../../d9/d09/src_2math_2rectangle_8c.html#a9ee5256187b0430f60a252ef7d6e331c">ARC_FRect_IntersectsPoint</a></div><div class="ttdeci">int32_t ARC_FRect_IntersectsPoint(ARC_FRect *rect, ARC_Point *point)</div><div class="ttdoc">checks if ARC_FRect intersects with point</div><div class="ttdef"><b>Definition</b> <a href="#l00058">rectangle.c:58</a></div></div>
|
||||
<div class="ttc" id="asrc_2math_2rectangle_8c_html_ac3baf11e6f7624a21a553383176d6c6f"><div class="ttname"><a href="../../d9/d09/src_2math_2rectangle_8c.html#ac3baf11e6f7624a21a553383176d6c6f">ARC_FRect_Intersects</a></div><div class="ttdeci">int32_t ARC_FRect_Intersects(ARC_FRect *rect1, ARC_FRect *rect2)</div><div class="ttdoc">checks if two ARC_FRects intersect</div><div class="ttdef"><b>Definition</b> <a href="#l00042">rectangle.c:42</a></div></div>
|
||||
<div class="ttc" id="asrc_2math_2rectangle_8c_html_aca466591cebea1e1d30f7c2d161f5f0f"><div class="ttname"><a href="../../d9/d09/src_2math_2rectangle_8c.html#aca466591cebea1e1d30f7c2d161f5f0f">ARC_Rect_IntersectsPoint</a></div><div class="ttdeci">int32_t ARC_Rect_IntersectsPoint(ARC_Rect *rect, ARC_Point *point)</div><div class="ttdoc">checks if ARC_Rect intersects with point</div><div class="ttdef"><b>Definition</b> <a href="#l00050">rectangle.c:50</a></div></div>
|
||||
<div class="ttc" id="asrc_2math_2rectangle_8c_html_ae1d122bd28d683c9cd4bde56859ef844"><div class="ttname"><a href="../../d9/d09/src_2math_2rectangle_8c.html#ae1d122bd28d683c9cd4bde56859ef844">ARC_FRect_CenterOn</a></div><div class="ttdeci">void ARC_FRect_CenterOn(ARC_FRect *rect, ARC_FRect *bounds)</div><div class="ttdoc">centers rect on given bounds</div><div class="ttdef"><b>Definition</b> <a href="#l00011">rectangle.c:11</a></div></div>
|
||||
<div class="ttc" id="asrc_2math_2rectangle_8c_html_ae533a88317c303e0efa00f95887b419f"><div class="ttname"><a href="../../d9/d09/src_2math_2rectangle_8c.html#ae533a88317c303e0efa00f95887b419f">ARC_Rect_LineIntersects</a></div><div class="ttdeci">int32_t ARC_Rect_LineIntersects(ARC_Rect *rect, int32_t *x1, int32_t *y1, int32_t *x2, int32_t *y2)</div><div class="ttdoc">checks if ARC_Rect intersects a line</div><div class="ttdef"><b>Definition</b> <a href="#l00066">rectangle.c:66</a></div></div>
|
||||
<div class="ttc" id="astructARC__FRect_html"><div class="ttname"><a href="../../dd/d4d/structARC__FRect.html">ARC_FRect</a></div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00026">rectangle.h:26</a></div></div>
|
||||
<div class="ttc" id="astructARC__FRect_html_a460013a43c318245a00b717165431387"><div class="ttname"><a href="../../dd/d4d/structARC__FRect.html#a460013a43c318245a00b717165431387">ARC_FRect::y</a></div><div class="ttdeci">float y</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00028">rectangle.h:28</a></div></div>
|
||||
<div class="ttc" id="astructARC__FRect_html_a7c5955f28e78ffd886648a54d73d55d8"><div class="ttname"><a href="../../dd/d4d/structARC__FRect.html#a7c5955f28e78ffd886648a54d73d55d8">ARC_FRect::x</a></div><div class="ttdeci">float x</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00027">rectangle.h:27</a></div></div>
|
||||
<div class="ttc" id="astructARC__FRect_html_aadfc2f14c698cfb8e8e576c4ff3161bb"><div class="ttname"><a href="../../dd/d4d/structARC__FRect.html#aadfc2f14c698cfb8e8e576c4ff3161bb">ARC_FRect::w</a></div><div class="ttdeci">float w</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00029">rectangle.h:29</a></div></div>
|
||||
<div class="ttc" id="astructARC__FRect_html_ace1a858037a966ec9b3135ee118b3cc4"><div class="ttname"><a href="../../dd/d4d/structARC__FRect.html#ace1a858037a966ec9b3135ee118b3cc4">ARC_FRect::h</a></div><div class="ttdeci">float h</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00030">rectangle.h:30</a></div></div>
|
||||
<div class="ttc" id="astructARC__Point_html"><div class="ttname"><a href="../../d2/d9d/structARC__Point.html">ARC_Point</a></div><div class="ttdef"><b>Definition</b> <a href="../../d2/d91/point_8h_source.html#l00010">point.h:10</a></div></div>
|
||||
<div class="ttc" id="astructARC__Point_html_a0b72b34f989c0351e5e64ba0b46bac8c"><div class="ttname"><a href="../../d2/d9d/structARC__Point.html#a0b72b34f989c0351e5e64ba0b46bac8c">ARC_Point::y</a></div><div class="ttdeci">int32_t y</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d91/point_8h_source.html#l00012">point.h:12</a></div></div>
|
||||
<div class="ttc" id="astructARC__Point_html_aec135156ef69b46e71be21a02aad82e2"><div class="ttname"><a href="../../d2/d9d/structARC__Point.html#aec135156ef69b46e71be21a02aad82e2">ARC_Point::x</a></div><div class="ttdeci">int32_t x</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d91/point_8h_source.html#l00011">point.h:11</a></div></div>
|
||||
<div class="ttc" id="astructARC__Rect_html"><div class="ttname"><a href="../../d0/d18/structARC__Rect.html">ARC_Rect</a></div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00012">rectangle.h:12</a></div></div>
|
||||
<div class="ttc" id="astructARC__Rect_html_a0c6f8364cb183d5fd271f2f6d9a11128"><div class="ttname"><a href="../../d0/d18/structARC__Rect.html#a0c6f8364cb183d5fd271f2f6d9a11128">ARC_Rect::x</a></div><div class="ttdeci">int32_t x</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00013">rectangle.h:13</a></div></div>
|
||||
<div class="ttc" id="astructARC__Rect_html_a2ed00701687a538b3c7df0a6a47697dd"><div class="ttname"><a href="../../d0/d18/structARC__Rect.html#a2ed00701687a538b3c7df0a6a47697dd">ARC_Rect::w</a></div><div class="ttdeci">int32_t w</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00015">rectangle.h:15</a></div></div>
|
||||
<div class="ttc" id="astructARC__Rect_html_a33859912d1bcd75496e12de4e3a08a3c"><div class="ttname"><a href="../../d0/d18/structARC__Rect.html#a33859912d1bcd75496e12de4e3a08a3c">ARC_Rect::y</a></div><div class="ttdeci">int32_t y</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00014">rectangle.h:14</a></div></div>
|
||||
<div class="ttc" id="astructARC__Rect_html_a75f17b793a867572a521906a514a312b"><div class="ttname"><a href="../../d0/d18/structARC__Rect.html#a75f17b793a867572a521906a514a312b">ARC_Rect::h</a></div><div class="ttdeci">int32_t h</div><div class="ttdef"><b>Definition</b> <a href="../../d2/d14/math_2rectangle_8h_source.html#l00016">rectangle.h:16</a></div></div>
|
||||
<div class="ttc" id="astructARC__Vector2_html"><div class="ttname"><a href="../../db/d86/structARC__Vector2.html">ARC_Vector2</a></div><div class="ttdef"><b>Definition</b> <a href="../../d1/d03/vector2_8h_source.html#l00008">vector2.h:8</a></div></div>
|
||||
<div class="ttc" id="astructARC__Vector2_html_a42edc95888c030b994268da65efc7e2d"><div class="ttname"><a href="../../db/d86/structARC__Vector2.html#a42edc95888c030b994268da65efc7e2d">ARC_Vector2::x</a></div><div class="ttdeci">float x</div><div class="ttdef"><b>Definition</b> <a href="../../d1/d03/vector2_8h_source.html#l00009">vector2.h:9</a></div></div>
|
||||
<div class="ttc" id="astructARC__Vector2_html_a8bff4a083df18e51a0792c0c837344f0"><div class="ttname"><a href="../../db/d86/structARC__Vector2.html#a8bff4a083df18e51a0792c0c837344f0">ARC_Vector2::y</a></div><div class="ttdeci">float y</div><div class="ttdef"><b>Definition</b> <a href="../../d1/d03/vector2_8h_source.html#l00009">vector2.h:9</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- HTML footer for doxygen 1.9.2-->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul><li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../dir_ae9a93452e2a84339148a16bcf2eb561.html">math</a></li><li class="navelem"><a class="el" href="../../d9/d09/src_2math_2rectangle_8c.html">rectangle.c</a></li></ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
// script for doxygen 1.9.1
|
||||
$(function() {
|
||||
toggleButton = document.createElement('doxygen-awesome-dark-mode-toggle')
|
||||
toggleButton.title = "Toggle Light/Dark Mode"
|
||||
$(document).ready(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
$(window).resize(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue