fxengine/doc/html/translate_8h.html

417 lines
22 KiB
HTML

<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FxEngine: include/render/translate.h 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="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</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" />
</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">FxEngine
&#160;<span id="projectnumber">0.0.1</span>
</div>
<div id="projectbrief">3d engine for fx9860G calculators</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('translate_8h.html','');});
/* @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">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">translate.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br />
<code>#include &lt;<a class="el" href="parameters_8h_source.html">render/parameters.h</a>&gt;</code><br />
</div>
<p><a href="translate_8h_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 name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_f_e__integer__position.html">FE_integer_position</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">this struct is a point in 3d, which has coords save as uint32_t this is the recommended type for high performance rendering, because the sh3eb-elf architecture is 32 bits <a href="struct_f_e__integer__position.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_f_e__floating__position.html">FE_floating_position</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">this struct is a point in 3d, which has coords save as double it is not recommended to use it for high performances rendering, because of the sh3eb-elf architecture, which does not support natively floating calculation <a href="struct_f_e__floating__position.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_f_e__integer__point.html">FE_integer_point</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is a point which is used for 3d translations and rendering integer mode is the best solution to increase perfs, and that's why I didn't have implemented te floating_points yet. <a href="struct_f_e__integer__point.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a3f5d3995e107856579b9052675abfc39"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_f_e__integer__position.html">FE_integer_position</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="translate_8h.html#a3f5d3995e107856579b9052675abfc39">FE_integer_position</a></td></tr>
<tr class="separator:a3f5d3995e107856579b9052675abfc39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83166ae9b8c23749f0910073d570ef3e"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_f_e__floating__position.html">FE_floating_position</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="translate_8h.html#a83166ae9b8c23749f0910073d570ef3e">FE_floating_position</a></td></tr>
<tr class="separator:a83166ae9b8c23749f0910073d570ef3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35c4a457f046ca4f02dcc94a58daa4bf"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_f_e__integer__point.html">FE_integer_point</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="translate_8h.html#a35c4a457f046ca4f02dcc94a58daa4bf">FE_integer_point</a></td></tr>
<tr class="separator:a35c4a457f046ca4f02dcc94a58daa4bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad9469e65551169eb575e264a8ad0e9e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="translate_8h.html#ad9469e65551169eb575e264a8ad0e9e6">render_translate</a> (<a class="el" href="struct_f_e__integer__point.html">FE_integer_point</a> *point)</td></tr>
<tr class="memdesc:ad9469e65551169eb575e264a8ad0e9e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function rotates and applies perspective on an integer point. <a href="#ad9469e65551169eb575e264a8ad0e9e6">More...</a><br /></td></tr>
<tr class="separator:ad9469e65551169eb575e264a8ad0e9e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92fa63cabc18462be74711f65c5e5466"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="translate_8h.html#a92fa63cabc18462be74711f65c5e5466">render_set</a> (const double dh, const double dv, const double roulis, const <a class="el" href="struct_f_e__integer__position.html">FE_integer_position</a> *camera)</td></tr>
<tr class="memdesc:a92fa63cabc18462be74711f65c5e5466"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets up the translation matrices for a new rendering cycle. <a href="#a92fa63cabc18462be74711f65c5e5466">More...</a><br /></td></tr>
<tr class="separator:a92fa63cabc18462be74711f65c5e5466"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70d5f87988b0725ee2fbd0a84bdd9e81"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="translate_8h.html#a70d5f87988b0725ee2fbd0a84bdd9e81">modulo_2pi</a> (double a)</td></tr>
<tr class="memdesc:a70d5f87988b0725ee2fbd0a84bdd9e81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets up an angle mesure between -pi and +pi. <a href="#a70d5f87988b0725ee2fbd0a84bdd9e81">More...</a><br /></td></tr>
<tr class="separator:a70d5f87988b0725ee2fbd0a84bdd9e81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7a1183c29d9d3cd34e73d7cb2213b8a"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="translate_8h.html#ac7a1183c29d9d3cd34e73d7cb2213b8a">cos</a> (double angle)</td></tr>
<tr class="memdesc:ac7a1183c29d9d3cd34e73d7cb2213b8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Homemade cosinus implementation, which is faster than casio provided cosinus function. <a href="#ac7a1183c29d9d3cd34e73d7cb2213b8a">More...</a><br /></td></tr>
<tr class="separator:ac7a1183c29d9d3cd34e73d7cb2213b8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fcd1947589f80d925b2a945cbb2156f"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="translate_8h.html#a6fcd1947589f80d925b2a945cbb2156f">sin</a> (const double angle)</td></tr>
<tr class="memdesc:a6fcd1947589f80d925b2a945cbb2156f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Homemade sinus implementation, which is faster than casio provided sinus function. <a href="#a6fcd1947589f80d925b2a945cbb2156f">More...</a><br /></td></tr>
<tr class="separator:a6fcd1947589f80d925b2a945cbb2156f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a43016d873124d39034edb8cd164794db"><td class="memItemLeft" align="right" valign="top">const double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="translate_8h.html#a43016d873124d39034edb8cd164794db">pi</a></td></tr>
<tr class="separator:a43016d873124d39034edb8cd164794db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c0cc2347cdb41873a6b0dbc108b15d3"><td class="memItemLeft" align="right" valign="top">const double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="translate_8h.html#a2c0cc2347cdb41873a6b0dbc108b15d3">pi2</a></td></tr>
<tr class="separator:a2c0cc2347cdb41873a6b0dbc108b15d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29539de4d4f8937b304e70fc4aa3b672"><td class="memItemLeft" align="right" valign="top">const double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="translate_8h.html#a29539de4d4f8937b304e70fc4aa3b672">pi_sur_2</a></td></tr>
<tr class="separator:a29539de4d4f8937b304e70fc4aa3b672"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="a83166ae9b8c23749f0910073d570ef3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83166ae9b8c23749f0910073d570ef3e">&#9670;&nbsp;</a></span>FE_floating_position</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_f_e__floating__position.html">FE_floating_position</a> <a class="el" href="struct_f_e__floating__position.html">FE_floating_position</a></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="translate_8h_source.html#l00029">29</a> of file <a class="el" href="translate_8h_source.html">translate.h</a>.</p>
</div>
</div>
<a id="a35c4a457f046ca4f02dcc94a58daa4bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a35c4a457f046ca4f02dcc94a58daa4bf">&#9670;&nbsp;</a></span>FE_integer_point</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_f_e__integer__point.html">FE_integer_point</a> <a class="el" href="struct_f_e__integer__point.html">FE_integer_point</a></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="translate_8h_source.html#l00041">41</a> of file <a class="el" href="translate_8h_source.html">translate.h</a>.</p>
</div>
</div>
<a id="a3f5d3995e107856579b9052675abfc39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f5d3995e107856579b9052675abfc39">&#9670;&nbsp;</a></span>FE_integer_position</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_f_e__integer__position.html">FE_integer_position</a> <a class="el" href="struct_f_e__integer__position.html">FE_integer_position</a></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="translate_8h_source.html#l00017">17</a> of file <a class="el" href="translate_8h_source.html">translate.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ac7a1183c29d9d3cd34e73d7cb2213b8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7a1183c29d9d3cd34e73d7cb2213b8a">&#9670;&nbsp;</a></span>cos()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double cos </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>angle</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Homemade cosinus implementation, which is faster than casio provided cosinus function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">angle</td><td>The angle (rad)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>cos angle </dd></dl>
</div>
</div>
<a id="a70d5f87988b0725ee2fbd0a84bdd9e81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70d5f87988b0725ee2fbd0a84bdd9e81">&#9670;&nbsp;</a></span>modulo_2pi()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double modulo_2pi </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>a</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets up an angle mesure between -pi and +pi. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>the angle (rad)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>angle mesure which respect the following contraint : -pi &lt;= angle &lt;= pi </dd></dl>
</div>
</div>
<a id="a92fa63cabc18462be74711f65c5e5466"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92fa63cabc18462be74711f65c5e5466">&#9670;&nbsp;</a></span>render_set()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void render_set </td>
<td>(</td>
<td class="paramtype">const double&#160;</td>
<td class="paramname"><em>dh</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double&#160;</td>
<td class="paramname"><em>dv</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double&#160;</td>
<td class="paramname"><em>roulis</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="struct_f_e__integer__position.html">FE_integer_position</a> *&#160;</td>
<td class="paramname"><em>camera</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets up the translation matrices for a new rendering cycle. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">dh</td><td>Camera's horizontal direction (rad) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dv</td><td>Camera's vertical direction (rad) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">roulis</td><td>Optionnal rotation around the middle of the screen </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">camera</td><td>The camera's coordinates, as an integer position </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ad9469e65551169eb575e264a8ad0e9e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9469e65551169eb575e264a8ad0e9e6">&#9670;&nbsp;</a></span>render_translate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void render_translate </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_f_e__integer__point.html">FE_integer_point</a> *&#160;</td>
<td class="paramname"><em>point</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function rotates and applies perspective on an integer point. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">point</td><td>The point which needs to be translated </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a6fcd1947589f80d925b2a945cbb2156f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fcd1947589f80d925b2a945cbb2156f">&#9670;&nbsp;</a></span>sin()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double sin </td>
<td>(</td>
<td class="paramtype">const double&#160;</td>
<td class="paramname"><em>angle</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Homemade sinus implementation, which is faster than casio provided sinus function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">angle</td><td>The angle (rad)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>sin angle </dd></dl>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a43016d873124d39034edb8cd164794db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43016d873124d39034edb8cd164794db">&#9670;&nbsp;</a></span>pi</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const double pi</td>
</tr>
</table>
</div><div class="memdoc">
<p>mathematics constants </p>
</div>
</div>
<a id="a2c0cc2347cdb41873a6b0dbc108b15d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c0cc2347cdb41873a6b0dbc108b15d3">&#9670;&nbsp;</a></span>pi2</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const double pi2</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a29539de4d4f8937b304e70fc4aa3b672"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29539de4d4f8937b304e70fc4aa3b672">&#9670;&nbsp;</a></span>pi_sur_2</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const double pi_sur_2</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_ada157988d47c0ed8971be2c0e2fe61c.html">render</a></li><li class="navelem"><a class="el" href="translate_8h.html">translate.h</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>