aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/ps__attrib__maker__bin__op__inline_8h-source.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/ps__attrib__maker__bin__op__inline_8h-source.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/ps__attrib__maker__bin__op__inline_8h-source.html')
-rw-r--r--docs/doxygen/nel/ps__attrib__maker__bin__op__inline_8h-source.html638
1 files changed, 638 insertions, 0 deletions
diff --git a/docs/doxygen/nel/ps__attrib__maker__bin__op__inline_8h-source.html b/docs/doxygen/nel/ps__attrib__maker__bin__op__inline_8h-source.html
new file mode 100644
index 00000000..21b70aef
--- /dev/null
+++ b/docs/doxygen/nel/ps__attrib__maker__bin__op__inline_8h-source.html
@@ -0,0 +1,638 @@
+<!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>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</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>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</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>
+&nbsp;
+
+<!-- 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>&nbsp;</td>
+</tr></table>
+<!-- Generated by Doxygen 1.2.14 -->
+<center>
+<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <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> &nbsp; </center>
+<hr><h1>ps_attrib_maker_bin_op_inline.h</h1><a href="ps__attrib__maker__bin__op__inline_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
+00007 <font class="comment">/* Copyright, 2001 Nevrax Ltd.</font>
+00008 <font class="comment"> *</font>
+00009 <font class="comment"> * This file is part of NEVRAX NEL.</font>
+00010 <font class="comment"> * NEVRAX NEL 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 NEL 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 NEL; 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
+00027 <font class="preprocessor">#ifndef NL_PS_ATTRIB_MAKER_BIN_OP_H</font>
+00028 <font class="preprocessor"></font><font class="preprocessor"> #error Do not include this file! include ps_attrib_maker_bin_op_inline instead!</font>
+00029 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
+00030 <font class="preprocessor"></font>
+00031 <font class="preprocessor">#ifndef NL_PS_ATTRIB_MAKER_BIN_OP_INLINE_H</font>
+00032 <font class="preprocessor"></font><font class="preprocessor">#define NL_PS_ATTRIB_MAKER_BIN_OP_INLINE_H</font>
+00033 <font class="preprocessor"></font>
+00034
+00035
+00036 <font class="keyword">namespace </font>NL3D {
+00037
+00038
+00044 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+00045 <font class="keyword">inline</font> T <a class="code" href="namespaceNL3D.html#a401">PSBinOpModulate</a>(T <a class="code" href="driver__opengl__extension__def_8h.html#a401">arg1</a>, T <a class="code" href="driver__opengl__extension__def_8h.html#a402">arg2</a>) { <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a401">arg1</a> * <a class="code" href="driver__opengl__extension__def_8h.html#a402">arg2</a>; }
+00046 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+00047 <font class="keyword">inline</font> T <a class="code" href="namespaceNL3D.html#a402">PSBinOpAdd</a>(T <a class="code" href="driver__opengl__extension__def_8h.html#a401">arg1</a>, T <a class="code" href="driver__opengl__extension__def_8h.html#a402">arg2</a>) { <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a401">arg1</a> + <a class="code" href="driver__opengl__extension__def_8h.html#a402">arg2</a>; }
+00048 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+00049 <font class="keyword">inline</font> T <a class="code" href="namespaceNL3D.html#a403">PSBinOpSubtract</a>(T <a class="code" href="driver__opengl__extension__def_8h.html#a401">arg1</a>, T <a class="code" href="driver__opengl__extension__def_8h.html#a402">arg2</a>) { <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a401">arg1</a> - <a class="code" href="driver__opengl__extension__def_8h.html#a402">arg2</a>; }
+00050
+00051 <font class="keyword">template</font> &lt;&gt;
+00052 <font class="keyword">inline</font> CPlaneBasis <a class="code" href="namespaceNL3D.html#a401">PSBinOpModulate</a>(CPlaneBasis p1, CPlaneBasis p2)
+00053 {
+00054 <font class="comment">// we compute p1 * p2</font>
+00055 <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> <a class="code" href="driver__opengl__extension__def_8h.html#a366">z</a> = p1.X ^ p1.Y;
+00056 CPlaneBasis <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00057 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.X.x = p2.X.x * p1.X.x + p2.X.y * p1.Y.x + p2.X.z * z.<a class="code" href="classNLMISC_1_1CVector.html#m0">x</a>;
+00058 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.X.y = p2.X.x * p1.X.y + p2.X.y * p1.Y.y + p2.X.z * z.<a class="code" href="classNLMISC_1_1CVector.html#m1">y</a>;
+00059 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.X.z = p2.X.x * p1.X.z + p2.X.y * p1.Y.z + p2.X.z * z.<a class="code" href="classNLMISC_1_1CVector.html#m2">z</a>;
+00060
+00061 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Y.x = p2.Y.x * p1.X.x + p2.Y.y * p1.Y.x + p2.Y.z * z.<a class="code" href="classNLMISC_1_1CVector.html#m0">x</a>;
+00062 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Y.y = p2.Y.x * p1.X.y + p2.Y.y * p1.Y.y + p2.Y.z * z.<a class="code" href="classNLMISC_1_1CVector.html#m1">y</a>;
+00063 <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.Y.z = p2.Y.x * p1.X.z + p2.Y.y * p1.Y.z + p2.Y.z * z.<a class="code" href="classNLMISC_1_1CVector.html#m2">z</a>;
+00064
+00065 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00066
+00067 }
+00068 <font class="keyword">template</font> &lt;&gt;
+00069 <font class="keyword">inline</font> CPlaneBasis <a class="code" href="namespaceNL3D.html#a402">PSBinOpAdd</a>(CPlaneBasis p1, CPlaneBasis p2)
+00070 {
+00071 <a class="code" href="debug_8h.html#a6">nlassert</a>(0); <font class="comment">// not allowed for now</font>
+00072 <font class="keywordflow">return</font> CPlaneBasis(<a class="code" href="classNLMISC_1_1CVector.html#p0">NLMISC::CVector::Null</a>);
+00073 }
+00074 <font class="keyword">template</font> &lt;&gt;
+00075 <font class="keyword">inline</font> CPlaneBasis <a class="code" href="namespaceNL3D.html#a403">PSBinOpSubtract</a>(CPlaneBasis p1, CPlaneBasis p2)
+00076 {
+00077 <a class="code" href="debug_8h.html#a6">nlassert</a>(0); <font class="comment">// not allowed for now</font>
+00078 <font class="keywordflow">return</font> CPlaneBasis(<a class="code" href="classNLMISC_1_1CVector.html#p0">NLMISC::CVector::Null</a>);
+00079 }
+00080
+00081
+00082
+00083
+00084 <font class="keyword">template</font> &lt;&gt;
+00085 <font class="keyword">inline</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> <a class="code" href="namespaceNL3D.html#a401">PSBinOpModulate</a>(<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> t1, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> t2)
+00086 {
+00087 <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> result;
+00088 result.<a class="code" href="classNLMISC_1_1CRGBA.html#a9">modulateFromColor</a>(t1, t2);
+00089 <font class="keywordflow">return</font> result;
+00090 }
+00091 <font class="keyword">template</font> &lt;&gt;
+00092 <font class="keyword">inline</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> <a class="code" href="namespaceNL3D.html#a402">PSBinOpAdd</a>(<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> t1, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> t2)
+00093 {
+00094 <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00095 uint S = t1.<a class="code" href="classNLMISC_1_1CRGBA.html#m0">R</a> + t2.<a class="code" href="classNLMISC_1_1CRGBA.html#m0">R</a>; <font class="keywordflow">if</font> (S &gt; 255) S = 255; r.<a class="code" href="classNLMISC_1_1CRGBA.html#m0">R</a> = (uint8) S;
+00096 S = t1.<a class="code" href="classNLMISC_1_1CRGBA.html#m1">G</a> + t2.<a class="code" href="classNLMISC_1_1CRGBA.html#m1">G</a>; <font class="keywordflow">if</font> (S &gt; 255) S = 255; r.<a class="code" href="classNLMISC_1_1CRGBA.html#m1">G</a> = (uint8) S;
+00097 S = t1.<a class="code" href="classNLMISC_1_1CRGBA.html#m2">B</a> + t2.<a class="code" href="classNLMISC_1_1CRGBA.html#m2">B</a>; <font class="keywordflow">if</font> (S &gt; 255) S = 255; r.<a class="code" href="classNLMISC_1_1CRGBA.html#m2">B</a> = (uint8) S;
+00098 <font class="keywordflow">return</font> r;
+00099 }
+00100 <font class="keyword">template</font> &lt;&gt;
+00101 <font class="keyword">inline</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> <a class="code" href="namespaceNL3D.html#a403">PSBinOpSubtract</a>(<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> t1, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> t2)
+00102 {
+00103 <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;
+00104 sint S = t1.<a class="code" href="classNLMISC_1_1CRGBA.html#m0">R</a> - t2.<a class="code" href="classNLMISC_1_1CRGBA.html#m0">R</a>; <font class="keywordflow">if</font> (S &lt; 0) S = 0; r.<a class="code" href="classNLMISC_1_1CRGBA.html#m0">R</a> = (uint8) S;
+00105 S = t1.<a class="code" href="classNLMISC_1_1CRGBA.html#m1">G</a> - t2.<a class="code" href="classNLMISC_1_1CRGBA.html#m1">G</a>; <font class="keywordflow">if</font> (S &lt; 0) S = 0; r.<a class="code" href="classNLMISC_1_1CRGBA.html#m1">G</a> = (uint8) S;
+00106 S = t1.<a class="code" href="classNLMISC_1_1CRGBA.html#m2">B</a> - t2.<a class="code" href="classNLMISC_1_1CRGBA.html#m2">B</a>; <font class="keywordflow">if</font> (S &lt; 0) S = 0; r.<a class="code" href="classNLMISC_1_1CRGBA.html#m2">B</a> = (uint8) S;
+00107 <font class="keywordflow">return</font> r;
+00108 }
+00109
+00110
+00112 <font class="comment">// CPSAttribMakerBinOp implementation //</font>
+00114 <font class="comment"></font>
+00115
+00116
+00117 <font class="comment">//=================================================================================================================</font>
+00119 <font class="comment">template &lt;class T&gt;</font>
+<a name="l00120"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z710_1">00120</a> CPSAttribMakerBinOp&lt;T&gt;::CPSAttribMakerBinOp(<font class="keyword">const</font> CPSAttribMakerBinOp &amp;other) : CPSAttribMaker&lt;T&gt;(other) <font class="comment">// parent copy ctor</font>
+00121 {
+00122 std::auto_ptr&lt;CPSAttribMaker&lt;T&gt; &gt; a0(NLMISC::safe_cast&lt;CPSAttribMaker&lt;T&gt; *&gt;(other._Arg[0]-&gt;clone()))
+00123 , a1(NLMISC::safe_cast&lt;CPSAttribMaker&lt;T&gt; *&gt;(other._Arg[1]-&gt;clone()));
+00124 this-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n0">_Op</a> = other._Op;
+00125 this-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n2">_Size</a> = other._Size;
+00126 this-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n3">_MaxSize</a> = other._MaxSize;
+00127 this-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0] = a0.release();
+00128 this-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1] = a1.release();
+00129 }
+00130
+00131 <font class="comment">//=================================================================================================================</font>
+00132 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00133"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z710_0">00133</a> CPSAttribMakerBinOp&lt;T&gt;::CPSAttribMakerBinOp() : _Op(CPSBinOp::selectArg1), _Size(0), _MaxSize(0)
+00134 {
+00135 <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0] = <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1] = NULL;
+00136 <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n1">_HasMemory</a> = <font class="keyword">true</font>;
+00137 }
+00138
+00139 <font class="comment">//=================================================================================================================</font>
+00140 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00141"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#b3">00141</a> <font class="keywordtype">void</font> CPSAttribMakerBinOp&lt;T&gt;::clean(<font class="keywordtype">void</font>)
+00142 {
+00143 <font class="keyword">delete</font> <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0];
+00144 <font class="keyword">delete</font> <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1];
+00145 }
+00146
+00147 <font class="comment">//=================================================================================================================</font>
+00148 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00149"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z710_2">00149</a> CPSAttribMakerBinOp&lt;T&gt;::~CPSAttribMakerBinOp()
+00150 {
+00151 <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#b3">clean</a>();
+00152 }
+00153
+00154 <font class="comment">//=================================================================================================================</font>
+00156 <font class="comment">bool CPSAttribMakerBinOp&lt;CPlaneBasis&gt;::supportOp(CPSBinOp::BinOp op) </font>
+00157 {
+00158 <font class="keywordflow">return</font> (op == CPSBinOp::selectArg1 || op == CPSBinOp::selectArg2 || op == CPSBinOp::modulate);
+00159 }
+00160
+00161
+00162 <font class="comment">//=================================================================================================================</font>
+00163 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00164"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_0">00164</a> T CPSAttribMakerBinOp&lt;T&gt;::get (CPSLocated *loc, uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>)
+00165 {
+00166 <font class="keywordflow">switch</font> (_Op)
+00167 {
+00168 <font class="keywordflow">case</font> CPSBinOp::selectArg1:
+00169 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;get(loc, <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>);
+00170 <font class="keywordflow">break</font>;
+00171 <font class="keywordflow">case</font> CPSBinOp::selectArg2:
+00172 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;get(loc, <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>);
+00173 <font class="keywordflow">break</font>;
+00174 <font class="keywordflow">case</font> CPSBinOp::modulate:
+00175 <font class="keywordflow">return</font> <a class="code" href="namespaceNL3D.html#a401">PSBinOpModulate</a>(<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_0">get</a>(loc, <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>), <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_0">get</a>(loc, <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>));
+00176 <font class="keywordflow">break</font>;
+00177 <font class="keywordflow">case</font> CPSBinOp::add:
+00178 <font class="keywordflow">return</font> <a class="code" href="namespaceNL3D.html#a402">PSBinOpAdd</a>(<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_0">get</a>(loc, <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>), <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_0">get</a>(loc, <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>));
+00179 <font class="keywordflow">break</font>;
+00180 <font class="keywordflow">case</font> CPSBinOp::subtract:
+00181 <font class="keywordflow">return</font> <a class="code" href="namespaceNL3D.html#a403">PSBinOpSubtract</a>(<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_0">get</a>(loc, <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>), <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_0">get</a>(loc, <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>));
+00182 <font class="keywordflow">break</font>;
+00183 <font class="keywordflow">default</font>: <font class="keywordflow">break</font>;
+00184 }
+00185
+00186 <a class="code" href="debug_8h.html#a12">nlstop</a>;
+00187 <font class="keywordflow">return</font> T();
+00188 }
+00189
+00190 <font class="comment">// for private use</font>
+00191 <font class="keywordtype">void</font> <a class="code" href="namespaceNL3D.html#a398">MakePrivate</a>(uint8 * dest, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *src1, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *src2, uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, uint32 numAttrib, CPSBinOp::BinOp op);
+00192 <font class="comment">// for private use</font>
+00193 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+00194 <font class="keywordtype">void</font> <a class="code" href="namespaceNL3D.html#a398">MakePrivate</a>(uint8 * dest, <font class="keyword">const</font> T *src1, <font class="keyword">const</font> T *src2, uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, uint32 numAttrib, CPSBinOp::BinOp op)
+00195 {
+00196 uint8 *destEnd = dest + (<a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a> * numAttrib);
+00197
+00198 <font class="keywordflow">switch</font> (op)
+00199 {
+00200 <font class="keywordflow">case</font> CPSBinOp::modulate:
+00201 {
+00202 <font class="keywordflow">while</font> (dest != destEnd)
+00203 {
+00204 * (T *) dest = <a class="code" href="namespaceNL3D.html#a401">PSBinOpModulate</a>(*src1 ++, *src2 ++);
+00205 dest += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
+00206 }
+00207 }
+00208 <font class="keywordflow">break</font>;
+00209 <font class="keywordflow">case</font> CPSBinOp::add:
+00210 {
+00211 <font class="keywordflow">while</font> (dest != destEnd)
+00212 {
+00213 * (T *) dest = <a class="code" href="namespaceNL3D.html#a402">PSBinOpAdd</a>(*src1 ++, *src2 ++);
+00214 dest += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
+00215 }
+00216 }
+00217 <font class="keywordflow">break</font>;
+00218 <font class="keywordflow">case</font> CPSBinOp::subtract:
+00219 <font class="keywordflow">while</font> (dest != destEnd)
+00220 {
+00221 * (T *) dest = <a class="code" href="namespaceNL3D.html#a403">PSBinOpSubtract</a>(*src1 ++, *src2 ++);
+00222 dest += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
+00223 }
+00224 <font class="keywordflow">break</font>;
+00225 <font class="keywordflow">default</font>: <font class="keywordflow">break</font>;
+00226 }
+00227 }
+00228
+00229
+00230 <font class="comment">//=================================================================================================================</font>
+00231 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00232"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#b0">00232</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> *CPSAttribMakerBinOp&lt;T&gt;::makePrivate(T *buf1,
+00233 T *buf2,
+00234 CPSLocated *loc,
+00235 uint32 startIndex,
+00236 <font class="keywordtype">void</font> *tab,
+00237 uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
+00238 uint32 numAttrib,
+00239 <font class="keywordtype">bool</font> allowNoCopy <font class="comment">/* = false */</font>,
+00240 uint32 srcStep <font class="comment">/* = (1 &lt;&lt; 16)*/</font>
+00241 )<font class="keyword"> const</font>
+00242 <font class="keyword"></font>{
+00243 uint8 *dest = (uint8 *) tab;
+00244 uint leftToDo = numAttrib, toProcess;
+00245 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0] &amp;&amp; <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]);
+00246 <font class="keywordflow">switch</font> (_Op)
+00247 {
+00248 <font class="keywordflow">case</font> CPSBinOp::selectArg1:
+00249 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;make(loc, startIndex, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, allowNoCopy, srcStep);
+00250 <font class="keywordflow">break</font>;
+00251 <font class="keywordflow">case</font> CPSBinOp::selectArg2:
+00252 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;make(loc, startIndex, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, allowNoCopy, srcStep);
+00253 <font class="keywordflow">break</font>;
+00254 <font class="keywordflow">default</font>: <font class="keywordflow">break</font>;
+00255 }
+00256
+00257
+00258
+00259 <font class="keywordflow">while</font> (leftToDo)
+00260 {
+00261 toProcess = leftToDo &gt; <a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> ? <a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> : leftToDo;
+00262 T *src1 = (T *) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;make(loc, startIndex + (numAttrib - leftToDo), &amp;buf1[0], <font class="keyword">sizeof</font>(T), toProcess, <font class="keyword">true</font>, srcStep);
+00263 T *src2 = (T *) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;make(loc, startIndex + (numAttrib - leftToDo), &amp;buf2[0], <font class="keyword">sizeof</font>(T), toProcess, <font class="keyword">true</font>, srcStep);
+00264 <a class="code" href="namespaceNL3D.html#a398">MakePrivate</a>(dest, src1, src2, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, toProcess, <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n0">_Op</a>);
+00265 leftToDo -= toProcess;
+00266 }
+00267
+00268 <font class="keywordflow">return</font> tab;
+00269 }
+00270
+00271 <font class="comment">//=================================================================================================================</font>
+00272 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00273"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_1">00273</a> <font class="keywordtype">void</font> *CPSAttribMakerBinOp&lt;T&gt;::make (CPSLocated *loc,
+00274 uint32 startIndex,
+00275 <font class="keywordtype">void</font> *tab,
+00276 uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
+00277 uint32 numAttrib,
+00278 <font class="keywordtype">bool</font> allowNoCopy <font class="comment">/* = false */</font>,
+00279 uint32 srcStep <font class="comment">/* = (1 &lt;&lt; 16)*/</font>
+00280 )<font class="keyword"> const</font>
+00281 <font class="keyword"></font>{
+00286 uint8 tab1[<a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> * <font class="keyword">sizeof</font>(T)];
+00287 uint8 tab2[<a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> * <font class="keyword">sizeof</font>(T)];
+00288 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#b0">makePrivate</a>((T *) &amp;tab1[0], (T *) &amp;tab2[0], loc, startIndex, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, allowNoCopy, srcStep);
+00289 }
+00290
+00291
+00292 <font class="comment">// for private use</font>
+00293 <font class="keywordtype">void</font> <a class="code" href="namespaceNL3D.html#a399">Make4Private</a>(uint8 * dest, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *src1, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *src2, uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, uint32 numAttrib, CPSBinOp::BinOp op);
+00294
+00295 <font class="comment">// for private use</font>
+00296 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+00297 <font class="keywordtype">void</font> <a class="code" href="namespaceNL3D.html#a399">Make4Private</a>(uint8 * dest, <font class="keyword">const</font> T *src1, <font class="keyword">const</font> T *src2, uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, uint32 numAttrib, CPSBinOp::BinOp op)
+00298 {
+00299 <font class="keyword">const</font> uint stride2 = <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a> &lt;&lt; 1, stride3 = <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a> + stride2, stride4 = stride2 &lt;&lt; 1;
+00300 uint8 *destEnd = dest + ((<a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>&lt;&lt;2) * numAttrib);
+00301 <font class="keywordflow">switch</font> (op)
+00302 {
+00303 <font class="keywordflow">case</font> CPSBinOp::modulate:
+00304 {
+00305 <font class="keywordflow">while</font> (dest != destEnd)
+00306 {
+00307 <font class="comment">// compute one value, and duplicate if 4 times</font>
+00308 * (T *) dest = <a class="code" href="namespaceNL3D.html#a401">PSBinOpModulate</a>(*src1 ++, *src2 ++);
+00309 * (T *) (dest + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = * (T *) dest;
+00310 * (T *) (dest + stride2) = * (T *) dest;
+00311 * (T *) (dest + stride3) = * (T *) dest;
+00312 dest += stride4;
+00313 }
+00314 }
+00315 <font class="keywordflow">break</font>;
+00316 <font class="keywordflow">case</font> CPSBinOp::add:
+00317 {
+00318 <font class="keywordflow">while</font> (dest != destEnd)
+00319 {
+00320 <font class="comment">// compute one value, and duplicate if 4 times</font>
+00321 * (T *) dest = <a class="code" href="namespaceNL3D.html#a402">PSBinOpAdd</a>(*src1 ++, *src2 ++);
+00322 * (T *) (dest + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = * (T *) dest;
+00323 * (T *) (dest + stride2) = * (T *) dest;
+00324 * (T *) (dest + stride3) = * (T *) dest;
+00325 dest += stride4;
+00326 }
+00327 }
+00328 <font class="keywordflow">break</font>;
+00329 <font class="keywordflow">case</font> CPSBinOp::subtract:
+00330 <font class="keywordflow">while</font> (dest != destEnd)
+00331 {
+00332 <font class="comment">// compute one value, and duplicate if 4 times</font>
+00333 * (T *) dest = <a class="code" href="namespaceNL3D.html#a403">PSBinOpSubtract</a>(*src1 ++, *src2 ++);
+00334 * (T *) (dest + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = * (T *) dest;
+00335 * (T *) (dest + stride2) = * (T *) dest;
+00336 * (T *) (dest + stride3) = * (T *) dest;
+00337 dest += stride4;
+00338 }
+00339 <font class="keywordflow">break</font>;
+00340 <font class="keywordflow">default</font>: <font class="keywordflow">break</font>;
+00341 }
+00342 }
+00343
+00344 <font class="comment">//=================================================================================================================</font>
+00345 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00346"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#b1">00346</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> CPSAttribMakerBinOp&lt;T&gt;::make4Private(T *buf1,
+00347 T *buf2,
+00348 CPSLocated *loc,
+00349 uint32 startIndex,
+00350 <font class="keywordtype">void</font> *tab,
+00351 uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
+00352 uint32 numAttrib,
+00353 uint32 srcStep <font class="comment">/* = (1 &lt;&lt; 16)*/</font>
+00354 )<font class="keyword"> const</font>
+00355 <font class="keyword"></font>{
+00356 uint8 *dest = (uint8 *) tab;
+00357 uint leftToDo = numAttrib, toProcess;
+00358 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0] &amp;&amp; <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]);
+00359 <font class="keywordflow">switch</font> (_Op)
+00360 {
+00361 <font class="keywordflow">case</font> CPSBinOp::selectArg1:
+00362 <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;make4(loc, startIndex, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, srcStep);
+00363 <font class="keywordflow">return</font>;
+00364 <font class="keywordflow">break</font>;
+00365 <font class="keywordflow">case</font> CPSBinOp::selectArg2:
+00366 <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;make4(loc, startIndex, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, srcStep);
+00367 <font class="keywordflow">return</font>;
+00368 <font class="keywordflow">break</font>;
+00369 <font class="keywordflow">default</font>: <font class="keywordflow">break</font>;
+00370 }
+00371
+00372 <font class="keywordflow">while</font> (leftToDo)
+00373 {
+00374 toProcess = leftToDo &gt; <a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> ? <a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> : leftToDo;
+00375 T *src1 = (T *) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;make(loc, startIndex + (numAttrib - leftToDo), &amp;buf1[0], <font class="keyword">sizeof</font>(T), toProcess, <font class="keyword">true</font>, srcStep);
+00376 T *src2 = (T *) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;make(loc, startIndex + (numAttrib - leftToDo), &amp;buf2[0], <font class="keyword">sizeof</font>(T), toProcess, <font class="keyword">true</font>, srcStep);
+00377
+00378 <a class="code" href="namespaceNL3D.html#a399">Make4Private</a>(dest, src1, src2, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, toProcess, <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n0">_Op</a>);
+00379 leftToDo -= toProcess;
+00380 }
+00381 }
+00382
+00383
+00384 <font class="comment">//=================================================================================================================</font>
+00385 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00386"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_2">00386</a> <font class="keywordtype">void</font> CPSAttribMakerBinOp&lt;T&gt;::make4 (CPSLocated *loc,
+00387 uint32 startIndex,
+00388 <font class="keywordtype">void</font> *tab,
+00389 uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
+00390 uint32 numAttrib,
+00391 uint32 srcStep <font class="comment">/*= (1 &lt;&lt; 16) */</font>
+00392 )<font class="keyword"> const</font>
+00393 <font class="keyword"></font>
+00394 <font class="keyword"></font>{
+00399 uint8 tab1[<a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> * <font class="keyword">sizeof</font>(T)];
+00400 uint8 tab2[<a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> * <font class="keyword">sizeof</font>(T)];
+00401 <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#b1">make4Private</a>((T *) &amp;tab1[0], (T *) &amp;tab2[0], loc, startIndex, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, srcStep);
+00402 }
+00403
+00404
+00405 <font class="comment">// for private use</font>
+00406 <font class="keywordtype">void</font> <a class="code" href="namespaceNL3D.html#a400">MakeNPrivate</a>(uint8 * dest, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *src1, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *src2, uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, uint32 numAttrib, CPSBinOp::BinOp op, uint nbReplicate);
+00407
+00408 <font class="comment">// for private use</font>
+00409 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+00410 <font class="keywordtype">void</font> <a class="code" href="namespaceNL3D.html#a400">MakeNPrivate</a>(uint8 * dest,
+00411 <font class="keyword">const</font> T *src1,
+00412 <font class="keyword">const</font> T *src2,
+00413 uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
+00414 uint32 numAttrib,
+00415 CPSBinOp::BinOp op,
+00416 uint nbReplicate,
+00417 uint32 srcStep = (1 &lt;&lt; 16)
+00418 )
+00419 {
+00420 uint k;
+00421 uint8 *destEnd = dest + ((<a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a> * nbReplicate) * numAttrib);
+00422 <font class="keywordflow">switch</font> (op)
+00423 {
+00424 <font class="keywordflow">case</font> CPSBinOp::modulate:
+00425 {
+00426 <font class="keywordflow">while</font> (dest != destEnd)
+00427 {
+00428 * (T *) dest = <a class="code" href="namespaceNL3D.html#a401">PSBinOpModulate</a>(*src1 ++, *src2 ++);
+00429 k = (nbReplicate - 1);
+00430 <font class="keywordflow">do</font>
+00431 {
+00432 * (T *) (dest + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) dest;
+00433 dest += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
+00434 }
+00435 <font class="keywordflow">while</font> (--k);
+00436 dest += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
+00437 }
+00438 }
+00439 <font class="keywordflow">break</font>;
+00440 <font class="keywordflow">case</font> CPSBinOp::add:
+00441 {
+00442 <font class="keywordflow">while</font> (dest != destEnd)
+00443 {
+00444 * (T *) dest = <a class="code" href="namespaceNL3D.html#a402">PSBinOpAdd</a>(*src1 ++, *src2 ++);
+00445 k = (nbReplicate - 1);
+00446 <font class="keywordflow">do</font>
+00447 {
+00448 * (T *) (dest + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) dest;
+00449 dest += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
+00450 }
+00451 <font class="keywordflow">while</font> (--k);
+00452 dest += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
+00453 }
+00454 }
+00455 <font class="keywordflow">break</font>;
+00456 <font class="keywordflow">case</font> CPSBinOp::subtract:
+00457 <font class="keywordflow">while</font> (dest != destEnd)
+00458 {
+00459 * (T *) dest = <a class="code" href="namespaceNL3D.html#a403">PSBinOpSubtract</a>(*src1 ++, *src2 ++);
+00460 k = (nbReplicate - 1);
+00461 <font class="keywordflow">do</font>
+00462 {
+00463 * (T *) (dest + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) dest;
+00464 dest += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
+00465 }
+00466 <font class="keywordflow">while</font> (--k);
+00467 dest += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
+00468 }
+00469 <font class="keywordflow">break</font>;
+00470 <font class="keywordflow">default</font>: <font class="keywordflow">break</font>;
+00471 }
+00472 }
+00473
+00474 <font class="comment">//=================================================================================================================</font>
+00475 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00476"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#b2">00476</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> CPSAttribMakerBinOp&lt;T&gt;::makeNPrivate(T *buf1,
+00477 T *buf2,
+00478 CPSLocated *loc,
+00479 uint32 startIndex,
+00480 <font class="keywordtype">void</font> *tab,
+00481 uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
+00482 uint32 numAttrib,
+00483 uint32 nbReplicate,
+00484 uint32 srcStep <font class="comment">/*= (1 &lt;&lt; 16)*/</font>
+00485 )<font class="keyword"> const</font>
+00486 <font class="keyword"></font>{
+00487 uint8 *dest = (uint8 *) tab;
+00488 uint leftToDo = numAttrib, toProcess;
+00489 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0] &amp;&amp; <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]);
+00490 <font class="keywordflow">switch</font> (_Op)
+00491 {
+00492 <font class="keywordflow">case</font> CPSBinOp::selectArg1:
+00493 <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;makeN(loc, startIndex, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, srcStep);
+00494 <font class="keywordflow">return</font>;
+00495 <font class="keywordflow">break</font>;
+00496 <font class="keywordflow">case</font> CPSBinOp::selectArg2:
+00497 <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;makeN(loc, startIndex, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, srcStep);
+00498 <font class="keywordflow">return</font>;
+00499 <font class="keywordflow">break</font>;
+00500 <font class="keywordflow">default</font>: <font class="keywordflow">break</font>;
+00501 }
+00502
+00503 <font class="keywordflow">while</font> (leftToDo)
+00504 {
+00505 toProcess = leftToDo &gt; <a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> ? <a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> : leftToDo;
+00506 T *src1 = (T *) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;make(loc, startIndex + (numAttrib - leftToDo), &amp;buf1[0], <font class="keyword">sizeof</font>(T), toProcess, <font class="keyword">true</font>, srcStep);
+00507 T *src2 = (T *) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;make(loc, startIndex + (numAttrib - leftToDo), &amp;buf2[0], <font class="keyword">sizeof</font>(T), toProcess, <font class="keyword">true</font>, srcStep);
+00508
+00509 <a class="code" href="namespaceNL3D.html#a400">MakeNPrivate</a>(dest, src1, src2, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, toProcess, <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n0">_Op</a>, nbReplicate);
+00510 leftToDo -= toProcess;
+00511 }
+00512 }
+00513
+00514 <font class="comment">//=================================================================================================================</font>
+00515 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00516"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_3">00516</a> <font class="keywordtype">void</font> CPSAttribMakerBinOp&lt;T&gt;::makeN(CPSLocated *loc,
+00517 uint32 startIndex,
+00518 <font class="keywordtype">void</font> *tab,
+00519 uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
+00520 uint32 numAttrib,
+00521 uint32 nbReplicate,
+00522 uint32 <font class="comment">/* srcStep = (1 &lt;&lt; 16)*/</font>
+00523 )<font class="keyword"> const</font>
+00524 <font class="keyword"></font>
+00525 <font class="keyword"></font>{
+00530 uint8 tab1[<a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> * <font class="keyword">sizeof</font>(T)];
+00531 uint8 tab2[<a class="code" href="namespaceNL3D.html#a187">PSBinOpBufSize</a> * <font class="keyword">sizeof</font>(T)];
+00532 <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#b2">makeNPrivate</a>((T *) &amp;tab1[0], (T *) &amp;tab2[0], loc, startIndex, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate);
+00533 }
+00534
+00535 <font class="comment">//=================================================================================================================</font>
+00536 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00537"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_4">00537</a> <font class="keywordtype">void</font> CPSAttribMakerBinOp&lt;T&gt;::serial (<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;f) <font class="keywordflow">throw</font>(NLMISC::EStream)
+00538 {
+00539 <font class="keywordflow">if</font> (f.isReading())
+00540 {
+00541 clean();
+00542 }
+00543 f.serialVersion(1);
+00544 f.serialEnum(_Op);
+00545 f.serialPolyPtr(_Arg[0]);
+00546 f.serialPolyPtr(_Arg[1]);
+00547 f.serial(_Size, _MaxSize);
+00548
+00549 }
+00550
+00551 <font class="comment">//=================================================================================================================</font>
+00552 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00553"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_5">00553</a> <font class="keywordtype">void</font> CPSAttribMakerBinOp&lt;T&gt;::deleteElement (uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>)
+00554 {
+00555 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;hasMemory()) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;deleteElement(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>);
+00556 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;hasMemory()) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;deleteElement(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>);
+00557 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n2">_Size</a> != 0);
+00558 --<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n2">_Size</a>;
+00559 }
+00560
+00561 <font class="comment">//=================================================================================================================</font>
+00562 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00563"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_6">00563</a> <font class="keywordtype">void</font> CPSAttribMakerBinOp&lt;T&gt;::newElement (CPSLocated *emitterLocated, uint32 emitterIndex)
+00564 {
+00565 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;hasMemory()) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;newElement(emitterLocated, emitterIndex);
+00566 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;hasMemory()) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;newElement(emitterLocated, emitterIndex);
+00567 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n2">_Size</a> != <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n3">_MaxSize</a>)
+00568 {
+00569 ++<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n2">_Size</a>;
+00570 }
+00571 }
+00572
+00573 <font class="comment">//=================================================================================================================</font>
+00574 <font class="keyword">template</font> &lt;<font class="keyword">class</font> T&gt;
+<a name="l00575"></a><a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#z711_7">00575</a> <font class="keywordtype">void</font> CPSAttribMakerBinOp&lt;T&gt;::resize (uint32 capacity, uint32 nbPresentElements)
+00576 {
+00577 <a class="code" href="debug_8h.html#a6">nlassert</a>(capacity &lt; (1 &lt;&lt; 16));
+00578 <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n3">_MaxSize</a> = capacity;
+00579 <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n2">_Size</a> = nbPresentElements;
+00580 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;hasMemory()) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[0]-&gt;resize(capacity, nbPresentElements);
+00581 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;hasMemory()) <a class="code" href="classNL3D_1_1CPSAttribMakerBinOp.html#n1">_Arg</a>[1]-&gt;resize(capacity, nbPresentElements);
+00582 }
+00583
+00584
+00585 } <font class="comment">// NL3D</font>
+00586
+00587
+00588 <font class="preprocessor">#endif // NL_PS_ATTRIB_MAKER_BIN_OP_INLINE_H</font>
+00589 <font class="preprocessor"></font>
+00590 <font class="comment">/* End of ps_attrib_maker_bin_op.h */</font>
+</pre></div>
+
+<!-- footer -->
+<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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>