aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a04587.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/doxygen/nel/a04587.html675
1 files changed, 675 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a04587.html b/docs/doxygen/nel/a04587.html
new file mode 100644
index 00000000..be2c2d3c
--- /dev/null
+++ b/docs/doxygen/nel/a04587.html
@@ -0,0 +1,675 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>NeL: mesh_mrm_skin_template.cpp File Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.6 -->
+<div class="qindex"> <form class="search" action="search.php" method="get">
+<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
+<h1>mesh_mrm_skin_template.cpp File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
+File not compiled. Included from <a class="el" href="a04586.html">mesh_mrm_skin.cpp</a>. It is a "old school" template.<p>
+<dl compact><dt><b>Id</b></dt><dd><a class="el" href="a04587.html">mesh_mrm_skin_template.cpp</a>,v 1.9 2003/12/10 12:47:33 berenguier Exp </dd></dl>
+
+<p>
+Definition in file <a class="el" href="a06010.html">mesh_mrm_skin_template.cpp</a>.
+<p>
+
+<p>
+<a href="a06010.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Defines</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04587.html#a3">NL3D_RAWSKIN_NORMAL_OFF</a>&nbsp;&nbsp;&nbsp;12</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04587.html#a0">NL3D_RAWSKIN_NORMAL_OFF</a>&nbsp;&nbsp;&nbsp;12</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04587.html#a4">NL3D_RAWSKIN_UV_OFF</a>&nbsp;&nbsp;&nbsp;24</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04587.html#a1">NL3D_RAWSKIN_UV_OFF</a>&nbsp;&nbsp;&nbsp;24</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04587.html#a5">NL3D_RAWSKIN_VERTEX_SIZE</a>&nbsp;&nbsp;&nbsp;32</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04587.html#a2">NL3D_RAWSKIN_VERTEX_SIZE</a>&nbsp;&nbsp;&nbsp;32</td></tr>
+
+<tr><td colspan=2><br><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04587.html#a6">applyArraySkinNormalT</a> (<a class="el" href="a04558.html#a15">uint</a> numMatrixes, <a class="el" href="a04558.html#a11">uint32</a> *infPtr, CMesh::CSkinWeight *srcSkinPtr, CVector *srcVertexPtr, CVector *srcNormalPtr, <a class="el" href="a04558.html#a15">uint</a> normalOff, <a class="el" href="a04558.html#a7">uint8</a> *destVertexPtr, vector&lt; CMatrix3x4 &gt; &amp;boneMat3x4, <a class="el" href="a04558.html#a15">uint</a> vertexSize, <a class="el" href="a04558.html#a15">uint</a> nInf)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a04587.html#a7">applyArraySkinTangentSpaceT</a> (<a class="el" href="a04558.html#a15">uint</a> numMatrixes, <a class="el" href="a04558.html#a11">uint32</a> *infPtr, CMesh::CSkinWeight *srcSkinPtr, CVector *srcVertexPtr, CVector *srcNormalPtr, CVector *tgSpacePtr, <a class="el" href="a04558.html#a15">uint</a> normalOff, <a class="el" href="a04558.html#a15">uint</a> tgSpaceOff, <a class="el" href="a04558.html#a7">uint8</a> *destVertexPtr, vector&lt; CMatrix3x4 &gt; &amp;boneMat3x4, <a class="el" href="a04558.html#a15">uint</a> vertexSize, <a class="el" href="a04558.html#a15">uint</a> nInf)</td></tr>
+
+</table>
+<hr><h2>Define Documentation</h2>
+<a class="anchor" name="a3" doxytag="mesh_mrm_skin_template.cpp::NL3D_RAWSKIN_NORMAL_OFF" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> #define NL3D_RAWSKIN_NORMAL_OFF&nbsp;&nbsp;&nbsp;12
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06010.html#l00482">482</a> of file <a class="el" href="a06010.html">mesh_mrm_skin_template.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="a0" doxytag="mesh_mrm_skin_template.cpp::NL3D_RAWSKIN_NORMAL_OFF" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> #define NL3D_RAWSKIN_NORMAL_OFF&nbsp;&nbsp;&nbsp;12
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06010.html#l00482">482</a> of file <a class="el" href="a06010.html">mesh_mrm_skin_template.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="a4" doxytag="mesh_mrm_skin_template.cpp::NL3D_RAWSKIN_UV_OFF" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> #define NL3D_RAWSKIN_UV_OFF&nbsp;&nbsp;&nbsp;24
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06010.html#l00483">483</a> of file <a class="el" href="a06010.html">mesh_mrm_skin_template.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="a1" doxytag="mesh_mrm_skin_template.cpp::NL3D_RAWSKIN_UV_OFF" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> #define NL3D_RAWSKIN_UV_OFF&nbsp;&nbsp;&nbsp;24
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06010.html#l00483">483</a> of file <a class="el" href="a06010.html">mesh_mrm_skin_template.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="a5" doxytag="mesh_mrm_skin_template.cpp::NL3D_RAWSKIN_VERTEX_SIZE" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> #define NL3D_RAWSKIN_VERTEX_SIZE&nbsp;&nbsp;&nbsp;32
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06010.html#l00484">484</a> of file <a class="el" href="a06010.html">mesh_mrm_skin_template.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="a2" doxytag="mesh_mrm_skin_template.cpp::NL3D_RAWSKIN_VERTEX_SIZE" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> #define NL3D_RAWSKIN_VERTEX_SIZE&nbsp;&nbsp;&nbsp;32
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06010.html#l00484">484</a> of file <a class="el" href="a06010.html">mesh_mrm_skin_template.cpp</a>. </td>
+ </tr>
+</table>
+<hr><h2>Function Documentation</h2>
+<a class="anchor" name="a6" doxytag="mesh_mrm_skin_template.cpp::applyArraySkinNormalT" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void applyArraySkinNormalT </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>numMatrixes</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>infPtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>CMesh::CSkinWeight *&nbsp;</td>
+ <td class="mdname" nowrap> <em>srcSkinPtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>CVector *&nbsp;</td>
+ <td class="mdname" nowrap> <em>srcVertexPtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>CVector *&nbsp;</td>
+ <td class="mdname" nowrap> <em>srcNormalPtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>normalOff</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>destVertexPtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>vector&lt; CMatrix3x4 &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>boneMat3x4</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>vertexSize</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>nInf</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06010.html#l00036">36</a> of file <a class="el" href="a06010.html">mesh_mrm_skin_template.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00039 {
+00040 <span class="comment">/* Prefetch all vertex/normal before, it is to be faster.</span>
+00041 <span class="comment"> */</span>
+00042 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
+00043 <span class="preprocessor"></span> {
+00044 <a class="code" href="a04558.html#a15">uint</a> nInfTmp= nInf;
+00045 <a class="code" href="a04558.html#a11">uint32</a> *infTmpPtr= infPtr;
+00046 <span class="keywordflow">for</span>(;nInfTmp&gt;0;nInfTmp--, infTmpPtr++)
+00047 {
+00048 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a>= *infTmpPtr;
+00049 CMesh::CSkinWeight *srcSkin= srcSkinPtr + <a class="code" href="a04223.html#a566">index</a>;
+00050 CVector *srcVertex= srcVertexPtr + <a class="code" href="a04223.html#a566">index</a>;
+00051 CVector *srcNormal= srcNormalPtr + <a class="code" href="a04223.html#a566">index</a>;
+00052
+00053 __asm
+00054 {
+00055 mov eax, srcSkin
+00056 mov ebx, srcVertex
+00057 mov ecx, srcNormal
+00058 mov edx, [eax]
+00059 mov edx, [ebx]
+00060 mov edx, [ecx]
+00061 }
+00062
+00063 }
+00064 }
+00065 <span class="preprocessor">#endif</span>
+00066 <span class="preprocessor"></span>
+00067 <span class="comment">// Process vertices.</span>
+00068 <span class="keywordflow">switch</span>(numMatrixes)
+00069 {
+00070 <span class="comment">//=========</span>
+00071 <span class="keywordflow">case</span> 0:
+00072 <span class="comment">// Special case for Vertices influenced by one matrix. Just copy result of mul.</span>
+00073 <span class="comment">// for all InfluencedVertices only.</span>
+00074 <span class="keywordflow">for</span>(;nInf&gt;0;nInf--, infPtr++)
+00075 {
+00076 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a>= *infPtr;
+00077 CMesh::CSkinWeight *srcSkin= srcSkinPtr + <a class="code" href="a04223.html#a566">index</a>;
+00078 CVector *srcVertex= srcVertexPtr + <a class="code" href="a04223.html#a566">index</a>;
+00079 CVector *srcNormal= srcNormalPtr + <a class="code" href="a04223.html#a566">index</a>;
+00080 <a class="code" href="a04558.html#a7">uint8</a> *dstVertexVB= destVertexPtr + <a class="code" href="a04223.html#a566">index</a> * vertexSize;
+00081 CVector *dstVertex= (CVector*)(dstVertexVB);
+00082 CVector *dstNormal= (CVector*)(dstVertexVB + normalOff);
+00083
+00084
+00085 <span class="comment">// Vertex.</span>
+00086 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetPoint( *srcVertex, *dstVertex);
+00087 <span class="comment">// Normal.</span>
+00088 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcNormal, *dstNormal);
+00089 }
+00090 <span class="keywordflow">break</span>;
+00091
+00092 <span class="comment">//=========</span>
+00093 <span class="keywordflow">case</span> 1:
+00094 <span class="comment">// for all InfluencedVertices only.</span>
+00095 <span class="keywordflow">for</span>(;nInf&gt;0;nInf--, infPtr++)
+00096 {
+00097 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a>= *infPtr;
+00098 CMesh::CSkinWeight *srcSkin= srcSkinPtr + <a class="code" href="a04223.html#a566">index</a>;
+00099 CVector *srcVertex= srcVertexPtr + <a class="code" href="a04223.html#a566">index</a>;
+00100 CVector *srcNormal= srcNormalPtr + <a class="code" href="a04223.html#a566">index</a>;
+00101 <a class="code" href="a04558.html#a7">uint8</a> *dstVertexVB= destVertexPtr + <a class="code" href="a04223.html#a566">index</a> * vertexSize;
+00102 CVector *dstVertex= (CVector*)(dstVertexVB);
+00103 CVector *dstNormal= (CVector*)(dstVertexVB + normalOff);
+00104
+00105
+00106 <span class="comment">// Vertex.</span>
+00107 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetPoint( *srcVertex, srcSkin-&gt;Weights[0], *dstVertex);
+00108 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[1], *dstVertex);
+00109 <span class="comment">// Normal.</span>
+00110 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcNormal, srcSkin-&gt;Weights[0], *dstNormal);
+00111 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[1], *dstNormal);
+00112 }
+00113 <span class="keywordflow">break</span>;
+00114
+00115 <span class="comment">//=========</span>
+00116 <span class="keywordflow">case</span> 2:
+00117 <span class="comment">// for all InfluencedVertices only.</span>
+00118 <span class="keywordflow">for</span>(;nInf&gt;0;nInf--, infPtr++)
+00119 {
+00120 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a>= *infPtr;
+00121 CMesh::CSkinWeight *srcSkin= srcSkinPtr + <a class="code" href="a04223.html#a566">index</a>;
+00122 CVector *srcVertex= srcVertexPtr + <a class="code" href="a04223.html#a566">index</a>;
+00123 CVector *srcNormal= srcNormalPtr + <a class="code" href="a04223.html#a566">index</a>;
+00124 <a class="code" href="a04558.html#a7">uint8</a> *dstVertexVB= destVertexPtr + <a class="code" href="a04223.html#a566">index</a> * vertexSize;
+00125 CVector *dstVertex= (CVector*)(dstVertexVB);
+00126 CVector *dstNormal= (CVector*)(dstVertexVB + normalOff);
+00127
+00128
+00129 <span class="comment">// Vertex.</span>
+00130 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetPoint( *srcVertex, srcSkin-&gt;Weights[0], *dstVertex);
+00131 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[1], *dstVertex);
+00132 boneMat3x4[ srcSkin-&gt;MatrixId[2] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[2], *dstVertex);
+00133 <span class="comment">// Normal.</span>
+00134 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcNormal, srcSkin-&gt;Weights[0], *dstNormal);
+00135 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[1], *dstNormal);
+00136 boneMat3x4[ srcSkin-&gt;MatrixId[2] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[2], *dstNormal);
+00137 }
+00138 <span class="keywordflow">break</span>;
+00139
+00140 <span class="comment">//=========</span>
+00141 <span class="keywordflow">case</span> 3:
+00142 <span class="comment">// for all InfluencedVertices only.</span>
+00143 <span class="keywordflow">for</span>(;nInf&gt;0;nInf--, infPtr++)
+00144 {
+00145 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a>= *infPtr;
+00146 CMesh::CSkinWeight *srcSkin= srcSkinPtr + <a class="code" href="a04223.html#a566">index</a>;
+00147 CVector *srcVertex= srcVertexPtr + <a class="code" href="a04223.html#a566">index</a>;
+00148 CVector *srcNormal= srcNormalPtr + <a class="code" href="a04223.html#a566">index</a>;
+00149 <a class="code" href="a04558.html#a7">uint8</a> *dstVertexVB= destVertexPtr + <a class="code" href="a04223.html#a566">index</a> * vertexSize;
+00150 CVector *dstVertex= (CVector*)(dstVertexVB);
+00151 CVector *dstNormal= (CVector*)(dstVertexVB + normalOff);
+00152
+00153
+00154 <span class="comment">// Vertex.</span>
+00155 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetPoint( *srcVertex, srcSkin-&gt;Weights[0], *dstVertex);
+00156 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[1], *dstVertex);
+00157 boneMat3x4[ srcSkin-&gt;MatrixId[2] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[2], *dstVertex);
+00158 boneMat3x4[ srcSkin-&gt;MatrixId[3] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[3], *dstVertex);
+00159 <span class="comment">// Normal.</span>
+00160 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcNormal, srcSkin-&gt;Weights[0], *dstNormal);
+00161 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[1], *dstNormal);
+00162 boneMat3x4[ srcSkin-&gt;MatrixId[2] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[2], *dstNormal);
+00163 boneMat3x4[ srcSkin-&gt;MatrixId[3] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[3], *dstNormal);
+00164 }
+00165 <span class="keywordflow">break</span>;
+00166
+00167 }
+00168 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="a7" doxytag="mesh_mrm_skin_template.cpp::applyArraySkinTangentSpaceT" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void applyArraySkinTangentSpaceT </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>numMatrixes</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>infPtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>CMesh::CSkinWeight *&nbsp;</td>
+ <td class="mdname" nowrap> <em>srcSkinPtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>CVector *&nbsp;</td>
+ <td class="mdname" nowrap> <em>srcVertexPtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>CVector *&nbsp;</td>
+ <td class="mdname" nowrap> <em>srcNormalPtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>CVector *&nbsp;</td>
+ <td class="mdname" nowrap> <em>tgSpacePtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>normalOff</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tgSpaceOff</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>destVertexPtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>vector&lt; CMatrix3x4 &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>boneMat3x4</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>vertexSize</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>nInf</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06010.html#l00173">173</a> of file <a class="el" href="a06010.html">mesh_mrm_skin_template.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00176 {
+00177 <span class="comment">/* Prefetch all vertex/normal/tgSpace before, it is faster.</span>
+00178 <span class="comment"> */</span>
+00179 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
+00180 <span class="preprocessor"></span> {
+00181 <a class="code" href="a04558.html#a15">uint</a> nInfTmp= nInf;
+00182 <a class="code" href="a04558.html#a11">uint32</a> *infTmpPtr= infPtr;
+00183 <span class="keywordflow">for</span>(;nInfTmp&gt;0;nInfTmp--, infTmpPtr++)
+00184 {
+00185 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a>= *infTmpPtr;
+00186 CMesh::CSkinWeight *srcSkin= srcSkinPtr + <a class="code" href="a04223.html#a566">index</a>;
+00187 CVector *srcVertex= srcVertexPtr + <a class="code" href="a04223.html#a566">index</a>;
+00188 CVector *srcNormal= srcNormalPtr + <a class="code" href="a04223.html#a566">index</a>;
+00189 CVector *srcTgSpace= tgSpacePtr + <a class="code" href="a04223.html#a566">index</a>;
+00190
+00191 __asm
+00192 {
+00193 mov eax, srcSkin
+00194 mov ebx, srcVertex
+00195 mov ecx, srcNormal
+00196 mov esi, srcTgSpace
+00197 mov edx, [eax]
+00198 mov edx, [ebx]
+00199 mov edx, [ecx]
+00200 mov edx, [esi]
+00201 }
+00202
+00203 }
+00204 }
+00205 <span class="preprocessor">#endif</span>
+00206 <span class="preprocessor"></span>
+00207 <span class="comment">// Process vertices.</span>
+00208 <span class="keywordflow">switch</span>(numMatrixes)
+00209 {
+00210 <span class="comment">//=========</span>
+00211 <span class="keywordflow">case</span> 0:
+00212 <span class="comment">// Special case for Vertices influenced by one matrix. Just copy result of mul.</span>
+00213 <span class="comment">// for all InfluencedVertices only.</span>
+00214 <span class="keywordflow">for</span>(;nInf&gt;0;nInf--, infPtr++)
+00215 {
+00216 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a>= *infPtr;
+00217 CMesh::CSkinWeight *srcSkin= srcSkinPtr + <a class="code" href="a04223.html#a566">index</a>;
+00218 CVector *srcVertex= srcVertexPtr + <a class="code" href="a04223.html#a566">index</a>;
+00219 CVector *srcNormal= srcNormalPtr + <a class="code" href="a04223.html#a566">index</a>;
+00220 CVector *srcTgSpace= tgSpacePtr + <a class="code" href="a04223.html#a566">index</a>;
+00221 <span class="comment">//</span>
+00222 <a class="code" href="a04558.html#a7">uint8</a> *dstVertexVB= destVertexPtr + <a class="code" href="a04223.html#a566">index</a> * vertexSize;
+00223 CVector *dstVertex= (CVector*)(dstVertexVB);
+00224 CVector *dstNormal= (CVector*)(dstVertexVB + normalOff);
+00225 CVector *dstTgSpace= (CVector*)(dstVertexVB + tgSpaceOff);
+00226
+00227
+00228
+00229 <span class="comment">// Vertex.</span>
+00230 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetPoint( *srcVertex, *dstVertex);
+00231 <span class="comment">// Normal. </span>
+00232 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcNormal, *dstNormal);
+00233 <span class="comment">// Tg space</span>
+00234 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcTgSpace, *dstTgSpace);
+00235
+00236 }
+00237 <span class="keywordflow">break</span>;
+00238
+00239 <span class="comment">//=========</span>
+00240 <span class="keywordflow">case</span> 1:
+00241 <span class="comment">// for all InfluencedVertices only.</span>
+00242 <span class="keywordflow">for</span>(;nInf&gt;0;nInf--, infPtr++)
+00243 {
+00244 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a>= *infPtr;
+00245 CMesh::CSkinWeight *srcSkin= srcSkinPtr + <a class="code" href="a04223.html#a566">index</a>;
+00246 CVector *srcVertex= srcVertexPtr + <a class="code" href="a04223.html#a566">index</a>;
+00247 CVector *srcNormal= srcNormalPtr + <a class="code" href="a04223.html#a566">index</a>;
+00248 CVector *srcTgSpace= tgSpacePtr + <a class="code" href="a04223.html#a566">index</a>;
+00249 <span class="comment">//</span>
+00250 <a class="code" href="a04558.html#a7">uint8</a> *dstVertexVB= destVertexPtr + <a class="code" href="a04223.html#a566">index</a> * vertexSize;
+00251 CVector *dstVertex= (CVector*)(dstVertexVB);
+00252 CVector *dstNormal= (CVector*)(dstVertexVB + normalOff);
+00253 CVector *dstTgSpace= (CVector*)(dstVertexVB + tgSpaceOff);
+00254
+00255 <span class="comment">// Vertex.</span>
+00256 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetPoint( *srcVertex, srcSkin-&gt;Weights[0], *dstVertex);
+00257 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[1], *dstVertex);
+00258 <span class="comment">// Normal. </span>
+00259 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcNormal, srcSkin-&gt;Weights[0], *dstNormal);
+00260 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[1], *dstNormal);
+00261 <span class="comment">// Tg space</span>
+00262 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcTgSpace, srcSkin-&gt;Weights[0], *dstTgSpace);
+00263 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddVector( *srcTgSpace, srcSkin-&gt;Weights[1], *dstTgSpace);
+00264 }
+00265 <span class="keywordflow">break</span>;
+00266
+00267 <span class="comment">//=========</span>
+00268 <span class="keywordflow">case</span> 2:
+00269 <span class="comment">// for all InfluencedVertices only.</span>
+00270 <span class="keywordflow">for</span>(;nInf&gt;0;nInf--, infPtr++)
+00271 {
+00272 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a>= *infPtr;
+00273 CMesh::CSkinWeight *srcSkin= srcSkinPtr + <a class="code" href="a04223.html#a566">index</a>;
+00274 CVector *srcVertex= srcVertexPtr + <a class="code" href="a04223.html#a566">index</a>;
+00275 CVector *srcNormal= srcNormalPtr + <a class="code" href="a04223.html#a566">index</a>;
+00276 CVector *srcTgSpace= tgSpacePtr + <a class="code" href="a04223.html#a566">index</a>;
+00277 <span class="comment">//</span>
+00278 <a class="code" href="a04558.html#a7">uint8</a> *dstVertexVB= destVertexPtr + <a class="code" href="a04223.html#a566">index</a> * vertexSize;
+00279 CVector *dstVertex= (CVector*)(dstVertexVB);
+00280 CVector *dstNormal= (CVector*)(dstVertexVB + normalOff);
+00281 CVector *dstTgSpace= (CVector*)(dstVertexVB + tgSpaceOff);
+00282
+00283 <span class="comment">// Vertex.</span>
+00284 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetPoint( *srcVertex, srcSkin-&gt;Weights[0], *dstVertex);
+00285 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[1], *dstVertex);
+00286 boneMat3x4[ srcSkin-&gt;MatrixId[2] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[2], *dstVertex);
+00287 <span class="comment">// Normal. </span>
+00288 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcNormal, srcSkin-&gt;Weights[0], *dstNormal);
+00289 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[1], *dstNormal);
+00290 boneMat3x4[ srcSkin-&gt;MatrixId[2] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[2], *dstNormal);
+00291 <span class="comment">// Tg space</span>
+00292 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcTgSpace, srcSkin-&gt;Weights[0], *dstTgSpace);
+00293 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddVector( *srcTgSpace, srcSkin-&gt;Weights[1], *dstTgSpace);
+00294 boneMat3x4[ srcSkin-&gt;MatrixId[2] ].mulAddVector( *srcTgSpace, srcSkin-&gt;Weights[2], *dstTgSpace);
+00295 }
+00296 <span class="keywordflow">break</span>;
+00297
+00298 <span class="comment">//=========</span>
+00299 <span class="keywordflow">case</span> 3:
+00300 <span class="comment">// for all InfluencedVertices only.</span>
+00301 <span class="keywordflow">for</span>(;nInf&gt;0;nInf--, infPtr++)
+00302 {
+00303 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a>= *infPtr;
+00304 CMesh::CSkinWeight *srcSkin= srcSkinPtr + <a class="code" href="a04223.html#a566">index</a>;
+00305 CVector *srcVertex= srcVertexPtr + <a class="code" href="a04223.html#a566">index</a>;
+00306 CVector *srcNormal= srcNormalPtr + <a class="code" href="a04223.html#a566">index</a>;
+00307 CVector *srcTgSpace= tgSpacePtr + <a class="code" href="a04223.html#a566">index</a>;
+00308 <span class="comment">//</span>
+00309 <a class="code" href="a04558.html#a7">uint8</a> *dstVertexVB= destVertexPtr + <a class="code" href="a04223.html#a566">index</a> * vertexSize;
+00310 CVector *dstVertex= (CVector*)(dstVertexVB);
+00311 CVector *dstNormal= (CVector*)(dstVertexVB + normalOff);
+00312 CVector *dstTgSpace= (CVector*)(dstVertexVB + tgSpaceOff);
+00313
+00314 <span class="comment">// Vertex.</span>
+00315 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetPoint( *srcVertex, srcSkin-&gt;Weights[0], *dstVertex);
+00316 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[1], *dstVertex);
+00317 boneMat3x4[ srcSkin-&gt;MatrixId[2] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[2], *dstVertex);
+00318 boneMat3x4[ srcSkin-&gt;MatrixId[3] ].mulAddPoint( *srcVertex, srcSkin-&gt;Weights[3], *dstVertex);
+00319 <span class="comment">// Normal. </span>
+00320 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcNormal, srcSkin-&gt;Weights[0], *dstNormal);
+00321 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[1], *dstNormal);
+00322 boneMat3x4[ srcSkin-&gt;MatrixId[2] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[2], *dstNormal);
+00323 boneMat3x4[ srcSkin-&gt;MatrixId[3] ].mulAddVector( *srcNormal, srcSkin-&gt;Weights[3], *dstNormal);
+00324 <span class="comment">// Tg space</span>
+00325 boneMat3x4[ srcSkin-&gt;MatrixId[0] ].mulSetVector( *srcTgSpace, srcSkin-&gt;Weights[0], *dstTgSpace);
+00326 boneMat3x4[ srcSkin-&gt;MatrixId[1] ].mulAddVector( *srcTgSpace, srcSkin-&gt;Weights[1], *dstTgSpace);
+00327 boneMat3x4[ srcSkin-&gt;MatrixId[2] ].mulAddVector( *srcTgSpace, srcSkin-&gt;Weights[2], *dstTgSpace);
+00328 boneMat3x4[ srcSkin-&gt;MatrixId[3] ].mulAddVector( *srcTgSpace, srcSkin-&gt;Weights[3], *dstTgSpace);
+00329 }
+00330 <span class="keywordflow">break</span>;
+00331
+00332 }
+00333
+00334 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:42:59 2004 for NeL by
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
+</a>1.3.6 </small></address>
+</body>
+</html>