fxengine/doc/html/translate_8h_source.html

107 lines
21 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 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="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>
<!-- 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 id="nav-path" class="navpath">
<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> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">translate.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="translate_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#ifndef RENDER_TRANSLATE_H</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define RENDER_TRANSLATE_H</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="parameters_8h.html">render/parameters.h</a>&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="structrender__integer__position.html"> 11</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structrender__integer__position.html">render_integer_position</a></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;{</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="structrender__integer__position.html#ac2fb30be1b894e32b31b68bb513262a3"> 13</a></span>&#160; int32_t <a class="code" href="structrender__integer__position.html#af6d3062751bd565decb1a2cd3b63bdb2">x</a>,</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; <a class="code" href="structrender__integer__position.html#af64066d134a77e01b3d6eb8da813627a">y</a>,</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; <a class="code" href="structrender__integer__position.html#ac2fb30be1b894e32b31b68bb513262a3">z</a>;</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;};</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="translate_8h.html#a5f9ded1e38ff3657628b548ccfc1ef95"> 17</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structrender__integer__position.html">render_integer_position</a> <a class="code" href="structrender__integer__position.html">render_integer_position</a>;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="structrender__floating__position.html"> 23</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structrender__floating__position.html">render_floating_position</a></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;{</div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="structrender__floating__position.html#ab3e6ed577a7c669c19de1f9c1b46c872"> 25</a></span>&#160; <span class="keywordtype">double</span> <a class="code" href="structrender__floating__position.html#af88b946fb90d5f08b5fb740c70e98c10">x</a>,</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; <a class="code" href="structrender__floating__position.html#ab927965981178aa1fba979a37168db2a">y</a>,</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; <a class="code" href="structrender__floating__position.html#ab3e6ed577a7c669c19de1f9c1b46c872">z</a>;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;};</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="translate_8h.html#a6bcbfe3c9754f007c4b4b5ac10a9db44"> 29</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structrender__floating__position.html">render_floating_position</a> <a class="code" href="structrender__floating__position.html">render_floating_position</a>;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="structrender__integer__point.html"> 36</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structrender__integer__point.html">render_integer_point</a></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;{</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="structrender__integer__point.html#a127ca4356a403fe834505dfb3dee44a7"> 38</a></span>&#160; <a class="code" href="structrender__integer__position.html">render_integer_position</a> <a class="code" href="structrender__integer__point.html#a07494c9011ab307701955a2a50447d8e">real</a>,</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <a class="code" href="structrender__integer__point.html#a127ca4356a403fe834505dfb3dee44a7">translated</a>;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;};</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="translate_8h.html#af0969bff3172f7f5a5c5a8c14a800c50"> 41</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structrender__integer__point.html">render_integer_point</a> <a class="code" href="structrender__integer__point.html">render_integer_point</a>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="comment">// applique la matrice de rotation et les deltas sur les coordonnées d&#39;un point</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="keywordtype">void</span> <a class="code" href="translate_8h.html#af2c04376cb842595d7c15d7532c28057">render_translate</a>(<a class="code" href="structrender__integer__point.html">render_integer_point</a> * point);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;<span class="keywordtype">void</span> <a class="code" href="translate_8h.html#adf49827741ad8fb83dd1dee562d328f6">render_set</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="triangle_8h.html#adf439add26ef55a63873e21debf3aa48">dh</a>, <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="triangle_8h.html#a0ccda5aa5b9d561b1dca2bc19f39b1b7">dv</a>, <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="triangle_8h.html#a93f3c83cc91297afe3f9fa140dd6df68">roulis</a>, <span class="keyword">const</span> <a class="code" href="structrender__integer__position.html">render_integer_position</a> * <a class="code" href="triangle_8h.html#a4f751f0f3e73a03633da079f41b6bd5c">camera</a>);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="translate_8h.html#a43016d873124d39034edb8cd164794db">pi</a>, <a class="code" href="translate_8h.html#a2c0cc2347cdb41873a6b0dbc108b15d3">pi2</a>, <a class="code" href="translate_8h.html#a29539de4d4f8937b304e70fc4aa3b672">pi_sur_2</a>;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="keywordtype">double</span> <a class="code" href="translate_8h.html#a70d5f87988b0725ee2fbd0a84bdd9e81">modulo_2pi</a>(<span class="keywordtype">double</span> a);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;<span class="keywordtype">double</span> <a class="code" href="translate_8h.html#ac7a1183c29d9d3cd34e73d7cb2213b8a">cos</a>(<span class="keywordtype">double</span> angle);</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;<span class="keywordtype">double</span> <a class="code" href="translate_8h.html#a6fcd1947589f80d925b2a945cbb2156f">sin</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> angle);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="triangle_8h_html_a93f3c83cc91297afe3f9fa140dd6df68"><div class="ttname"><a href="triangle_8h.html#a93f3c83cc91297afe3f9fa140dd6df68">roulis</a></div><div class="ttdeci">struct render_triangle const double const double const double roulis</div><div class="ttdef"><b>Definition:</b> <a href="triangle_8h_source.html#l00047">triangle.h:47</a></div></div>
<div class="ttc" id="structrender__floating__position_html_af88b946fb90d5f08b5fb740c70e98c10"><div class="ttname"><a href="structrender__floating__position.html#af88b946fb90d5f08b5fb740c70e98c10">render_floating_position::x</a></div><div class="ttdeci">double x</div><div class="ttdef"><b>Definition:</b> <a href="translate_8h_source.html#l00025">translate.h:25</a></div></div>
<div class="ttc" id="translate_8h_html_a6fcd1947589f80d925b2a945cbb2156f"><div class="ttname"><a href="translate_8h.html#a6fcd1947589f80d925b2a945cbb2156f">sin</a></div><div class="ttdeci">double sin(const double angle)</div><div class="ttdoc">Homemade sinus implementation, which is faster than casio provided sinus function.</div></div>
<div class="ttc" id="translate_8h_html_a2c0cc2347cdb41873a6b0dbc108b15d3"><div class="ttname"><a href="translate_8h.html#a2c0cc2347cdb41873a6b0dbc108b15d3">pi2</a></div><div class="ttdeci">const double pi2</div></div>
<div class="ttc" id="structrender__integer__point_html_a07494c9011ab307701955a2a50447d8e"><div class="ttname"><a href="structrender__integer__point.html#a07494c9011ab307701955a2a50447d8e">render_integer_point::real</a></div><div class="ttdeci">render_integer_position real</div><div class="ttdef"><b>Definition:</b> <a href="translate_8h_source.html#l00038">translate.h:38</a></div></div>
<div class="ttc" id="triangle_8h_html_adf439add26ef55a63873e21debf3aa48"><div class="ttname"><a href="triangle_8h.html#adf439add26ef55a63873e21debf3aa48">dh</a></div><div class="ttdeci">struct render_triangle const double dh</div><div class="ttdef"><b>Definition:</b> <a href="triangle_8h_source.html#l00047">triangle.h:47</a></div></div>
<div class="ttc" id="translate_8h_html_a29539de4d4f8937b304e70fc4aa3b672"><div class="ttname"><a href="translate_8h.html#a29539de4d4f8937b304e70fc4aa3b672">pi_sur_2</a></div><div class="ttdeci">const double pi_sur_2</div></div>
<div class="ttc" id="triangle_8h_html_a4f751f0f3e73a03633da079f41b6bd5c"><div class="ttname"><a href="triangle_8h.html#a4f751f0f3e73a03633da079f41b6bd5c">camera</a></div><div class="ttdeci">struct render_triangle const double const double const double const render_integer_position * camera</div><div class="ttdef"><b>Definition:</b> <a href="triangle_8h_source.html#l00047">triangle.h:47</a></div></div>
<div class="ttc" id="structrender__integer__position_html_af6d3062751bd565decb1a2cd3b63bdb2"><div class="ttname"><a href="structrender__integer__position.html#af6d3062751bd565decb1a2cd3b63bdb2">render_integer_position::x</a></div><div class="ttdeci">int32_t x</div><div class="ttdef"><b>Definition:</b> <a href="translate_8h_source.html#l00013">translate.h:13</a></div></div>
<div class="ttc" id="structrender__floating__position_html_ab3e6ed577a7c669c19de1f9c1b46c872"><div class="ttname"><a href="structrender__floating__position.html#ab3e6ed577a7c669c19de1f9c1b46c872">render_floating_position::z</a></div><div class="ttdeci">double z</div><div class="ttdef"><b>Definition:</b> <a href="translate_8h_source.html#l00025">translate.h:25</a></div></div>
<div class="ttc" id="structrender__integer__position_html_ac2fb30be1b894e32b31b68bb513262a3"><div class="ttname"><a href="structrender__integer__position.html#ac2fb30be1b894e32b31b68bb513262a3">render_integer_position::z</a></div><div class="ttdeci">int32_t z</div><div class="ttdef"><b>Definition:</b> <a href="translate_8h_source.html#l00013">translate.h:13</a></div></div>
<div class="ttc" id="translate_8h_html_af2c04376cb842595d7c15d7532c28057"><div class="ttname"><a href="translate_8h.html#af2c04376cb842595d7c15d7532c28057">render_translate</a></div><div class="ttdeci">void render_translate(render_integer_point *point)</div><div class="ttdoc">This function rotates and applies perspective on an integer point.</div></div>
<div class="ttc" id="structrender__floating__position_html_ab927965981178aa1fba979a37168db2a"><div class="ttname"><a href="structrender__floating__position.html#ab927965981178aa1fba979a37168db2a">render_floating_position::y</a></div><div class="ttdeci">double y</div><div class="ttdef"><b>Definition:</b> <a href="translate_8h_source.html#l00025">translate.h:25</a></div></div>
<div class="ttc" id="translate_8h_html_a70d5f87988b0725ee2fbd0a84bdd9e81"><div class="ttname"><a href="translate_8h.html#a70d5f87988b0725ee2fbd0a84bdd9e81">modulo_2pi</a></div><div class="ttdeci">double modulo_2pi(double a)</div><div class="ttdoc">Sets up an angle mesure between -pi and +pi.</div></div>
<div class="ttc" id="translate_8h_html_adf49827741ad8fb83dd1dee562d328f6"><div class="ttname"><a href="translate_8h.html#adf49827741ad8fb83dd1dee562d328f6">render_set</a></div><div class="ttdeci">void render_set(const double dh, const double dv, const double roulis, const render_integer_position *camera)</div><div class="ttdoc">Sets up the translation matrices for a new rendering cycle There is no need to call this function if ...</div></div>
<div class="ttc" id="structrender__integer__point_html"><div class="ttname"><a href="structrender__integer__point.html">render_integer_point</a></div><div class="ttdoc">This is a point which is used for 3d translations and rendering integer mode is the best solution to ...</div><div class="ttdef"><b>Definition:</b> <a href="translate_8h_source.html#l00036">translate.h:36</a></div></div>
<div class="ttc" id="translate_8h_html_a43016d873124d39034edb8cd164794db"><div class="ttname"><a href="translate_8h.html#a43016d873124d39034edb8cd164794db">pi</a></div><div class="ttdeci">const double pi</div></div>
<div class="ttc" id="structrender__integer__point_html_a127ca4356a403fe834505dfb3dee44a7"><div class="ttname"><a href="structrender__integer__point.html#a127ca4356a403fe834505dfb3dee44a7">render_integer_point::translated</a></div><div class="ttdeci">render_integer_position translated</div><div class="ttdef"><b>Definition:</b> <a href="translate_8h_source.html#l00038">translate.h:38</a></div></div>
<div class="ttc" id="parameters_8h_html"><div class="ttname"><a href="parameters_8h.html">parameters.h</a></div></div>
<div class="ttc" id="structrender__integer__position_html_af64066d134a77e01b3d6eb8da813627a"><div class="ttname"><a href="structrender__integer__position.html#af64066d134a77e01b3d6eb8da813627a">render_integer_position::y</a></div><div class="ttdeci">int32_t y</div><div class="ttdef"><b>Definition:</b> <a href="translate_8h_source.html#l00013">translate.h:13</a></div></div>
<div class="ttc" id="structrender__integer__position_html"><div class="ttname"><a href="structrender__integer__position.html">render_integer_position</a></div><div class="ttdoc">this struct is a point in 3d, which has coords save as uint32_t this is the recommended type for high...</div><div class="ttdef"><b>Definition:</b> <a href="translate_8h_source.html#l00011">translate.h:11</a></div></div>
<div class="ttc" id="triangle_8h_html_a0ccda5aa5b9d561b1dca2bc19f39b1b7"><div class="ttname"><a href="triangle_8h.html#a0ccda5aa5b9d561b1dca2bc19f39b1b7">dv</a></div><div class="ttdeci">struct render_triangle const double const double dv</div><div class="ttdef"><b>Definition:</b> <a href="triangle_8h_source.html#l00047">triangle.h:47</a></div></div>
<div class="ttc" id="translate_8h_html_ac7a1183c29d9d3cd34e73d7cb2213b8a"><div class="ttname"><a href="translate_8h.html#ac7a1183c29d9d3cd34e73d7cb2213b8a">cos</a></div><div class="ttdeci">double cos(double angle)</div><div class="ttdoc">Homemade cosinus implementation, which is faster than casio provided cosinus function.</div></div>
<div class="ttc" id="structrender__floating__position_html"><div class="ttname"><a href="structrender__floating__position.html">render_floating_position</a></div><div class="ttdoc">this struct is a point in 3d, which has coords save as double it is not recommended to use it for hig...</div><div class="ttdef"><b>Definition:</b> <a href="translate_8h_source.html#l00023">translate.h:23</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>