diff options
| author | Mirrorbot <mirrorbot@cogarr.net> | 2025-12-27 17:53:06 -0600 |
|---|---|---|
| committer | Mirrorbot <mirrorbot@cogarr.net> | 2025-12-27 17:53:06 -0600 |
| commit | 71e94ee161447b84c0eaabf6567f8fa62262cd3e (patch) | |
| tree | 391064cc6173a6fe75069af2fdc1978af12f623e /doc/html/_s_view_frustum_8h_source.html | |
| download | irrlicht-71e94ee161447b84c0eaabf6567f8fa62262cd3e.tar.gz irrlicht-71e94ee161447b84c0eaabf6567f8fa62262cd3e.tar.bz2 irrlicht-71e94ee161447b84c0eaabf6567f8fa62262cd3e.zip | |
Diffstat (limited to 'doc/html/_s_view_frustum_8h_source.html')
| -rw-r--r-- | doc/html/_s_view_frustum_8h_source.html | 444 |
1 files changed, 444 insertions, 0 deletions
diff --git a/doc/html/_s_view_frustum_8h_source.html b/doc/html/_s_view_frustum_8h_source.html new file mode 100644 index 0000000..ede375a --- /dev/null +++ b/doc/html/_s_view_frustum_8h_source.html @@ -0,0 +1,444 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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"/> +<title>Irrlicht 3D Engine: SViewFrustum.h Source File</title> + +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +<link href="navtree.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="resize.js"></script> +<script type="text/javascript" src="navtree.js"></script> +<script type="text/javascript"> + $(document).ready(initResizable); +</script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { searchBox.OnSelectItem(0); }); +</script> + +</head> +<body> +<div id="top"><!-- do not remove this div! --> + + +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + + <td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td> + + + <td style="padding-left: 0.5em;"> + <div id="projectname">Irrlicht 3D Engine + + </div> + + </td> + + + + + <td> <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> +</td> + + + </tr> + </tbody> +</table> +</div> + +<!-- Generated by Doxygen 1.7.5.1 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> +<script type="text/javascript" src="dynsections.js"></script> +</div> +<div id="side-nav" class="ui-resizable side-nav-resizable"> + <div id="nav-tree"> + <div id="nav-tree-contents"> + </div> + </div> + <div id="splitbar" style="-moz-user-select:none;" + class="ui-resizable-handle"> + </div> +</div> +<script type="text/javascript"> + initNavTree('_s_view_frustum_8h.html',''); +</script> +<div id="doc-content"> +<div class="header"> + <div class="headertitle"> +<div class="title">SViewFrustum.h</div> </div> +</div> +<div class="contents"> +<a href="_s_view_frustum_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2002-2012 Nikolaus Gebhardt</span> +<a name="l00002"></a>00002 <span class="comment">// This file is part of the "Irrlicht Engine".</span> +<a name="l00003"></a>00003 <span class="comment">// For conditions of distribution and use, see copyright notice in irrlicht.h</span> +<a name="l00004"></a>00004 +<a name="l00005"></a>00005 <span class="preprocessor">#ifndef __S_VIEW_FRUSTUM_H_INCLUDED__</span> +<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __S_VIEW_FRUSTUM_H_INCLUDED__</span> +<a name="l00007"></a>00007 <span class="preprocessor"></span> +<a name="l00008"></a>00008 <span class="preprocessor">#include "<a class="code" href="plane3d_8h.html">plane3d.h</a>"</span> +<a name="l00009"></a>00009 <span class="preprocessor">#include "<a class="code" href="vector3d_8h.html">vector3d.h</a>"</span> +<a name="l00010"></a>00010 <span class="preprocessor">#include "<a class="code" href="line3d_8h.html">line3d.h</a>"</span> +<a name="l00011"></a>00011 <span class="preprocessor">#include "<a class="code" href="aabbox3d_8h.html">aabbox3d.h</a>"</span> +<a name="l00012"></a>00012 <span class="preprocessor">#include "<a class="code" href="matrix4_8h.html">matrix4.h</a>"</span> +<a name="l00013"></a>00013 <span class="preprocessor">#include "<a class="code" href="_i_video_driver_8h.html">IVideoDriver.h</a>"</span> +<a name="l00014"></a>00014 +<a name="l00015"></a>00015 <span class="keyword">namespace </span>irr +<a name="l00016"></a>00016 { +<a name="l00017"></a>00017 <span class="keyword">namespace </span>scene +<a name="l00018"></a>00018 { +<a name="l00019"></a>00019 +<a name="l00021"></a>00021 +<a name="l00025"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html">00025</a> <span class="keyword">struct </span><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html" title="Defines the view frustum. That's the space visible by the camera.">SViewFrustum</a> +<a name="l00026"></a>00026 { +<a name="l00027"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0">00027</a> <span class="keyword">enum</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0">VFPLANES</a> +<a name="l00028"></a>00028 { +<a name="l00030"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a33c11636c0cf3a29df16551fb3222f89">00030</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a33c11636c0cf3a29df16551fb3222f89" title="Far plane of the frustum. That is the plane farest away from the eye.">VF_FAR_PLANE</a> = 0, +<a name="l00032"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0ad4e37002c2f3f5c9aa7219ca74ffb48e">00032</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0ad4e37002c2f3f5c9aa7219ca74ffb48e" title="Near plane of the frustum. That is the plane nearest to the eye.">VF_NEAR_PLANE</a>, +<a name="l00034"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a4d611f15cd215819287e533b45715d5c">00034</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a4d611f15cd215819287e533b45715d5c" title="Left plane of the frustum.">VF_LEFT_PLANE</a>, +<a name="l00036"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0acc02c8b170e35f1416f1511646b051aa">00036</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0acc02c8b170e35f1416f1511646b051aa" title="Right plane of the frustum.">VF_RIGHT_PLANE</a>, +<a name="l00038"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0aa230be71193da774ddcb735ec7b10dd1">00038</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0aa230be71193da774ddcb735ec7b10dd1" title="Bottom plane of the frustum.">VF_BOTTOM_PLANE</a>, +<a name="l00040"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0adc6f550cf3890b19837cd8f0d7b1020a">00040</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0adc6f550cf3890b19837cd8f0d7b1020a" title="Top plane of the frustum.">VF_TOP_PLANE</a>, +<a name="l00041"></a>00041 +<a name="l00043"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a6c3c4cb8060a23a2365cf1df46fcefd7">00043</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a6c3c4cb8060a23a2365cf1df46fcefd7" title="Amount of planes enclosing the view frustum. Should be 6.">VF_PLANE_COUNT</a> +<a name="l00044"></a>00044 }; +<a name="l00045"></a>00045 +<a name="l00046"></a>00046 +<a name="l00048"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a7052e88c612bd1239115929e94e6210d">00048</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a7052e88c612bd1239115929e94e6210d" title="Default Constructor.">SViewFrustum</a>() {} +<a name="l00049"></a>00049 +<a name="l00051"></a>00051 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a7052e88c612bd1239115929e94e6210d" title="Default Constructor.">SViewFrustum</a>(<span class="keyword">const</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html" title="Defines the view frustum. That's the space visible by the camera.">SViewFrustum</a>& other); +<a name="l00052"></a>00052 +<a name="l00054"></a>00054 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a7052e88c612bd1239115929e94e6210d" title="Default Constructor.">SViewFrustum</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& mat); +<a name="l00055"></a>00055 +<a name="l00057"></a>00057 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a2517bde9292aa26119d75b9ff0b92833" title="This constructor creates a view frustum based on a projection and/or view matrix.">setFrom</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& mat); +<a name="l00058"></a>00058 +<a name="l00060"></a>00060 +<a name="l00061"></a>00061 <span class="keywordtype">void</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#aeabadaf532f08ba3cb98b897ff0619f2" title="transforms the frustum by the matrix">transform</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& mat); +<a name="l00062"></a>00062 +<a name="l00064"></a>00064 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a99712510130276f440e2c399dde7e5f3" title="returns the point which is on the far left upper corner inside the the view frustum.">getFarLeftUp</a>() <span class="keyword">const</span>; +<a name="l00065"></a>00065 +<a name="l00067"></a>00067 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a9a79eb4430af41031850adc7a0e0e3cf" title="returns the point which is on the far left bottom corner inside the the view frustum.">getFarLeftDown</a>() <span class="keyword">const</span>; +<a name="l00068"></a>00068 +<a name="l00070"></a>00070 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a1b7f3b1cd4da4ea886b77d674e1c17dd" title="returns the point which is on the far right top corner inside the the view frustum.">getFarRightUp</a>() <span class="keyword">const</span>; +<a name="l00071"></a>00071 +<a name="l00073"></a>00073 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#add04c29bfa22d94be96c92ecff5420b9" title="returns the point which is on the far right bottom corner inside the the view frustum.">getFarRightDown</a>() <span class="keyword">const</span>; +<a name="l00074"></a>00074 +<a name="l00076"></a>00076 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#af240a13958215ce0cbe6ccd75301828a" title="returns the point which is on the near left upper corner inside the the view frustum.">getNearLeftUp</a>() <span class="keyword">const</span>; +<a name="l00077"></a>00077 +<a name="l00079"></a>00079 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#addbe9237ea17c93ae60bc4c27e862a76" title="returns the point which is on the near left bottom corner inside the the view frustum.">getNearLeftDown</a>() <span class="keyword">const</span>; +<a name="l00080"></a>00080 +<a name="l00082"></a>00082 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a4fe9e7b51a3f7f7235ef0f895bf32054" title="returns the point which is on the near right top corner inside the the view frustum.">getNearRightUp</a>() <span class="keyword">const</span>; +<a name="l00083"></a>00083 +<a name="l00085"></a>00085 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a74e011d85fb41206b5dd0af76635dc00" title="returns the point which is on the near right bottom corner inside the the view frustum.">getNearRightDown</a>() <span class="keyword">const</span>; +<a name="l00086"></a>00086 +<a name="l00088"></a>00088 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1aabbox3d.html">core::aabbox3d<f32></a> &<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a4328fe06bedd409ae20e9efc64e68706" title="returns a bounding box enclosing the whole view frustum">getBoundingBox</a>() <span class="keyword">const</span>; +<a name="l00089"></a>00089 +<a name="l00091"></a>00091 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a458eb19a23bcad50da0f9d3163e3621b" title="recalculates the bounding box member based on the planes">recalculateBoundingBox</a>(); +<a name="l00092"></a>00092 +<a name="l00094"></a>00094 <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#acf8edd203e7479d2b444ed548075ffa6" title="get the given state's matrix based on frustum E_TRANSFORMATION_STATE">getTransform</a>( <a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43d" title="enumeration for geometry transformation states">video::E_TRANSFORMATION_STATE</a> state); +<a name="l00095"></a>00095 +<a name="l00097"></a>00097 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#acf8edd203e7479d2b444ed548075ffa6" title="get the given state's matrix based on frustum E_TRANSFORMATION_STATE">getTransform</a>( <a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43d" title="enumeration for geometry transformation states">video::E_TRANSFORMATION_STATE</a> state) <span class="keyword">const</span>; +<a name="l00098"></a>00098 +<a name="l00100"></a>00100 +<a name="l00101"></a>00101 <span class="keywordtype">bool</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ace0b4c93dcd1d4e6ae50615b457f1851" title="clips a line to the view frustum.">clipLine</a>(<a class="code" href="classirr_1_1core_1_1line3d.html" title="3D line between two points with intersection methods.">core::line3d<f32></a>& line) <span class="keyword">const</span>; +<a name="l00102"></a>00102 +<a name="l00104"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a77726fa084f416d69f058a7b2f887545">00104</a> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a77726fa084f416d69f058a7b2f887545" title="the position of the camera">cameraPosition</a>; +<a name="l00105"></a>00105 +<a name="l00107"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2">00107</a> <a class="code" href="classirr_1_1core_1_1plane3d.html">core::plane3d<f32></a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a6c3c4cb8060a23a2365cf1df46fcefd7" title="Amount of planes enclosing the view frustum. Should be 6.">VF_PLANE_COUNT</a>]; +<a name="l00108"></a>00108 +<a name="l00110"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ad4c8605ad3494093e3e5860e0332fe8a">00110</a> <a class="code" href="classirr_1_1core_1_1aabbox3d.html">core::aabbox3d<f32></a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ad4c8605ad3494093e3e5860e0332fe8a" title="bounding box around the view frustum">boundingBox</a>; +<a name="l00111"></a>00111 +<a name="l00112"></a>00112 <span class="keyword">private</span>: +<a name="l00114"></a>00114 <span class="keyword">enum</span> E_TRANSFORMATION_STATE_FRUSTUM +<a name="l00115"></a>00115 { +<a name="l00116"></a>00116 ETS_VIEW = 0, +<a name="l00117"></a>00117 ETS_PROJECTION = 1, +<a name="l00118"></a>00118 ETS_COUNT_FRUSTUM +<a name="l00119"></a>00119 }; +<a name="l00120"></a>00120 +<a name="l00122"></a>00122 <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a> Matrices[ETS_COUNT_FRUSTUM]; +<a name="l00123"></a>00123 }; +<a name="l00124"></a>00124 +<a name="l00125"></a>00125 +<a name="l00129"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#aa7cfed3ee9feee79efe02d26f3b14b0c">00129</a> <span class="keyword">inline</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a7052e88c612bd1239115929e94e6210d" title="Default Constructor.">SViewFrustum::SViewFrustum</a>(<span class="keyword">const</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html" title="Defines the view frustum. That's the space visible by the camera.">SViewFrustum</a>& other) +<a name="l00130"></a>00130 { +<a name="l00131"></a>00131 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a77726fa084f416d69f058a7b2f887545" title="the position of the camera">cameraPosition</a>=other.<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a77726fa084f416d69f058a7b2f887545" title="the position of the camera">cameraPosition</a>; +<a name="l00132"></a>00132 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ad4c8605ad3494093e3e5860e0332fe8a" title="bounding box around the view frustum">boundingBox</a>=other.<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ad4c8605ad3494093e3e5860e0332fe8a" title="bounding box around the view frustum">boundingBox</a>; +<a name="l00133"></a>00133 +<a name="l00134"></a>00134 <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> i; +<a name="l00135"></a>00135 <span class="keywordflow">for</span> (i=0; i<<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a6c3c4cb8060a23a2365cf1df46fcefd7" title="Amount of planes enclosing the view frustum. Should be 6.">VF_PLANE_COUNT</a>; ++i) +<a name="l00136"></a>00136 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[i]=other.<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[i]; +<a name="l00137"></a>00137 +<a name="l00138"></a>00138 for (i=0; i<ETS_COUNT_FRUSTUM; ++i) +<a name="l00139"></a>00139 Matrices[i]=other.Matrices[i]; +<a name="l00140"></a>00140 } +<a name="l00141"></a>00141 +<a name="l00142"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#acfcbb01f1e26f73ee1d9c7695302a508">00142</a> <span class="keyword">inline</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a7052e88c612bd1239115929e94e6210d" title="Default Constructor.">SViewFrustum::SViewFrustum</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& mat) +<a name="l00143"></a>00143 { +<a name="l00144"></a>00144 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a2517bde9292aa26119d75b9ff0b92833" title="This constructor creates a view frustum based on a projection and/or view matrix.">setFrom</a> ( mat ); +<a name="l00145"></a>00145 } +<a name="l00146"></a>00146 +<a name="l00147"></a>00147 +<a name="l00148"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#aeabadaf532f08ba3cb98b897ff0619f2">00148</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#aeabadaf532f08ba3cb98b897ff0619f2" title="transforms the frustum by the matrix">SViewFrustum::transform</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& mat) +<a name="l00149"></a>00149 { +<a name="l00150"></a>00150 <span class="keywordflow">for</span> (<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> i=0; i<<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a6c3c4cb8060a23a2365cf1df46fcefd7" title="Amount of planes enclosing the view frustum. Should be 6.">VF_PLANE_COUNT</a>; ++i) +<a name="l00151"></a>00151 mat.<a class="code" href="classirr_1_1core_1_1_c_matrix4.html#ac4f0d4156d573d8b73eb51dce76e094e" title="Transforms a plane by this matrix.">transformPlane</a>(<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[i]); +<a name="l00152"></a>00152 +<a name="l00153"></a>00153 mat.<a class="code" href="classirr_1_1core_1_1_c_matrix4.html#aa6bb8b39114749d70e51bd1b90bce0a1" title="Transforms the vector by this matrix.">transformVect</a>(<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a77726fa084f416d69f058a7b2f887545" title="the position of the camera">cameraPosition</a>); +<a name="l00154"></a>00154 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a458eb19a23bcad50da0f9d3163e3621b" title="recalculates the bounding box member based on the planes">recalculateBoundingBox</a>(); +<a name="l00155"></a>00155 } +<a name="l00156"></a>00156 +<a name="l00157"></a>00157 +<a name="l00158"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a99712510130276f440e2c399dde7e5f3">00158</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a99712510130276f440e2c399dde7e5f3" title="returns the point which is on the far left upper corner inside the the view frustum.">SViewFrustum::getFarLeftUp</a>()<span class="keyword"> const</span> +<a name="l00159"></a>00159 <span class="keyword"> </span>{ +<a name="l00160"></a>00160 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> p; +<a name="l00161"></a>00161 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a33c11636c0cf3a29df16551fb3222f89" title="Far plane of the frustum. That is the plane farest away from the eye.">scene::SViewFrustum::VF_FAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a42591d9bdd8dd03bb6b14836b6e5af7b" title="Get the intersection point with two other planes if there is one.">getIntersectionWithPlanes</a>( +<a name="l00162"></a>00162 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0adc6f550cf3890b19837cd8f0d7b1020a" title="Top plane of the frustum.">scene::SViewFrustum::VF_TOP_PLANE</a>], +<a name="l00163"></a>00163 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a4d611f15cd215819287e533b45715d5c" title="Left plane of the frustum.">scene::SViewFrustum::VF_LEFT_PLANE</a>], p); +<a name="l00164"></a>00164 +<a name="l00165"></a>00165 <span class="keywordflow">return</span> p; +<a name="l00166"></a>00166 } +<a name="l00167"></a>00167 +<a name="l00168"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a9a79eb4430af41031850adc7a0e0e3cf">00168</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a9a79eb4430af41031850adc7a0e0e3cf" title="returns the point which is on the far left bottom corner inside the the view frustum.">SViewFrustum::getFarLeftDown</a>()<span class="keyword"> const</span> +<a name="l00169"></a>00169 <span class="keyword"> </span>{ +<a name="l00170"></a>00170 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> p; +<a name="l00171"></a>00171 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a33c11636c0cf3a29df16551fb3222f89" title="Far plane of the frustum. That is the plane farest away from the eye.">scene::SViewFrustum::VF_FAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a42591d9bdd8dd03bb6b14836b6e5af7b" title="Get the intersection point with two other planes if there is one.">getIntersectionWithPlanes</a>( +<a name="l00172"></a>00172 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0aa230be71193da774ddcb735ec7b10dd1" title="Bottom plane of the frustum.">scene::SViewFrustum::VF_BOTTOM_PLANE</a>], +<a name="l00173"></a>00173 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a4d611f15cd215819287e533b45715d5c" title="Left plane of the frustum.">scene::SViewFrustum::VF_LEFT_PLANE</a>], p); +<a name="l00174"></a>00174 +<a name="l00175"></a>00175 <span class="keywordflow">return</span> p; +<a name="l00176"></a>00176 } +<a name="l00177"></a>00177 +<a name="l00178"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a1b7f3b1cd4da4ea886b77d674e1c17dd">00178</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a1b7f3b1cd4da4ea886b77d674e1c17dd" title="returns the point which is on the far right top corner inside the the view frustum.">SViewFrustum::getFarRightUp</a>()<span class="keyword"> const</span> +<a name="l00179"></a>00179 <span class="keyword"> </span>{ +<a name="l00180"></a>00180 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> p; +<a name="l00181"></a>00181 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a33c11636c0cf3a29df16551fb3222f89" title="Far plane of the frustum. That is the plane farest away from the eye.">scene::SViewFrustum::VF_FAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a42591d9bdd8dd03bb6b14836b6e5af7b" title="Get the intersection point with two other planes if there is one.">getIntersectionWithPlanes</a>( +<a name="l00182"></a>00182 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0adc6f550cf3890b19837cd8f0d7b1020a" title="Top plane of the frustum.">scene::SViewFrustum::VF_TOP_PLANE</a>], +<a name="l00183"></a>00183 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0acc02c8b170e35f1416f1511646b051aa" title="Right plane of the frustum.">scene::SViewFrustum::VF_RIGHT_PLANE</a>], p); +<a name="l00184"></a>00184 +<a name="l00185"></a>00185 <span class="keywordflow">return</span> p; +<a name="l00186"></a>00186 } +<a name="l00187"></a>00187 +<a name="l00188"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#add04c29bfa22d94be96c92ecff5420b9">00188</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#add04c29bfa22d94be96c92ecff5420b9" title="returns the point which is on the far right bottom corner inside the the view frustum.">SViewFrustum::getFarRightDown</a>()<span class="keyword"> const</span> +<a name="l00189"></a>00189 <span class="keyword"> </span>{ +<a name="l00190"></a>00190 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> p; +<a name="l00191"></a>00191 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a33c11636c0cf3a29df16551fb3222f89" title="Far plane of the frustum. That is the plane farest away from the eye.">scene::SViewFrustum::VF_FAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a42591d9bdd8dd03bb6b14836b6e5af7b" title="Get the intersection point with two other planes if there is one.">getIntersectionWithPlanes</a>( +<a name="l00192"></a>00192 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0aa230be71193da774ddcb735ec7b10dd1" title="Bottom plane of the frustum.">scene::SViewFrustum::VF_BOTTOM_PLANE</a>], +<a name="l00193"></a>00193 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0acc02c8b170e35f1416f1511646b051aa" title="Right plane of the frustum.">scene::SViewFrustum::VF_RIGHT_PLANE</a>], p); +<a name="l00194"></a>00194 +<a name="l00195"></a>00195 <span class="keywordflow">return</span> p; +<a name="l00196"></a>00196 } +<a name="l00197"></a>00197 +<a name="l00198"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#af240a13958215ce0cbe6ccd75301828a">00198</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#af240a13958215ce0cbe6ccd75301828a" title="returns the point which is on the near left upper corner inside the the view frustum.">SViewFrustum::getNearLeftUp</a>()<span class="keyword"> const</span> +<a name="l00199"></a>00199 <span class="keyword"> </span>{ +<a name="l00200"></a>00200 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> p; +<a name="l00201"></a>00201 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0ad4e37002c2f3f5c9aa7219ca74ffb48e" title="Near plane of the frustum. That is the plane nearest to the eye.">scene::SViewFrustum::VF_NEAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a42591d9bdd8dd03bb6b14836b6e5af7b" title="Get the intersection point with two other planes if there is one.">getIntersectionWithPlanes</a>( +<a name="l00202"></a>00202 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0adc6f550cf3890b19837cd8f0d7b1020a" title="Top plane of the frustum.">scene::SViewFrustum::VF_TOP_PLANE</a>], +<a name="l00203"></a>00203 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a4d611f15cd215819287e533b45715d5c" title="Left plane of the frustum.">scene::SViewFrustum::VF_LEFT_PLANE</a>], p); +<a name="l00204"></a>00204 +<a name="l00205"></a>00205 <span class="keywordflow">return</span> p; +<a name="l00206"></a>00206 } +<a name="l00207"></a>00207 +<a name="l00208"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#addbe9237ea17c93ae60bc4c27e862a76">00208</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#addbe9237ea17c93ae60bc4c27e862a76" title="returns the point which is on the near left bottom corner inside the the view frustum.">SViewFrustum::getNearLeftDown</a>()<span class="keyword"> const</span> +<a name="l00209"></a>00209 <span class="keyword"> </span>{ +<a name="l00210"></a>00210 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> p; +<a name="l00211"></a>00211 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0ad4e37002c2f3f5c9aa7219ca74ffb48e" title="Near plane of the frustum. That is the plane nearest to the eye.">scene::SViewFrustum::VF_NEAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a42591d9bdd8dd03bb6b14836b6e5af7b" title="Get the intersection point with two other planes if there is one.">getIntersectionWithPlanes</a>( +<a name="l00212"></a>00212 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0aa230be71193da774ddcb735ec7b10dd1" title="Bottom plane of the frustum.">scene::SViewFrustum::VF_BOTTOM_PLANE</a>], +<a name="l00213"></a>00213 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a4d611f15cd215819287e533b45715d5c" title="Left plane of the frustum.">scene::SViewFrustum::VF_LEFT_PLANE</a>], p); +<a name="l00214"></a>00214 +<a name="l00215"></a>00215 <span class="keywordflow">return</span> p; +<a name="l00216"></a>00216 } +<a name="l00217"></a>00217 +<a name="l00218"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a4fe9e7b51a3f7f7235ef0f895bf32054">00218</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a4fe9e7b51a3f7f7235ef0f895bf32054" title="returns the point which is on the near right top corner inside the the view frustum.">SViewFrustum::getNearRightUp</a>()<span class="keyword"> const</span> +<a name="l00219"></a>00219 <span class="keyword"> </span>{ +<a name="l00220"></a>00220 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> p; +<a name="l00221"></a>00221 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0ad4e37002c2f3f5c9aa7219ca74ffb48e" title="Near plane of the frustum. That is the plane nearest to the eye.">scene::SViewFrustum::VF_NEAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a42591d9bdd8dd03bb6b14836b6e5af7b" title="Get the intersection point with two other planes if there is one.">getIntersectionWithPlanes</a>( +<a name="l00222"></a>00222 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0adc6f550cf3890b19837cd8f0d7b1020a" title="Top plane of the frustum.">scene::SViewFrustum::VF_TOP_PLANE</a>], +<a name="l00223"></a>00223 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0acc02c8b170e35f1416f1511646b051aa" title="Right plane of the frustum.">scene::SViewFrustum::VF_RIGHT_PLANE</a>], p); +<a name="l00224"></a>00224 +<a name="l00225"></a>00225 <span class="keywordflow">return</span> p; +<a name="l00226"></a>00226 } +<a name="l00227"></a>00227 +<a name="l00228"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a74e011d85fb41206b5dd0af76635dc00">00228</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a74e011d85fb41206b5dd0af76635dc00" title="returns the point which is on the near right bottom corner inside the the view frustum.">SViewFrustum::getNearRightDown</a>()<span class="keyword"> const</span> +<a name="l00229"></a>00229 <span class="keyword"> </span>{ +<a name="l00230"></a>00230 <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a> p; +<a name="l00231"></a>00231 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0ad4e37002c2f3f5c9aa7219ca74ffb48e" title="Near plane of the frustum. That is the plane nearest to the eye.">scene::SViewFrustum::VF_NEAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a42591d9bdd8dd03bb6b14836b6e5af7b" title="Get the intersection point with two other planes if there is one.">getIntersectionWithPlanes</a>( +<a name="l00232"></a>00232 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0aa230be71193da774ddcb735ec7b10dd1" title="Bottom plane of the frustum.">scene::SViewFrustum::VF_BOTTOM_PLANE</a>], +<a name="l00233"></a>00233 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0acc02c8b170e35f1416f1511646b051aa" title="Right plane of the frustum.">scene::SViewFrustum::VF_RIGHT_PLANE</a>], p); +<a name="l00234"></a>00234 +<a name="l00235"></a>00235 <span class="keywordflow">return</span> p; +<a name="l00236"></a>00236 } +<a name="l00237"></a>00237 +<a name="l00238"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a4328fe06bedd409ae20e9efc64e68706">00238</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1aabbox3d.html">core::aabbox3d<f32></a> &<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a4328fe06bedd409ae20e9efc64e68706" title="returns a bounding box enclosing the whole view frustum">SViewFrustum::getBoundingBox</a>()<span class="keyword"> const</span> +<a name="l00239"></a>00239 <span class="keyword"> </span>{ +<a name="l00240"></a>00240 <span class="keywordflow">return</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ad4c8605ad3494093e3e5860e0332fe8a" title="bounding box around the view frustum">boundingBox</a>; +<a name="l00241"></a>00241 } +<a name="l00242"></a>00242 +<a name="l00243"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a458eb19a23bcad50da0f9d3163e3621b">00243</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a458eb19a23bcad50da0f9d3163e3621b" title="recalculates the bounding box member based on the planes">SViewFrustum::recalculateBoundingBox</a>() +<a name="l00244"></a>00244 { +<a name="l00245"></a>00245 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ad4c8605ad3494093e3e5860e0332fe8a" title="bounding box around the view frustum">boundingBox</a>.<a class="code" href="classirr_1_1core_1_1aabbox3d.html#afc718e96ed11aa71a30311d32bfc885a" title="Resets the bounding box to a one-point box.">reset</a> ( <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a77726fa084f416d69f058a7b2f887545" title="the position of the camera">cameraPosition</a> ); +<a name="l00246"></a>00246 +<a name="l00247"></a>00247 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ad4c8605ad3494093e3e5860e0332fe8a" title="bounding box around the view frustum">boundingBox</a>.<a class="code" href="classirr_1_1core_1_1aabbox3d.html#a49e3765fd2f40a115f8f28bd74d62ccf" title="Adds a point to the bounding box.">addInternalPoint</a>(<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a99712510130276f440e2c399dde7e5f3" title="returns the point which is on the far left upper corner inside the the view frustum.">getFarLeftUp</a>()); +<a name="l00248"></a>00248 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ad4c8605ad3494093e3e5860e0332fe8a" title="bounding box around the view frustum">boundingBox</a>.<a class="code" href="classirr_1_1core_1_1aabbox3d.html#a49e3765fd2f40a115f8f28bd74d62ccf" title="Adds a point to the bounding box.">addInternalPoint</a>(<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a1b7f3b1cd4da4ea886b77d674e1c17dd" title="returns the point which is on the far right top corner inside the the view frustum.">getFarRightUp</a>()); +<a name="l00249"></a>00249 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ad4c8605ad3494093e3e5860e0332fe8a" title="bounding box around the view frustum">boundingBox</a>.<a class="code" href="classirr_1_1core_1_1aabbox3d.html#a49e3765fd2f40a115f8f28bd74d62ccf" title="Adds a point to the bounding box.">addInternalPoint</a>(<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a9a79eb4430af41031850adc7a0e0e3cf" title="returns the point which is on the far left bottom corner inside the the view frustum.">getFarLeftDown</a>()); +<a name="l00250"></a>00250 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ad4c8605ad3494093e3e5860e0332fe8a" title="bounding box around the view frustum">boundingBox</a>.<a class="code" href="classirr_1_1core_1_1aabbox3d.html#a49e3765fd2f40a115f8f28bd74d62ccf" title="Adds a point to the bounding box.">addInternalPoint</a>(<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#add04c29bfa22d94be96c92ecff5420b9" title="returns the point which is on the far right bottom corner inside the the view frustum.">getFarRightDown</a>()); +<a name="l00251"></a>00251 } +<a name="l00252"></a>00252 +<a name="l00255"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a2517bde9292aa26119d75b9ff0b92833">00255</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a2517bde9292aa26119d75b9ff0b92833" title="This constructor creates a view frustum based on a projection and/or view matrix.">SViewFrustum::setFrom</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& mat) +<a name="l00256"></a>00256 { +<a name="l00257"></a>00257 <span class="comment">// left clipping plane</span> +<a name="l00258"></a>00258 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a4d611f15cd215819287e533b45715d5c" title="Left plane of the frustum.">VF_LEFT_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.X = mat[3 ] + mat[0]; +<a name="l00259"></a>00259 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a4d611f15cd215819287e533b45715d5c" title="Left plane of the frustum.">VF_LEFT_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Y = mat[7 ] + mat[4]; +<a name="l00260"></a>00260 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a4d611f15cd215819287e533b45715d5c" title="Left plane of the frustum.">VF_LEFT_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Z = mat[11] + mat[8]; +<a name="l00261"></a>00261 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a4d611f15cd215819287e533b45715d5c" title="Left plane of the frustum.">VF_LEFT_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#afa304cf77cf1a3aae2351d5add5606a8" title="Distance from origin.">D</a> = mat[15] + mat[12]; +<a name="l00262"></a>00262 +<a name="l00263"></a>00263 <span class="comment">// right clipping plane</span> +<a name="l00264"></a>00264 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0acc02c8b170e35f1416f1511646b051aa" title="Right plane of the frustum.">VF_RIGHT_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.X = mat[3 ] - mat[0]; +<a name="l00265"></a>00265 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0acc02c8b170e35f1416f1511646b051aa" title="Right plane of the frustum.">VF_RIGHT_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Y = mat[7 ] - mat[4]; +<a name="l00266"></a>00266 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0acc02c8b170e35f1416f1511646b051aa" title="Right plane of the frustum.">VF_RIGHT_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Z = mat[11] - mat[8]; +<a name="l00267"></a>00267 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0acc02c8b170e35f1416f1511646b051aa" title="Right plane of the frustum.">VF_RIGHT_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#afa304cf77cf1a3aae2351d5add5606a8" title="Distance from origin.">D</a> = mat[15] - mat[12]; +<a name="l00268"></a>00268 +<a name="l00269"></a>00269 <span class="comment">// top clipping plane</span> +<a name="l00270"></a>00270 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0adc6f550cf3890b19837cd8f0d7b1020a" title="Top plane of the frustum.">VF_TOP_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.X = mat[3 ] - mat[1]; +<a name="l00271"></a>00271 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0adc6f550cf3890b19837cd8f0d7b1020a" title="Top plane of the frustum.">VF_TOP_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Y = mat[7 ] - mat[5]; +<a name="l00272"></a>00272 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0adc6f550cf3890b19837cd8f0d7b1020a" title="Top plane of the frustum.">VF_TOP_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Z = mat[11] - mat[9]; +<a name="l00273"></a>00273 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0adc6f550cf3890b19837cd8f0d7b1020a" title="Top plane of the frustum.">VF_TOP_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#afa304cf77cf1a3aae2351d5add5606a8" title="Distance from origin.">D</a> = mat[15] - mat[13]; +<a name="l00274"></a>00274 +<a name="l00275"></a>00275 <span class="comment">// bottom clipping plane</span> +<a name="l00276"></a>00276 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0aa230be71193da774ddcb735ec7b10dd1" title="Bottom plane of the frustum.">VF_BOTTOM_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.X = mat[3 ] + mat[1]; +<a name="l00277"></a>00277 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0aa230be71193da774ddcb735ec7b10dd1" title="Bottom plane of the frustum.">VF_BOTTOM_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Y = mat[7 ] + mat[5]; +<a name="l00278"></a>00278 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0aa230be71193da774ddcb735ec7b10dd1" title="Bottom plane of the frustum.">VF_BOTTOM_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Z = mat[11] + mat[9]; +<a name="l00279"></a>00279 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0aa230be71193da774ddcb735ec7b10dd1" title="Bottom plane of the frustum.">VF_BOTTOM_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#afa304cf77cf1a3aae2351d5add5606a8" title="Distance from origin.">D</a> = mat[15] + mat[13]; +<a name="l00280"></a>00280 +<a name="l00281"></a>00281 <span class="comment">// far clipping plane</span> +<a name="l00282"></a>00282 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a33c11636c0cf3a29df16551fb3222f89" title="Far plane of the frustum. That is the plane farest away from the eye.">VF_FAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.X = mat[3 ] - mat[2]; +<a name="l00283"></a>00283 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a33c11636c0cf3a29df16551fb3222f89" title="Far plane of the frustum. That is the plane farest away from the eye.">VF_FAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Y = mat[7 ] - mat[6]; +<a name="l00284"></a>00284 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a33c11636c0cf3a29df16551fb3222f89" title="Far plane of the frustum. That is the plane farest away from the eye.">VF_FAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Z = mat[11] - mat[10]; +<a name="l00285"></a>00285 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a33c11636c0cf3a29df16551fb3222f89" title="Far plane of the frustum. That is the plane farest away from the eye.">VF_FAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#afa304cf77cf1a3aae2351d5add5606a8" title="Distance from origin.">D</a> = mat[15] - mat[14]; +<a name="l00286"></a>00286 +<a name="l00287"></a>00287 <span class="comment">// near clipping plane</span> +<a name="l00288"></a>00288 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0ad4e37002c2f3f5c9aa7219ca74ffb48e" title="Near plane of the frustum. That is the plane nearest to the eye.">VF_NEAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.X = mat[2]; +<a name="l00289"></a>00289 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0ad4e37002c2f3f5c9aa7219ca74ffb48e" title="Near plane of the frustum. That is the plane nearest to the eye.">VF_NEAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Y = mat[6]; +<a name="l00290"></a>00290 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0ad4e37002c2f3f5c9aa7219ca74ffb48e" title="Near plane of the frustum. That is the plane nearest to the eye.">VF_NEAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a>.Z = mat[10]; +<a name="l00291"></a>00291 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0ad4e37002c2f3f5c9aa7219ca74ffb48e" title="Near plane of the frustum. That is the plane nearest to the eye.">VF_NEAR_PLANE</a>].<a class="code" href="classirr_1_1core_1_1plane3d.html#afa304cf77cf1a3aae2351d5add5606a8" title="Distance from origin.">D</a> = mat[14]; +<a name="l00292"></a>00292 +<a name="l00293"></a>00293 <span class="comment">// normalize normals</span> +<a name="l00294"></a>00294 <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> i; +<a name="l00295"></a>00295 <span class="keywordflow">for</span> ( i=0; i != <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a6c3c4cb8060a23a2365cf1df46fcefd7" title="Amount of planes enclosing the view frustum. Should be 6.">VF_PLANE_COUNT</a>; ++i) +<a name="l00296"></a>00296 { +<a name="l00297"></a>00297 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> len = -<a class="code" href="namespaceirr_1_1core.html#adaef309f12c2a3386e94610e24f2bfa7">core::reciprocal_squareroot</a>( +<a name="l00298"></a>00298 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[i].Normal.getLengthSQ()); +<a name="l00299"></a>00299 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[i].<a class="code" href="classirr_1_1core_1_1plane3d.html#a932ca6e90e55cdceedb4f15ab706b719" title="Normal vector of the plane.">Normal</a> *= len; +<a name="l00300"></a>00300 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[i].<a class="code" href="classirr_1_1core_1_1plane3d.html#afa304cf77cf1a3aae2351d5add5606a8" title="Distance from origin.">D</a> *= len; +<a name="l00301"></a>00301 } +<a name="l00302"></a>00302 +<a name="l00303"></a>00303 <span class="comment">// make bounding box</span> +<a name="l00304"></a>00304 <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a458eb19a23bcad50da0f9d3163e3621b" title="recalculates the bounding box member based on the planes">recalculateBoundingBox</a>(); +<a name="l00305"></a>00305 } +<a name="l00306"></a>00306 +<a name="l00310"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#acf8edd203e7479d2b444ed548075ffa6">00310</a> <span class="keyword">inline</span> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#acf8edd203e7479d2b444ed548075ffa6" title="get the given state's matrix based on frustum E_TRANSFORMATION_STATE">SViewFrustum::getTransform</a>(<a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43d" title="enumeration for geometry transformation states">video::E_TRANSFORMATION_STATE</a> state ) +<a name="l00311"></a>00311 { +<a name="l00312"></a>00312 <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> index = 0; +<a name="l00313"></a>00313 <span class="keywordflow">switch</span> ( state ) +<a name="l00314"></a>00314 { +<a name="l00315"></a>00315 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43dae7ec186418508c67a7562af012d7b63f" title="Projection transformation.">video::ETS_PROJECTION</a>: +<a name="l00316"></a>00316 index = SViewFrustum::ETS_PROJECTION; <span class="keywordflow">break</span>; +<a name="l00317"></a>00317 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43da152f4262d5874186e0288934c7d31e14" title="View transformation.">video::ETS_VIEW</a>: +<a name="l00318"></a>00318 index = SViewFrustum::ETS_VIEW; <span class="keywordflow">break</span>; +<a name="l00319"></a>00319 <span class="keywordflow">default</span>: +<a name="l00320"></a>00320 <span class="keywordflow">break</span>; +<a name="l00321"></a>00321 } +<a name="l00322"></a>00322 <span class="keywordflow">return</span> Matrices [ index ]; +<a name="l00323"></a>00323 } +<a name="l00324"></a>00324 +<a name="l00328"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#a8e253fc5e6ea47531033792b22f28945">00328</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#acf8edd203e7479d2b444ed548075ffa6" title="get the given state's matrix based on frustum E_TRANSFORMATION_STATE">SViewFrustum::getTransform</a>(<a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43d" title="enumeration for geometry transformation states">video::E_TRANSFORMATION_STATE</a> state )<span class="keyword"> const</span> +<a name="l00329"></a>00329 <span class="keyword"> </span>{ +<a name="l00330"></a>00330 <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> index = 0; +<a name="l00331"></a>00331 <span class="keywordflow">switch</span> ( state ) +<a name="l00332"></a>00332 { +<a name="l00333"></a>00333 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43dae7ec186418508c67a7562af012d7b63f" title="Projection transformation.">video::ETS_PROJECTION</a>: +<a name="l00334"></a>00334 index = SViewFrustum::ETS_PROJECTION; <span class="keywordflow">break</span>; +<a name="l00335"></a>00335 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43da152f4262d5874186e0288934c7d31e14" title="View transformation.">video::ETS_VIEW</a>: +<a name="l00336"></a>00336 index = SViewFrustum::ETS_VIEW; <span class="keywordflow">break</span>; +<a name="l00337"></a>00337 <span class="keywordflow">default</span>: +<a name="l00338"></a>00338 <span class="keywordflow">break</span>; +<a name="l00339"></a>00339 } +<a name="l00340"></a>00340 <span class="keywordflow">return</span> Matrices [ index ]; +<a name="l00341"></a>00341 } +<a name="l00342"></a>00342 +<a name="l00344"></a><a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ace0b4c93dcd1d4e6ae50615b457f1851">00344</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ace0b4c93dcd1d4e6ae50615b457f1851" title="clips a line to the view frustum.">SViewFrustum::clipLine</a>(<a class="code" href="classirr_1_1core_1_1line3d.html" title="3D line between two points with intersection methods.">core::line3d<f32></a>& line)<span class="keyword"> const</span> +<a name="l00345"></a>00345 <span class="keyword"> </span>{ +<a name="l00346"></a>00346 <span class="keywordtype">bool</span> wasClipped = <span class="keyword">false</span>; +<a name="l00347"></a>00347 <span class="keywordflow">for</span> (<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> i=0; i < <a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#ae3a96797aec028717f0589e82926b9f0a6c3c4cb8060a23a2365cf1df46fcefd7" title="Amount of planes enclosing the view frustum. Should be 6.">VF_PLANE_COUNT</a>; ++i) +<a name="l00348"></a>00348 { +<a name="l00349"></a>00349 <span class="keywordflow">if</span> (<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[i].classifyPointRelation(line.<a class="code" href="classirr_1_1core_1_1line3d.html#a8874f77324b6ef6632e66b22051a3251" title="Start point of line.">start</a>) == <a class="code" href="namespaceirr_1_1core.html#a8a9999eb0d151083f48afe5f7d17a96ca30484977b2480b6d6621114512d0b703">core::ISREL3D_FRONT</a>) +<a name="l00350"></a>00350 { +<a name="l00351"></a>00351 line.<a class="code" href="classirr_1_1core_1_1line3d.html#a8874f77324b6ef6632e66b22051a3251" title="Start point of line.">start</a> = line.<a class="code" href="classirr_1_1core_1_1line3d.html#a8874f77324b6ef6632e66b22051a3251" title="Start point of line.">start</a>.getInterpolated(line.<a class="code" href="classirr_1_1core_1_1line3d.html#aea19cb33971bb20e1d736facdae8a8f0" title="End point of line.">end</a>, +<a name="l00352"></a>00352 1.f-<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[i].<a class="code" href="classirr_1_1core_1_1plane3d.html#a572803fab72c142ad186b364da3193cb" title="Get percentage of line between two points where an intersection with this plane happens.">getKnownIntersectionWithLine</a>(line.<a class="code" href="classirr_1_1core_1_1line3d.html#a8874f77324b6ef6632e66b22051a3251" title="Start point of line.">start</a>, line.<a class="code" href="classirr_1_1core_1_1line3d.html#aea19cb33971bb20e1d736facdae8a8f0" title="End point of line.">end</a>)); +<a name="l00353"></a>00353 wasClipped = <span class="keyword">true</span>; +<a name="l00354"></a>00354 } +<a name="l00355"></a>00355 <span class="keywordflow">if</span> (<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[i].classifyPointRelation(line.<a class="code" href="classirr_1_1core_1_1line3d.html#aea19cb33971bb20e1d736facdae8a8f0" title="End point of line.">end</a>) == <a class="code" href="namespaceirr_1_1core.html#a8a9999eb0d151083f48afe5f7d17a96ca30484977b2480b6d6621114512d0b703">core::ISREL3D_FRONT</a>) +<a name="l00356"></a>00356 { +<a name="l00357"></a>00357 line.<a class="code" href="classirr_1_1core_1_1line3d.html#aea19cb33971bb20e1d736facdae8a8f0" title="End point of line.">end</a> = line.<a class="code" href="classirr_1_1core_1_1line3d.html#a8874f77324b6ef6632e66b22051a3251" title="Start point of line.">start</a>.getInterpolated(line.<a class="code" href="classirr_1_1core_1_1line3d.html#aea19cb33971bb20e1d736facdae8a8f0" title="End point of line.">end</a>, +<a name="l00358"></a>00358 1.f-<a class="code" href="structirr_1_1scene_1_1_s_view_frustum.html#afa59258f22c23b6f1dc4bcaff142dba2" title="all planes enclosing the view frustum.">planes</a>[i].<a class="code" href="classirr_1_1core_1_1plane3d.html#a572803fab72c142ad186b364da3193cb" title="Get percentage of line between two points where an intersection with this plane happens.">getKnownIntersectionWithLine</a>(line.<a class="code" href="classirr_1_1core_1_1line3d.html#a8874f77324b6ef6632e66b22051a3251" title="Start point of line.">start</a>, line.<a class="code" href="classirr_1_1core_1_1line3d.html#aea19cb33971bb20e1d736facdae8a8f0" title="End point of line.">end</a>)); +<a name="l00359"></a>00359 wasClipped = <span class="keyword">true</span>; +<a name="l00360"></a>00360 } +<a name="l00361"></a>00361 } +<a name="l00362"></a>00362 <span class="keywordflow">return</span> wasClipped; +<a name="l00363"></a>00363 } +<a name="l00364"></a>00364 +<a name="l00365"></a>00365 +<a name="l00366"></a>00366 } <span class="comment">// end namespace scene</span> +<a name="l00367"></a>00367 } <span class="comment">// end namespace irr</span> +<a name="l00368"></a>00368 +<a name="l00369"></a>00369 <span class="preprocessor">#endif</span> +<a name="l00370"></a>00370 <span class="preprocessor"></span> +</pre></div></div> +</div> + <div id="nav-path" class="navpath"> + <ul> + <li class="navelem"><a class="el" href="_s_view_frustum_8h.html">SViewFrustum.h</a> </li> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Defines</a></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> + + + <li class="footer"> +<a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht +Engine</a> Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on Fri Mar 12 2021 17:21:48 for Irrlicht 3D Engine by +<a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li> + </ul> + </div> + + +</body> +</html> |
