diff options
author | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
commit | 0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch) | |
tree | 2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/agent__3dvector_8h-source.html | |
download | nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip |
Initial commit
Diffstat (limited to 'docs/doxygen/nel/agent__3dvector_8h-source.html')
-rw-r--r-- | docs/doxygen/nel/agent__3dvector_8h-source.html | 327 |
1 files changed, 327 insertions, 0 deletions
diff --git a/docs/doxygen/nel/agent__3dvector_8h-source.html b/docs/doxygen/nel/agent__3dvector_8h-source.html new file mode 100644 index 00000000..5ebd341a --- /dev/null +++ b/docs/doxygen/nel/agent__3dvector_8h-source.html @@ -0,0 +1,327 @@ +<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<HTML> +<HEAD> + <TITLE>nevrax.org : docs</TITLE> + <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css"> + <link href="doxygen.css" rel="stylesheet" type="text/css"> +</HEAD> +<BODY MARGINHEIGHT="0" MARGINWIDTH="0"> + +<!-- uplinks --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A> </TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A> </TD> + </TR> +</TABLE> + +<!-- banner Nevrax --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%> + <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR> +</TABLE> + +<!-- main table --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + + <!------ Begin Box ------> + <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black> + <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF> + <TABLE cellspacing=0 cellpadding=1 border=0> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr> + </TABLE> + </TD></TR></TABLE></TD></TR></TABLE> + <!------ End Box ------> + + </TD> + <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + +<!-- title --> +<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td> +<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A> +</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT=""> +</td></tr></table> + + +<!-- block --> +<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD> + <TD><B>Documentation</B></TD> + <TD ALIGN=RIGHT> </td> +</tr></table> +<!-- Generated by Doxygen 1.2.14 --> +<center> +<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> </center> +<hr><h1>agent_3dvector.h</h1><a href="agent__3dvector_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 +00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font> +00008 <font class="comment"> *</font> +00009 <font class="comment"> * This file is part of NEVRAX D.T.C. SYSTEM.</font> +00010 <font class="comment"> * NEVRAX D.T.C. SYSTEM is free software; you can redistribute it and/or modify</font> +00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font> +00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font> +00013 <font class="comment"> * any later version.</font> +00014 <font class="comment"></font> +00015 <font class="comment"> * NEVRAX D.T.C. SYSTEM is distributed in the hope that it will be useful, but</font> +00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font> +00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font> +00018 <font class="comment"> * General Public License for more details.</font> +00019 <font class="comment"></font> +00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font> +00021 <font class="comment"> * along with NEVRAX D.T.C. SYSTEM; see the file COPYING. If not, write to the</font> +00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font> +00023 <font class="comment"> * MA 02111-1307, USA.</font> +00024 <font class="comment"> */</font> +00025 +00026 <font class="preprocessor">#ifndef NL_AGENT_3DVECTOR_H</font> +00027 <font class="preprocessor"></font><font class="preprocessor">#define NL_AGENT_3DVECTOR_H</font> +00028 <font class="preprocessor"></font> +00029 <font class="preprocessor">#include "<a class="code" href="types__nl_8h.html">nel/misc/types_nl.h</a>"</font> +00030 <font class="preprocessor">#include "<a class="code" href="boolval_8h.html">nel/ai/logic/boolval.h</a>"</font> +00031 <font class="preprocessor">#include "<a class="code" href="vectord_8h.html">nel/misc/vectord.h</a>"</font> +00032 +00033 +00034 <font class="comment">//using NLMISC::CVectorD;</font> +00035 +00036 +00037 <font class="keyword">namespace </font>NLAIAGENT +00038 { +<a name="l00047"></a><a class="code" href="classNLAIAGENT_1_1IVector.html">00047</a> <font class="keyword">class </font>IVector: <font class="keyword">public</font> IObjetOp +00048 { +00049 <font class="keyword">protected</font>: +<a name="l00050"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#n0">00050</a> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> <a class="code" href="classNLAIAGENT_1_1IVector.html#n0">_Value</a>; +00051 +00052 <font class="keyword">public</font>: +00053 +<a name="l00055"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a0">00055</a> <a class="code" href="classNLAIAGENT_1_1IVector.html#a3">IVector</a>(<font class="keywordtype">double</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a>, <font class="keywordtype">double</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a14">y</a>, <font class="keywordtype">double</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a15">z</a>):_Value(<a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a>, <a class="code" href="classNLAIAGENT_1_1IVector.html#a14">y</a>, <a class="code" href="classNLAIAGENT_1_1IVector.html#a15">z</a>) +00056 { +00057 } +00058 +<a name="l00059"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a1">00059</a> <a class="code" href="classNLAIAGENT_1_1IVector.html#a3">IVector</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> &<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>):_Value(<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>) +00060 { +00061 } +00062 +<a name="l00063"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a2">00063</a> <a class="code" href="classNLAIAGENT_1_1IVector.html#a3">IVector</a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a0">IVector</a> &<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>):<a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>), _Value((NLMISC::CVectorD)<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>._Value) +00064 { +00065 } +<a name="l00066"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a3">00066</a> <a class="code" href="classNLAIAGENT_1_1IVector.html#a3">IVector</a>() +00067 { +00068 } +<a name="l00069"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a4">00069</a> <a class="code" href="classNLAIAGENT_1_1IVector.html#a3">IVector</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &is) +00070 { +00071 <a class="code" href="classNLAIAGENT_1_1IVector.html#a7">load</a>(is); +00072 } +00073 +<a name="l00074"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a5">00074</a> <font class="keyword">virtual</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a5">~IVector</a>() +00075 { +00076 } +00077 +<a name="l00078"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a6">00078</a> <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a6">save</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &os) +00079 { +00080 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( _Value ); +00081 } +00082 +<a name="l00083"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a7">00083</a> <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a7">load</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &is) +00084 { +00085 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( _Value ); +00086 } +00087 +<a name="l00088"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a8">00088</a> <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a8">isEqual</a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IBasicObjectIA.html#a0">IBasicObjectIA</a> &a)<font class="keyword"> const</font> +00089 <font class="keyword"> </font>{ +00090 <font class="keywordflow">return</font> !(*(<a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *)<font class="keyword">this</font> == (<a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> &)a); +00091 } +00092 +<a name="l00093"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a9">00093</a> <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a9">isTrue</a>()<font class="keyword"> const</font> +00094 <font class="keyword"> </font>{ +00095 <font class="keywordflow">return</font> <font class="keyword">true</font>; +00096 } +00097 +<a name="l00098"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a10">00098</a> <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> &<a class="code" href="classNLAIAGENT_1_1IVector.html#a10">getValueRef</a>()<font class="keyword"> const</font> +00099 <font class="keyword"> </font>{ +00100 <font class="keywordflow">return</font> _Value; +00101 } +00102 +<a name="l00103"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a11">00103</a> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> <a class="code" href="classNLAIAGENT_1_1IVector.html#a11">getValue</a>()<font class="keyword"> const</font> +00104 <font class="keyword"> </font>{ +00105 <font class="keywordflow">return</font> _Value; +00106 } +00107 +<a name="l00108"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a12">00108</a> <font class="keywordtype">void</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a12">setValue</a>(<a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>) +00109 { +00110 _Value = value; +00111 } +00112 +<a name="l00113"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a13">00113</a> <font class="keywordtype">double</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a>()<font class="keyword"> const</font> +00114 <font class="keyword"> </font>{ +00115 <font class="keywordflow">return</font> _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m0">x</a>; +00116 } +00117 +<a name="l00118"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a14">00118</a> <font class="keywordtype">double</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a14">y</a>()<font class="keyword"> const</font> +00119 <font class="keyword"> </font>{ +00120 <font class="keywordflow">return</font> _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m1">y</a>; +00121 } +00122 +<a name="l00123"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a15">00123</a> <font class="keywordtype">double</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a15">z</a>()<font class="keyword"> const</font> +00124 <font class="keyword"> </font>{ +00125 <font class="keywordflow">return</font> _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m2">z</a>; +00126 } +00127 +<a name="l00128"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a16">00128</a> <font class="keywordtype">void</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a>(<font class="keyword">const</font> <font class="keywordtype">double</font> u) +00129 { +00130 _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m0">x</a> = u; +00131 } +00132 +<a name="l00133"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a17">00133</a> <font class="keywordtype">void</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a14">y</a>(<font class="keyword">const</font> <font class="keywordtype">double</font> <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>) +00134 { +00135 _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m1">y</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>; +00136 } +00137 +<a name="l00138"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a18">00138</a> <font class="keywordtype">void</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a15">z</a>(<font class="keyword">const</font> <font class="keywordtype">double</font> <a class="code" href="driver__opengl__extension__def_8h.html#a367">w</a>) +00139 { +00140 _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m2">z</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a367">w</a>; +00141 } +00142 +<a name="l00143"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a19">00143</a> <font class="keywordtype">double</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a19">squareLength</a>() +00144 { +00145 <font class="keywordflow">return</font> _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m0">x</a> * _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m0">x</a> + _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m1">y</a> * _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m1">y</a> + _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m2">z</a> * _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#m2">z</a>; +00146 } +00147 +<a name="l00148"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a20">00148</a> <font class="keywordtype">double</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a20">length</a>() +00149 { +00150 <font class="keywordflow">return</font> (double) sqrt(<a class="code" href="classNLAIAGENT_1_1IVector.html#a19">squareLength</a>()); +00151 } +00152 +<a name="l00153"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a21">00153</a> <font class="keywordtype">void</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a21">unit</a>() +00154 { +00155 _Value.<a class="code" href="classNLMISC_1_1CVectorD.html#z345_4">normalize</a>(); +00156 } +00157 +<a name="l00158"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a22">00158</a> <font class="keyword">virtual</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> &<a class="code" href="classNLAIAGENT_1_1IVector.html#a22">operator = </a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> &a) +00159 { +00160 <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>((<a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a>)((<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a0">IVector</a> &)a).<a class="code" href="classNLAIAGENT_1_1IVector.html#a11">getValue</a>()); +00161 _Value = v; +00162 <font class="keywordflow">return</font> *<font class="keyword">this</font>; +00163 } +00164 +<a name="l00165"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a23">00165</a> <font class="keyword">virtual</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> &<a class="code" href="classNLAIAGENT_1_1IVector.html#a23">operator += </a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> &a) +00166 { +00167 <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = (NLMISC::CVectorD)((<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a0">IVector</a> &)a).getValue(); +00168 _Value += v; +00169 <font class="keywordflow">return</font> *<font class="keyword">this</font>; +00170 } +00171 +<a name="l00172"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a24">00172</a> <font class="keyword">virtual</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> &<a class="code" href="classNLAIAGENT_1_1IVector.html#a24">operator -= </a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> &a) +00173 { +00174 <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = (NLMISC::CVectorD)((<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a0">IVector</a> &)a).getValue(); +00175 _Value -= v; +00176 <font class="keywordflow">return</font> *<font class="keyword">this</font>; +00177 } +00178 +<a name="l00179"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a25">00179</a> <font class="keyword">virtual</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> *<a class="code" href="classNLAIAGENT_1_1IVector.html#a25">operator + </a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> &a) +00180 { +00181 <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> *o = (<a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> *)<a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>(); +00182 *o += a; +00183 <font class="keywordflow">return</font> o; +00184 } +00185 +<a name="l00186"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a26">00186</a> <font class="keyword">virtual</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> *<a class="code" href="classNLAIAGENT_1_1IVector.html#a26">operator - </a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> &a) +00187 { +00188 <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> *o = (<a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> *)<a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>(); +00189 *o -= a; +00190 <font class="keywordflow">return</font> o; +00191 } +00192 +<a name="l00193"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a27">00193</a> <font class="keyword">virtual</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> *<a class="code" href="classNLAIAGENT_1_1IVector.html#a27">operator != </a>(<a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> &a)<font class="keyword"> const</font> +00194 <font class="keyword"> </font>{ +00195 <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = (NLMISC::CVectorD)((<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a0">IVector</a> &)a).getValue(); +00196 <a class="code" href="classNLAILOGIC_1_1CBoolType.html">NLAILOGIC::CBoolType</a> *<a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a> = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CBoolType.html">NLAILOGIC::CBoolType</a>(_Value != v); +00197 <font class="keywordflow">return</font> x; +00198 } +00199 +<a name="l00200"></a><a class="code" href="classNLAIAGENT_1_1IVector.html#a28">00200</a> <font class="keyword">virtual</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> *<a class="code" href="classNLAIAGENT_1_1IVector.html#a28">operator == </a>(<a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> &a)<font class="keyword"> const</font> +00201 <font class="keyword"> </font>{ +00202 <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = (NLMISC::CVectorD)((<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a0">IVector</a> &)a).getValue(); +00203 <a class="code" href="classNLAILOGIC_1_1CBoolType.html">NLAILOGIC::CBoolType</a> *<a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a> = <font class="keyword">new</font> <a class="code" href="classNLAILOGIC_1_1CBoolType.html">NLAILOGIC::CBoolType</a>(_Value == v); +00204 <font class="keywordflow">return</font> x; +00205 } +00206 +00207 <font class="keyword">virtual</font> sint32 <a class="code" href="classNLAIAGENT_1_1IVector.html#a29">getMethodIndexSize</a>() <font class="keyword">const</font>; +00208 <font class="keyword">virtual</font> <a class="code" href="namespaceNLAIAGENT.html#a1">tQueue</a> <a class="code" href="classNLAIAGENT_1_1IVector.html#a30">isMember</a>(<font class="keyword">const</font> IVarName *,<font class="keyword">const</font> IVarName *,<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> &) <font class="keyword">const</font>; +00209 <font class="keyword">virtual</font> CProcessResult <a class="code" href="classNLAIAGENT_1_1IVector.html#a31">runMethodeMember</a>(sint32, sint32, <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *); +00210 <font class="keyword">virtual</font> CProcessResult <a class="code" href="classNLAIAGENT_1_1IVector.html#a31">runMethodeMember</a>(sint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>,<a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> *); +00211 <font class="keyword">virtual</font> sint32 <a class="code" href="classNLAIAGENT_1_1IVector.html#a33">isClassInheritedFrom</a>(<font class="keyword">const</font> IVarName &) <font class="keyword">const</font>; +00212 }; +00213 +<a name="l00223"></a><a class="code" href="classNLAIAGENT_1_1VectorType.html">00223</a> <font class="keyword">class </font>VectorType: <font class="keyword">public</font> IVector +00224 { +00225 <font class="keyword">public</font>: +00226 +00227 <font class="keyword">static</font> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> <a class="code" href="classNLAIAGENT_1_1VectorType.html#p0">IdVectorType</a>; +00228 +00229 <font class="keyword">public</font>: +<a name="l00230"></a><a class="code" href="classNLAIAGENT_1_1VectorType.html#a0">00230</a> <a class="code" href="classNLAIAGENT_1_1VectorType.html#a2">VectorType</a>(<font class="keywordtype">double</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a>, <font class="keywordtype">double</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a14">y</a>, <font class="keywordtype">double</font> <a class="code" href="classNLAIAGENT_1_1IVector.html#a15">z</a>):<a class="code" href="classNLAIAGENT_1_1IVector.html#a0">IVector</a>(<a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a>, <a class="code" href="classNLAIAGENT_1_1IVector.html#a14">y</a>, <a class="code" href="classNLAIAGENT_1_1IVector.html#a15">z</a>) +00231 { +00232 } +00233 +<a name="l00234"></a><a class="code" href="classNLAIAGENT_1_1VectorType.html#a1">00234</a> <a class="code" href="classNLAIAGENT_1_1VectorType.html#a2">VectorType</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> &<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>):<a class="code" href="classNLAIAGENT_1_1IVector.html#a0">IVector</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>) +00235 { +00236 } +00237 +<a name="l00238"></a><a class="code" href="classNLAIAGENT_1_1VectorType.html#a2">00238</a> <a class="code" href="classNLAIAGENT_1_1VectorType.html#a2">VectorType</a>():<a class="code" href="classNLAIAGENT_1_1IVector.html#a0">IVector</a>() +00239 { +00240 } +00241 +<a name="l00242"></a><a class="code" href="classNLAIAGENT_1_1VectorType.html#a3">00242</a> <a class="code" href="classNLAIAGENT_1_1VectorType.html#a2">VectorType</a>(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1VectorType.html#a0">VectorType</a> &a):<a class="code" href="classNLAIAGENT_1_1IVector.html#a0">IVector</a>(a) +00243 { +00244 } +00245 +<a name="l00246"></a><a class="code" href="classNLAIAGENT_1_1VectorType.html#a4">00246</a> <a class="code" href="classNLAIAGENT_1_1VectorType.html#a2">VectorType</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &is):<a class="code" href="classNLAIAGENT_1_1IVector.html#a0">IVector</a>(is) +00247 { +00248 } +00249 +<a name="l00250"></a><a class="code" href="classNLAIAGENT_1_1VectorType.html#a5">00250</a> <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *<a class="code" href="classNLAIAGENT_1_1VectorType.html#a5">clone</a>()<font class="keyword"> const</font> +00251 <font class="keyword"> </font>{ +00252 <a class="code" href="classNLAIC_1_1IBasicInterface.html">NLAIC::IBasicInterface</a> *m = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1VectorType.html#a2">VectorType</a>(*<font class="keyword">this</font>); +00253 <font class="keywordflow">return</font> m; +00254 } +00255 +<a name="l00256"></a><a class="code" href="classNLAIAGENT_1_1VectorType.html#a6">00256</a> <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *<a class="code" href="classNLAIAGENT_1_1VectorType.html#a6">newInstance</a>()<font class="keyword"> const</font> +00257 <font class="keyword"> </font>{ +00258 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1VectorType.html#a5">clone</a>(); +00259 } +00260 +00261 <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &<a class="code" href="classNLAIAGENT_1_1VectorType.html#a7">getType</a>() <font class="keyword">const</font>; +00262 +00263 +<a name="l00264"></a><a class="code" href="classNLAIAGENT_1_1VectorType.html#a8">00264</a> <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLAIAGENT_1_1VectorType.html#a8">getDebugString</a>(std::string &text)<font class="keyword"> const</font> +00265 <font class="keyword"> </font>{ +00266 text = <a class="code" href="namespaceNLAIC.html#a5">NLAIC::stringGetBuild</a>(<font class="stringliteral">"Vector <%f %f %f>"</font>,<a class="code" href="classNLAIAGENT_1_1IVector.html#a11">getValue</a>().<a class="code" href="classNLAIAGENT_1_1IVector.html#a13">x</a>, <a class="code" href="classNLAIAGENT_1_1IVector.html#a11">getValue</a>().<a class="code" href="classNLAIAGENT_1_1IVector.html#a14">y</a>, <a class="code" href="classNLAIAGENT_1_1IVector.html#a11">getValue</a>().<a class="code" href="classNLAIAGENT_1_1IVector.html#a15">z</a>); +00267 } +00268 +00269 <font class="keyword">virtual</font> <font class="keyword">const</font> CProcessResult &<a class="code" href="classNLAIAGENT_1_1VectorType.html#a9">run</a>(); +00270 }; +00271 } +00272 +00273 +00274 <font class="preprocessor">#endif // NL_AGENT_3DVECTOR_H</font> +00275 <font class="preprocessor"></font> +00276 <font class="comment">/* End of agent_3dvector.h */</font> +</pre></div> + +<!-- footer --> +<BR><FONT Size=+5> </FONT> +</TD> +<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD> +</TR> +</TABLE> +</BODY> +</HTML> |