classvtheightfieldgrid3d.html

来自「VC下实现图像处理。 VC下实现图像处理。 VC下实现图像处理。」· HTML 代码 · 共 718 行 · 第 1/3 页

HTML
718
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>vtdata library: vtHeightFieldGrid3d Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.5 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>    <li><a href="files.html"><span>Files</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>  </ul></div><h1>vtHeightFieldGrid3d Class Reference</h1><!-- doxytag: class="vtHeightFieldGrid3d" --><!-- doxytag: inherits="vtHeightField3d" -->Inheritance diagram for vtHeightFieldGrid3d:<p><center><img src="classvtHeightFieldGrid3d__inherit__graph.png" border="0" usemap="#vtHeightFieldGrid3d__inherit__map" alt="Inheritance graph"></center><map name="vtHeightFieldGrid3d__inherit__map"><area href="classvtElevationGrid.html" shape="rect" coords="20,231,135,257" alt=""><area href="classvtHeightField3d.html" shape="rect" coords="20,81,135,108" alt=""><area href="classvtHeightField.html" shape="rect" coords="27,7,128,33" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classvtHeightFieldGrid3d-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e1a3e1da6b6bca62b667f40e7a3819c3"></a><!-- doxytag: member="vtHeightFieldGrid3d::Initialize" ref="e1a3e1da6b6bca62b667f40e7a3819c3" args="(const LinearUnits units, const DRECT &amp;earthextents, float fMinHeight, float fMaxHeight, int cols, int rows)" -->void&nbsp;</td><td class="memItemRight" valign="bottom"><b>Initialize</b> (const LinearUnits units, const <a class="el" href="classDRECT.html">DRECT</a> &amp;earthextents, float fMinHeight, float fMaxHeight, int cols, int rows)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#b1210c68b3bbb1d0913b7c0d0b5ae53b">SetEarthExtents</a> (const <a class="el" href="classDRECT.html">DRECT</a> &amp;ext)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#8fbe2d06e4fa9290d5c5ba6c3f73efac">CastRayToSurface</a> (const <a class="el" href="classFPoint3.html">FPoint3</a> &amp;point, const <a class="el" href="classFPoint3.html">FPoint3</a> &amp;dir, <a class="el" href="classFPoint3.html">FPoint3</a> &amp;result) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#1436865614be0e297724be883b7917ea">LineOfSight</a> (const <a class="el" href="classFPoint3.html">FPoint3</a> &amp;point1, const <a class="el" href="classFPoint3.html">FPoint3</a> &amp;point2) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classDPoint2.html">DPoint2</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#cc5a4767609458664b8e3c36dfd2ec17">GetSpacing</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7c1df4c73d856b37ae509e05e42d1737"></a><!-- doxytag: member="vtHeightFieldGrid3d::GetWorldSpacing" ref="7c1df4c73d856b37ae509e05e42d1737" args="() const " --><a class="el" href="classFPoint2.html">FPoint2</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>GetWorldSpacing</b> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#183b2e333988de7f0a8a61ff0945b04e">GetDimensions</a> (int &amp;nColumns, int &amp;nRows) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#b0607a50d8c67d9349a4dd592b71c0ad">EarthToGrid</a> (const <a class="el" href="classDPoint2.html">DPoint2</a> &amp;epos, <a class="el" href="classIPoint2.html">IPoint2</a> &amp;ipos)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#b89acf7b2d0a56ee83b875e1e11a0a26">WorldToGrid</a> (const <a class="el" href="classFPoint3.html">FPoint3</a> &amp;pos, <a class="el" href="classIPoint2.html">IPoint2</a> &amp;ipos)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#fbe0930ab6efe32d54bf5331ba7b41c3">GetInterpolatedElevation</a> (double findex_x, double findex_y) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a353b8b49439d8e5ae417dd2030d8869"></a><!-- doxytag: member="vtHeightFieldGrid3d::GetElevation" ref="a353b8b49439d8e5ae417dd2030d8869" args="(int iX, int iZ, bool bTrue=false) const =0" -->virtual float&nbsp;</td><td class="memItemRight" valign="bottom"><b>GetElevation</b> (int iX, int iZ, bool bTrue=false) const =0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="247d6523b4f9e948600dc7ff9bf903ed"></a><!-- doxytag: member="vtHeightFieldGrid3d::GetWorldLocation" ref="247d6523b4f9e948600dc7ff9bf903ed" args="(int i, int j, FPoint3 &amp;loc, bool bTrue=false) const =0" -->virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><b>GetWorldLocation</b> (int i, int j, <a class="el" href="classFPoint3.html">FPoint3</a> &amp;loc, bool bTrue=false) const =0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#f4fb9fd98c35325e15627c25b4445ed5">ColorDibFromElevation</a> (<a class="el" href="classvtBitmapBase.html">vtBitmapBase</a> *pBM, const <a class="el" href="classColorMap.html">ColorMap</a> *cmap, int iGranularity, bool progress_callback(int)=NULL)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#aaac8a38bd77570f22cea1f075d6a5f4">ColorDibFromTable</a> (<a class="el" href="classvtBitmapBase.html">vtBitmapBase</a> *pBM, std::vector&lt; <a class="el" href="classRGBi.html">RGBi</a> &gt; &amp;table, float fMin, float fMax, bool progress_callback(int)=NULL)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#a0fa5b70f5af5207d81e05e2a0bb0074">ShadeDibFromElevation</a> (<a class="el" href="classvtBitmapBase.html">vtBitmapBase</a> *pBM, const <a class="el" href="classFPoint3.html">FPoint3</a> &amp;light_dir, float fLightFactor, float fAmbient=0.1f, float fGamma=1.0f, bool bTrue=false, bool progress_callback(int)=NULL)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#bcc2195a2d9eb9460d91b76103114f81">ShadeQuick</a> (<a class="el" href="classvtBitmapBase.html">vtBitmapBase</a> *pBM, float light_factor, bool bTrue=false, bool progress_callback(int)=NULL)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtHeightFieldGrid3d.html#65bf483acc5398527204df28909d802d">ShadowCastDib</a> (<a class="el" href="classvtBitmapBase.html">vtBitmapBase</a> *pBM, const <a class="el" href="classFPoint3.html">FPoint3</a> &amp;ight_dir, float fLightFactor, float fAmbient, bool progress_callback(int)=NULL)</td></tr><tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bb06c84ea4fb5ea63f59a1fd696dc640"></a><!-- doxytag: member="vtHeightFieldGrid3d::m_iColumns" ref="bb06c84ea4fb5ea63f59a1fd696dc640" args="" -->int&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_iColumns</b></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8e905d8cbf8866e05f107d36f33755f0"></a><!-- doxytag: member="vtHeightFieldGrid3d::m_iRows" ref="8e905d8cbf8866e05f107d36f33755f0" args="" -->int&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_iRows</b></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0a1e25ca1450a6f4eb0ed5510fd51bd1"></a><!-- doxytag: member="vtHeightFieldGrid3d::m_fXStep" ref="0a1e25ca1450a6f4eb0ed5510fd51bd1" args="" -->float&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_fXStep</b></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a41e4679a8e8eb9fee5ef212e219b096"></a><!-- doxytag: member="vtHeightFieldGrid3d::m_fZStep" ref="a41e4679a8e8eb9fee5ef212e219b096" args="" -->float&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_fZStep</b></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f0df313d4ab8f95667fbb5e246ee446"></a><!-- doxytag: member="vtHeightFieldGrid3d::m_dXStep" ref="4f0df313d4ab8f95667fbb5e246ee446" args="" -->double&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_dXStep</b></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="33324b677e5baa9a3c565a9de1c88aae"></a><!-- doxytag: member="vtHeightFieldGrid3d::m_dYStep" ref="33324b677e5baa9a3c565a9de1c88aae" args="" -->double&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_dYStep</b></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class extends <a class="el" href="classvtHeightField3d.html">vtHeightField3d</a> with the knowledge of operating on a regular grid of elevation values. <p><hr><h2>Member Function Documentation</h2><a class="anchor" name="8fbe2d06e4fa9290d5c5ba6c3f73efac"></a><!-- doxytag: member="vtHeightFieldGrid3d::CastRayToSurface" ref="8fbe2d06e4fa9290d5c5ba6c3f73efac" args="(const FPoint3 &amp;point, const FPoint3 &amp;dir, FPoint3 &amp;result) const " --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">bool vtHeightFieldGrid3d::CastRayToSurface           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classFPoint3.html">FPoint3</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>point</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="classFPoint3.html">FPoint3</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>dir</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="classFPoint3.html">FPoint3</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>result</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Tests a ray against a heightfield grid.<p>Note: This algorithm is not guaranteed to give absolutely correct results, but it is reasonably fast and efficient. It checks a series of points along the ray against the terrain. When a pair of points (segment) is found to straddle the terrain, it refines the segment in a binary fashion.<p>Since the length of the test is proportional to a single grid element, there is a small chance that it will give results that are off by a small distance (less than 1 grid element)<p><dl compact><dt><b>Returns:</b></dt><dd>true if hit terrain. The resulting point of intersection is placed in the 'result' argument. </dd></dl><p>Implements <a class="el" href="classvtHeightField3d.html#bc1fb1a17ef225baa568f479d7506409">vtHeightField3d</a>.    </td>  </tr></table><a class="anchor" name="f4fb9fd98c35325e15627c25b4445ed5"></a><!-- doxytag: member="vtHeightFieldGrid3d::ColorDibFromElevation" ref="f4fb9fd98c35325e15627c25b4445ed5" args="(vtBitmapBase *pBM, const ColorMap *cmap, int iGranularity, bool progress_callback(int)=NULL)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">bool vtHeightFieldGrid3d::ColorDibFromElevation           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classvtBitmapBase.html">vtBitmapBase</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>pBM</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="classColorMap.html">ColorMap</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>cmap</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>iGranularity</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>bool &nbsp;</td>          <td class="mdname" nowrap> <em>progress_callback</em>(int) = <code>NULL</code></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Use the height data in the grid to fill a bitmap with colors.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pBM</em>&nbsp;</td><td>The bitmap to be colored. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>cmap</em>&nbsp;</td><td>The mapping of elevation values to colors. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>iGranularity</em>&nbsp;</td><td>The smoothness of the mapping, expressed as the size of the internal mapping table. 2000 is a generally good value. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>progress_callback</em>&nbsp;</td><td>If supplied, this function will be called back with a value of 0 to 100 as the operation progresses.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>true if any invalid elevation values were encountered. </dd></dl>    </td>  </tr></table><a class="anchor" name="aaac8a38bd77570f22cea1f075d6a5f4"></a><!-- doxytag: member="vtHeightFieldGrid3d::ColorDibFromTable" ref="aaac8a38bd77570f22cea1f075d6a5f4" args="(vtBitmapBase *pBM, std::vector&lt; RGBi &gt; &amp;table, float fMin, float fMax, bool progress_callback(int)=NULL)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">bool vtHeightFieldGrid3d::ColorDibFromTable           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classvtBitmapBase.html">vtBitmapBase</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>pBM</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>std::vector&lt; <a class="el" href="classRGBi.html">RGBi</a> &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>table</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>float&nbsp;</td>          <td class="mdname" nowrap> <em>fMin</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>float&nbsp;</td>          <td class="mdname" nowrap> <em>fMax</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>bool &nbsp;</td>          <td class="mdname" nowrap> <em>progress_callback</em>(int) = <code>NULL</code></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?