<!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>Mercator: Plant.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.4 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Mercator</div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <div class="title">Plant.h</div> </div> </div> <div class="contents"> <div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// This file may be redistributed and modified only under the terms of</span> <a name="l00002"></a>00002 <span class="comment">// the GNU General Public License (See COPYING for details).</span> <a name="l00003"></a>00003 <span class="comment">// Copyright (C) 2004 Alistair Riddoch</span> <a name="l00004"></a>00004 <a name="l00005"></a>00005 <span class="preprocessor">#ifndef MERCATOR_PLANT_H</span> <a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define MERCATOR_PLANT_H</span> <a name="l00007"></a>00007 <span class="preprocessor"></span> <a name="l00008"></a>00008 <span class="preprocessor">#include <wfmath/point.h></span> <a name="l00009"></a>00009 <span class="preprocessor">#include <wfmath/quaternion.h></span> <a name="l00010"></a>00010 <a name="l00011"></a>00011 <span class="keyword">namespace </span>Mercator { <a name="l00012"></a>00012 <a name="l00017"></a><a class="code" href="classMercator_1_1Plant.html">00017</a> <span class="keyword">class </span><a class="code" href="classMercator_1_1Plant.html" title="This is the simple class for representing instances of vegetation.">Plant</a> { <a name="l00018"></a>00018 <span class="keyword">private</span>: <a name="l00020"></a><a class="code" href="classMercator_1_1Plant.html#aea43d9105709dbacb0a0a95f9327c2ea">00020</a> WFMath::Point<2> <a class="code" href="classMercator_1_1Plant.html#aea43d9105709dbacb0a0a95f9327c2ea" title="Position of the vegetation relative to its grid point.">m_displacement</a>; <a name="l00022"></a><a class="code" href="classMercator_1_1Plant.html#acc5dd9568cf541eec28ee77526ff4812">00022</a> WFMath::Quaternion <a class="code" href="classMercator_1_1Plant.html#acc5dd9568cf541eec28ee77526ff4812" title="Orientation of the vegetation.">m_orientation</a>; <a name="l00024"></a><a class="code" href="classMercator_1_1Plant.html#a6e42df23f264d55b19daddecf27b04cd">00024</a> <span class="keywordtype">float</span> <a class="code" href="classMercator_1_1Plant.html#a6e42df23f264d55b19daddecf27b04cd" title="Height of the vegetation.">m_height</a>; <a name="l00025"></a>00025 <span class="keyword">public</span>: <a name="l00027"></a>00027 <a class="code" href="classMercator_1_1Plant.html#a4d3ea76ce8e80b1191d12fcc53088c55" title="Height is initialised explicitly to zero.">Plant</a>(); <a name="l00029"></a>00029 <a class="code" href="classMercator_1_1Plant.html#a5cb16ae530ce69d3d00214bb6ad63417" title="Nothing special in the destructor.">~Plant</a>(); <a name="l00030"></a>00030 <a name="l00032"></a><a class="code" href="classMercator_1_1Plant.html#a7f85ea3aa03b375a331d1dabc4a5e62a">00032</a> <span class="keyword">const</span> WFMath::Point<2> & <a class="code" href="classMercator_1_1Plant.html#a7f85ea3aa03b375a331d1dabc4a5e62a" title="Accessor for displacement from grid point.">getDisplacement</a>()<span class="keyword"> const </span>{ <a name="l00033"></a>00033 <span class="keywordflow">return</span> <a class="code" href="classMercator_1_1Plant.html#aea43d9105709dbacb0a0a95f9327c2ea" title="Position of the vegetation relative to its grid point.">m_displacement</a>; <a name="l00034"></a>00034 } <a name="l00035"></a>00035 <a name="l00037"></a><a class="code" href="classMercator_1_1Plant.html#a3fe2afdac56e8f193b1ac999d93332b4">00037</a> <span class="keywordtype">void</span> <a class="code" href="classMercator_1_1Plant.html#a3fe2afdac56e8f193b1ac999d93332b4" title="Set the displacement to a new value.">setDisplacement</a>(<span class="keyword">const</span> WFMath::Point<2> & d) { <a name="l00038"></a>00038 <a class="code" href="classMercator_1_1Plant.html#aea43d9105709dbacb0a0a95f9327c2ea" title="Position of the vegetation relative to its grid point.">m_displacement</a> = d; <a name="l00039"></a>00039 } <a name="l00040"></a>00040 <a name="l00042"></a><a class="code" href="classMercator_1_1Plant.html#ad3fb17ddd5adf3e1102d3a05abd891ee">00042</a> <span class="keyword">const</span> WFMath::Quaternion & <a class="code" href="classMercator_1_1Plant.html#ad3fb17ddd5adf3e1102d3a05abd891ee" title="Accessor for orientation.">getOrientation</a>()<span class="keyword"> const </span>{ <a name="l00043"></a>00043 <span class="keywordflow">return</span> <a class="code" href="classMercator_1_1Plant.html#acc5dd9568cf541eec28ee77526ff4812" title="Orientation of the vegetation.">m_orientation</a>; <a name="l00044"></a>00044 } <a name="l00045"></a>00045 <a name="l00047"></a><a class="code" href="classMercator_1_1Plant.html#a9658e6f8339acab9cf5abca6562011e3">00047</a> <span class="keywordtype">void</span> <a class="code" href="classMercator_1_1Plant.html#a9658e6f8339acab9cf5abca6562011e3" title="Set the orientation to a new value.">setOrientation</a>(<span class="keyword">const</span> WFMath::Quaternion & o) { <a name="l00048"></a>00048 <a class="code" href="classMercator_1_1Plant.html#acc5dd9568cf541eec28ee77526ff4812" title="Orientation of the vegetation.">m_orientation</a> = o; <a name="l00049"></a>00049 } <a name="l00050"></a>00050 <a name="l00052"></a><a class="code" href="classMercator_1_1Plant.html#af0d084f9a8c2bd262eeae2d073b9143b">00052</a> <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="classMercator_1_1Plant.html#af0d084f9a8c2bd262eeae2d073b9143b" title="Accessor for height.">getHeight</a>()<span class="keyword"> const </span>{ <a name="l00053"></a>00053 <span class="keywordflow">return</span> <a class="code" href="classMercator_1_1Plant.html#a6e42df23f264d55b19daddecf27b04cd" title="Height of the vegetation.">m_height</a>; <a name="l00054"></a>00054 } <a name="l00055"></a>00055 <a name="l00057"></a><a class="code" href="classMercator_1_1Plant.html#a33eefc99bc4ede447e9d20d5278d9c95">00057</a> <span class="keywordtype">void</span> <a class="code" href="classMercator_1_1Plant.html#a33eefc99bc4ede447e9d20d5278d9c95" title="Set the height to a new value.">setHeight</a>(<span class="keywordtype">float</span> h) { <a name="l00058"></a>00058 <a class="code" href="classMercator_1_1Plant.html#a6e42df23f264d55b19daddecf27b04cd" title="Height of the vegetation.">m_height</a> = h; <a name="l00059"></a>00059 } <a name="l00060"></a>00060 <a name="l00062"></a><a class="code" href="classMercator_1_1Plant.html#a42b6c909164abc47be58f85f10cb1fde">00062</a> <span class="keywordtype">void</span> <a class="code" href="classMercator_1_1Plant.html#a42b6c909164abc47be58f85f10cb1fde" title="Set a named parameter value for this plant.">setParameter</a>(<span class="keyword">const</span> std::string &, <span class="keywordtype">float</span>) { } <a name="l00063"></a>00063 }; <a name="l00064"></a>00064 <a name="l00065"></a>00065 } <a name="l00066"></a>00066 <a name="l00067"></a>00067 <span class="preprocessor">#endif // MERCATOR_PLANT_H</span> </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated for Mercator by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> </body> </html>