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/mesh_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/mesh_8h-source.html')
-rw-r--r-- | docs/doxygen/nel/mesh_8h-source.html | 699 |
1 files changed, 699 insertions, 0 deletions
diff --git a/docs/doxygen/nel/mesh_8h-source.html b/docs/doxygen/nel/mesh_8h-source.html new file mode 100644 index 00000000..f2a6ba20 --- /dev/null +++ b/docs/doxygen/nel/mesh_8h-source.html @@ -0,0 +1,699 @@ +<!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>mesh.h</h1><a href="mesh_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 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 <font class="preprocessor">#ifndef NL_MESH_H</font> +00027 <font class="preprocessor"></font><font class="preprocessor">#define NL_MESH_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="shape_8h.html">3d/shape.h</a>"</font> +00031 <font class="preprocessor">#include "<a class="code" href="driver_8h.html">3d/driver.h</a>"</font> +00032 <font class="preprocessor">#include "<a class="code" href="aabbox_8h.html">nel/misc/aabbox.h</a>"</font> +00033 <font class="preprocessor">#include "<a class="code" href="uv_8h.html">nel/misc/uv.h</a>"</font> +00034 <font class="preprocessor">#include "<a class="code" href="vertex__buffer_8h.html">3d/vertex_buffer.h</a>"</font> +00035 <font class="preprocessor">#include "<a class="code" href="vertex__buffer__hard_8h.html">3d/vertex_buffer_hard.h</a>"</font> +00036 <font class="preprocessor">#include "<a class="code" href="material_8h.html">3d/material.h</a>"</font> +00037 <font class="preprocessor">#include "<a class="code" href="3d_2primitive__block_8h.html">3d/primitive_block.h</a>"</font> +00038 <font class="preprocessor">#include "<a class="code" href="animated__material_8h.html">3d/animated_material.h</a>"</font> +00039 <font class="preprocessor">#include "<a class="code" href="mesh__base_8h.html">3d/mesh_base.h</a>"</font> +00040 <font class="preprocessor">#include "<a class="code" href="mesh__geom_8h.html">3d/mesh_geom.h</a>"</font> +00041 <font class="preprocessor">#include "<a class="code" href="mesh__morpher_8h.html">3d/mesh_morpher.h</a>"</font> +00042 <font class="preprocessor">#include "<a class="code" href="mesh__vertex__program_8h.html">3d/mesh_vertex_program.h</a>"</font> +00043 <font class="preprocessor">#include <set></font> +00044 <font class="preprocessor">#include <vector></font> +00045 +00046 +00047 <font class="keyword">namespace </font>NL3D +00048 { +00049 +00050 +00051 <font class="keyword">using</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a>; +00052 <font class="keyword">using</font> <a class="code" href="classNLMISC_1_1CPlane.html">NLMISC::CPlane</a>; +00053 <font class="keyword">using</font> <a class="code" href="classNLMISC_1_1CMatrix.html">NLMISC::CMatrix</a>; +00054 +00055 +00056 <font class="keyword">class </font>CMeshGeom; +00057 <font class="keyword">class </font>CSkeletonModel; +00058 <font class="keyword">class </font>CMatrix3x4; +00059 +00060 <font class="comment">// ***************************************************************************</font> +00061 <font class="comment">// Should be 4.</font> +<a name="l00062"></a><a class="code" href="mesh_8h.html#a0">00062</a> <font class="preprocessor">#define NL3D_MESH_SKINNING_MAX_MATRIX 4</font> +00063 <font class="preprocessor"></font> +00064 <font class="comment">// Above this distance, Mesh with a bigger Radius will use BBox clipping</font> +<a name="l00065"></a><a class="code" href="mesh_8h.html#a1">00065</a> <font class="preprocessor">#define NL3D_MESH_PRECISE_CLIP_THRESHOLD 5.0f</font> +00066 <font class="preprocessor"></font> +00067 +00068 <font class="comment">// ***************************************************************************</font> +<a name="l00076"></a><a class="code" href="classNL3D_1_1CMesh.html">00076</a> <font class="comment"></font><font class="keyword">class </font>CMesh : <font class="keyword">public</font> CMeshBase +00077 { +00078 <font class="keyword">public</font>: +00079 +00081 +00082 +<a name="l00084"></a><a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html">00084</a> <font class="keyword">struct </font>CCorner +00085 { +<a name="l00086"></a><a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m0">00086</a> <a class="code" href="types__nl_8h.html#a9">sint32</a> <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m0">Vertex</a>; +<a name="l00087"></a><a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m1">00087</a> CVector <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m1">Normal</a>; +<a name="l00088"></a><a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m2">00088</a> <a class="code" href="classNLMISC_1_1CUVW.html">NLMISC::CUVW</a> <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m2">Uvws</a>[CVertexBuffer::MaxStage]; +<a name="l00089"></a><a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m3">00089</a> CRGBA <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m3">Color</a>; +<a name="l00090"></a><a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m4">00090</a> CRGBA <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m4">Specular</a>; +00091 +00092 <font class="comment">// Setup all to 0, but Color (to white)... Important for good corner comparison.</font> +00093 <font class="comment">// This is slow but doesn't matter since used at mesh building....</font> +00094 <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#a0">CCorner</a>(); +00095 +00096 <font class="keywordtype">void</font> <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#a1">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f) <font class="keywordflow">throw</font>(NLMISC::EStream); +00097 }; +00098 +<a name="l00100"></a><a class="code" href="structNL3D_1_1CMesh_1_1CFace.html">00100</a> <font class="keyword">struct </font>CFace +00101 { +<a name="l00102"></a><a class="code" href="structNL3D_1_1CMesh_1_1CFace.html#m0">00102</a> CCorner <a class="code" href="structNL3D_1_1CMesh_1_1CFace.html#m0">Corner</a>[3]; +<a name="l00103"></a><a class="code" href="structNL3D_1_1CMesh_1_1CFace.html#m1">00103</a> <a class="code" href="types__nl_8h.html#a9">sint32</a> <a class="code" href="structNL3D_1_1CMesh_1_1CFace.html#m1">MaterialId</a>; +<a name="l00104"></a><a class="code" href="structNL3D_1_1CMesh_1_1CFace.html#m2">00104</a> <a class="code" href="types__nl_8h.html#a9">sint32</a> <a class="code" href="structNL3D_1_1CMesh_1_1CFace.html#m2">SmoothGroup</a>; +00105 <font class="keywordtype">void</font> <a class="code" href="structNL3D_1_1CMesh_1_1CFace.html#a0">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f) <font class="keywordflow">throw</font>(NLMISC::EStream); +00106 }; +00107 +00108 +<a name="l00112"></a><a class="code" href="structNL3D_1_1CMesh_1_1CSkinWeight.html">00112</a> <font class="keyword">struct </font>CSkinWeight +00113 { +<a name="l00115"></a><a class="code" href="structNL3D_1_1CMesh_1_1CSkinWeight.html#m0">00115</a> <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="structNL3D_1_1CMesh_1_1CSkinWeight.html#m0">MatrixId</a>[<a class="code" href="mesh_8h.html#a0">NL3D_MESH_SKINNING_MAX_MATRIX</a>]; +<a name="l00117"></a><a class="code" href="structNL3D_1_1CMesh_1_1CSkinWeight.html#m1">00117</a> <font class="keywordtype">float</font> <a class="code" href="structNL3D_1_1CMesh_1_1CSkinWeight.html#m1">Weights</a>[<a class="code" href="mesh_8h.html#a0">NL3D_MESH_SKINNING_MAX_MATRIX</a>]; +00118 +<a name="l00120"></a><a class="code" href="structNL3D_1_1CMesh_1_1CSkinWeight.html#a0">00120</a> <a class="code" href="structNL3D_1_1CMesh_1_1CSkinWeight.html#a0">CSkinWeight</a>() +00121 { +00122 <font class="keywordflow">for</font>(<a class="code" href="types__nl_8h.html#a14">uint</a> i=0;i<<a class="code" href="mesh_8h.html#a0">NL3D_MESH_SKINNING_MAX_MATRIX</a>;i++) +00123 { +00124 <a class="code" href="structNL3D_1_1CMesh_1_1CSkinWeight.html#m0">MatrixId</a>[i]=0; +00125 <a class="code" href="structNL3D_1_1CMesh_1_1CSkinWeight.html#m1">Weights</a>[i]=0; +00126 } +00127 } +00128 +00129 <font class="keywordtype">void</font> <a class="code" href="structNL3D_1_1CMesh_1_1CSkinWeight.html#a1">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f) <font class="keywordflow">throw</font>(NLMISC::EStream); +00130 }; +00131 +<a name="l00132"></a><a class="code" href="structNL3D_1_1CMesh_1_1CVertLink.html">00132</a> <font class="keyword">struct </font>CVertLink +00133 { +<a name="l00134"></a><a class="code" href="structNL3D_1_1CMesh_1_1CVertLink.html#m0">00134</a> <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="structNL3D_1_1CMesh_1_1CVertLink.html#m0">nFace</a>, <a class="code" href="structNL3D_1_1CMesh_1_1CVertLink.html#m1">nCorner</a>; +<a name="l00135"></a><a class="code" href="structNL3D_1_1CMesh_1_1CVertLink.html#m2">00135</a> <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="structNL3D_1_1CMesh_1_1CVertLink.html#m2">VertVB</a>; +00136 +<a name="l00137"></a><a class="code" href="structNL3D_1_1CMesh_1_1CVertLink.html#a0">00137</a> <a class="code" href="structNL3D_1_1CMesh_1_1CVertLink.html#a0">CVertLink</a> (<a class="code" href="types__nl_8h.html#a10">uint32</a> face, <a class="code" href="types__nl_8h.html#a10">uint32</a> corner, <a class="code" href="types__nl_8h.html#a10">uint32</a> iVB) +00138 { +00139 <a class="code" href="structNL3D_1_1CMesh_1_1CVertLink.html#m0">nFace</a> = face; +00140 <a class="code" href="structNL3D_1_1CMesh_1_1CVertLink.html#m1">nCorner</a> = corner; +00141 <a class="code" href="structNL3D_1_1CMesh_1_1CVertLink.html#m2">VertVB</a> = iVB; +00142 } +00143 }; +00144 +<a name="l00146"></a><a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html">00146</a> <font class="keyword">struct </font>CMeshBuild +00147 { +<a name="l00152"></a><a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m0">00152</a> <a class="code" href="types__nl_8h.html#a9">sint32</a> <a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m0">VertexFlags</a>; +<a name="l00153"></a><a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m1">00153</a> <a class="code" href="types__nl_8h.html#a6">uint8</a> <a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m1">NumCoords</a>[CVertexBuffer::MaxStage]; <font class="comment">// tells for each uvw if is uses 2 or 3 coords</font> +00154 +00155 <font class="comment">// Vertices array</font> +<a name="l00156"></a><a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m2">00156</a> std::vector<CVector> <a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m2">Vertices</a>; +00157 +00158 <font class="comment">// Palette Skinning Vertices array (same size as Vertices). NULL if no skinning.</font> +<a name="l00159"></a><a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m3">00159</a> std::vector<CSkinWeight> <a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m3">SkinWeights</a>; +00160 +00161 <font class="comment">// Bones name. Each matrix id used in SkinWeights must have a corresponding string in the bone name array.</font> +<a name="l00162"></a><a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m4">00162</a> std::vector<std::string> <a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m4">BonesNames</a>; +00163 +00164 <font class="comment">// Faces array</font> +<a name="l00165"></a><a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m5">00165</a> std::vector<CFace> <a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m5">Faces</a>; +00166 +00167 <font class="comment">// Blend shapes if some</font> +<a name="l00168"></a><a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m6">00168</a> std::vector<CBlendShape> <a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m6">BlendShapes</a>; +00169 +00170 <font class="comment">// Link between VB and max vertex indices</font> +<a name="l00171"></a><a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m7">00171</a> std::vector<CVertLink> <a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m7">VertLink</a>; <font class="comment">// Filled when called build</font> +00172 +00173 <font class="comment">// MeshVertexProgram to copy to meshGeom.</font> +<a name="l00174"></a><a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m8">00174</a> <a class="code" href="classNLMISC_1_1CSmartPtr.html">NLMISC::CSmartPtr<IMeshVertexProgram></a> <a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#m8">MeshVertexProgram</a>; +00175 +00176 +00177 <a class="code" href="structNL3D_1_1CMesh_1_1CMeshBuild.html#a0">CMeshBuild</a>(); +00178 +00179 <font class="comment">// Serialization</font> +00180 <font class="comment">//void serial(NLMISC::IStream &f) throw(NLMISC::EStream);</font> +00181 +00182 }; +00184 +00185 +00186 <font class="keyword">public</font>: +00188 <a class="code" href="classNL3D_1_1CMesh.html#a0">CMesh</a>(); +00190 <a class="code" href="classNL3D_1_1CMesh.html#a1">~CMesh</a>(); +00191 <a class="code" href="classNL3D_1_1CMesh.html#a0">CMesh</a>(<font class="keyword">const</font> <a class="code" href="classNL3D_1_1CMesh.html#a0">CMesh</a> &mesh); +00192 <a class="code" href="classNL3D_1_1CMesh.html#a0">CMesh</a> &<a class="code" href="classNL3D_1_1CMesh.html#a3">operator=</a>(<font class="keyword">const</font> <a class="code" href="classNL3D_1_1CMesh.html#a0">CMesh</a> &mesh); +00193 +00194 +00196 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMesh.html#a4">build</a>(CMeshBase::CMeshBaseBuild &mbase, CMeshBuild &mbuild); +00197 +00198 +00200 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMesh.html#a4">build</a>(CMeshBase::CMeshBaseBuild &mbuild, CMeshGeom &meshGeom); +00201 +00202 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMesh.html#a6">setBlendShapes</a>(std::vector<CBlendShape>&bs); +00203 +00205 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMesh.html#a7">computeBonesId</a> (CSkeletonModel *skeleton); +00206 +00208 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMesh.html#a8">updateSkeletonUsage</a>(CSkeletonModel *sm, <font class="keywordtype">bool</font> increment); +00209 +00211 <font class="comment">// @{</font> +00212 +00214 <font class="keyword">virtual</font> CTransformShape *<a class="code" href="classNL3D_1_1CMesh.html#z541_0">createInstance</a>(CScene &scene); +00215 +00217 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMesh.html#z541_1">clip</a>(<font class="keyword">const</font> std::vector<CPlane> &pyramid, <font class="keyword">const</font> CMatrix &worldMatrix) ; +00218 +00220 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMesh.html#z541_2">render</a>(IDriver *drv, CTransformShape *trans, <font class="keywordtype">bool</font> opaquePass); +00221 +00223 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMesh.html#z541_3">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f) <font class="keywordflow">throw</font>(NLMISC::EStream); +00224 <a class="code" href="classNL3D_1_1CMesh.html#z541_4">NLMISC_DECLARE_CLASS</a>(<a class="code" href="classNL3D_1_1CMesh.html#a0">CMesh</a>); +00225 +00227 <font class="keyword">virtual</font> <font class="keywordtype">float</font> <a class="code" href="classNL3D_1_1CMesh.html#z541_5">getNumTriangles</a> (<font class="keywordtype">float</font> distance); +00228 +<a name="l00230"></a><a class="code" href="classNL3D_1_1CMesh.html#z541_6">00230</a> <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMesh.html#z541_6">getAABBox</a>(<a class="code" href="classNLMISC_1_1CAABBox.html">NLMISC::CAABBox</a> &bbox)<font class="keyword"> const </font>{bbox= <a class="code" href="classNL3D_1_1CMesh.html#z542_0">getBoundingBox</a>().<a class="code" href="classNLMISC_1_1CAABBoxExt.html#z261_6">getAABBox</a>();} +00231 +00232 <font class="comment">// @}</font> +00233 +00235 <font class="comment">// @{</font> +00236 +00238 <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CAABBoxExt.html">NLMISC::CAABBoxExt</a>& <a class="code" href="classNL3D_1_1CMesh.html#z542_0">getBoundingBox</a>() <font class="keyword">const</font>; +00239 +00241 <font class="keyword">const</font> CVertexBuffer &<a class="code" href="classNL3D_1_1CMesh.html#z542_1">getVertexBuffer</a>() <font class="keyword">const</font>; +00242 +00244 <a class="code" href="types__nl_8h.html#a14">uint</a> <a class="code" href="classNL3D_1_1CMesh.html#z542_2">getNbMatrixBlock</a>() <font class="keyword">const</font>; +00245 +00249 <a class="code" href="types__nl_8h.html#a14">uint</a> <a class="code" href="classNL3D_1_1CMesh.html#z542_3">getNbRdrPass</a>(<a class="code" href="types__nl_8h.html#a14">uint</a> matrixBlockIndex) <font class="keyword">const</font>; +00250 +00255 <font class="keyword">const</font> CPrimitiveBlock &<a class="code" href="classNL3D_1_1CMesh.html#z542_4">getRdrPassPrimitiveBlock</a>(<a class="code" href="types__nl_8h.html#a14">uint</a> matrixBlockIndex, <a class="code" href="types__nl_8h.html#a14">uint</a> renderingPassIndex) <font class="keyword">const</font>; +00256 +00261 <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="classNL3D_1_1CMesh.html#z542_5">getRdrPassMaterial</a>(<a class="code" href="types__nl_8h.html#a14">uint</a> matrixBlockIndex, <a class="code" href="types__nl_8h.html#a14">uint</a> renderingPassIndex) <font class="keyword">const</font>; +00262 +00264 <font class="keyword">const</font> CMeshGeom &<a class="code" href="classNL3D_1_1CMesh.html#z542_6">getMeshGeom</a> () <font class="keyword">const</font>; +00265 +00266 <font class="comment">// @}</font> +00267 +00268 +00270 <font class="comment">// @{</font> +00271 <font class="keyword">virtual</font> IMeshGeom *<a class="code" href="classNL3D_1_1CMesh.html#z543_0">supportMeshBlockRendering</a> (CTransformShape *trans, <font class="keywordtype">float</font> &polygonCount ) <font class="keyword">const</font>; +00272 <font class="comment">// @}</font> +00273 +00274 <font class="keyword">private</font>: +00275 +00276 <font class="comment">// The geometry.</font> +<a name="l00277"></a><a class="code" href="classNL3D_1_1CMesh.html#o0">00277</a> CMeshGeom *<a class="code" href="classNL3D_1_1CMesh.html#o0">_MeshGeom</a>; +00278 }; +00279 +00280 +00281 +00282 +00283 <font class="comment">// ***************************************************************************</font> +<a name="l00291"></a><a class="code" href="classNL3D_1_1CMeshGeom.html">00291</a> <font class="comment"></font><font class="keyword">class </font>CMeshGeom: <font class="keyword">public</font> IMeshGeom +00292 { +00293 <font class="keyword">public</font>: +00294 +00296 <a class="code" href="classNL3D_1_1CMeshGeom.html#a0">CMeshGeom</a>(); +00297 <font class="keyword">virtual</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#a1">~CMeshGeom</a>(); +00298 +00300 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#a2">build</a>(CMesh::CMeshBuild &mbuild, <a class="code" href="types__nl_8h.html#a14">uint</a> numMaxMaterial); +00301 +00302 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#a3">setBlendShapes</a>(std::vector<CBlendShape>&bs); +00303 +00304 +00306 <font class="comment">// @{</font> +00307 +00309 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z544_0">initInstance</a>(CMeshBaseInstance *mbi); +00310 +00312 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z544_1">clip</a>(<font class="keyword">const</font> std::vector<CPlane> &pyramid, <font class="keyword">const</font> CMatrix &worldMatrix) ; +00313 +00315 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z544_2">render</a>(IDriver *drv, CTransformShape *trans, <font class="keywordtype">float</font> polygonCount, <a class="code" href="types__nl_8h.html#a10">uint32</a> rdrFlags, <font class="keywordtype">float</font> globalAlpha); +00316 +00318 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z544_3">renderSkin</a>(CTransformShape *trans, <font class="keywordtype">float</font> alphaMRM); +00319 +00320 <font class="comment">// get an approximation of the number of triangles this instance will render for a fixed distance.</font> +00321 <font class="keyword">virtual</font> <font class="keywordtype">float</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z544_4">getNumTriangles</a> (<font class="keywordtype">float</font> distance); +00322 +00324 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z544_5">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f) <font class="keywordflow">throw</font>(NLMISC::EStream); +00325 <a class="code" href="classNL3D_1_1CMeshGeom.html#z544_6">NLMISC_DECLARE_CLASS</a>(<a class="code" href="classNL3D_1_1CMeshGeom.html#a0">CMeshGeom</a>); +00326 +00327 <font class="comment">// @}</font> +00328 +00329 +00331 <font class="comment">// @{</font> +00332 +<a name="l00334"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z545_0">00334</a> <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CAABBoxExt.html">NLMISC::CAABBoxExt</a>& <a class="code" href="classNL3D_1_1CMeshGeom.html#z545_0">getBoundingBox</a>()<font class="keyword"> const</font> +00335 <font class="keyword"> </font>{ +00336 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o6">_BBox</a>; +00337 } +00338 +<a name="l00340"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z545_1">00340</a> <font class="keyword">const</font> CVertexBuffer &<a class="code" href="classNL3D_1_1CMeshGeom.html#z545_1">getVertexBuffer</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o3">_VBuffer</a> ; } +00341 +<a name="l00343"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z545_2">00343</a> <a class="code" href="types__nl_8h.html#a14">uint</a> <a class="code" href="classNL3D_1_1CMeshGeom.html#z545_2">getNbMatrixBlock</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o5">_MatrixBlocks</a>.size() ; } +00344 +<a name="l00348"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z545_3">00348</a> <a class="code" href="types__nl_8h.html#a14">uint</a> <a class="code" href="classNL3D_1_1CMeshGeom.html#z545_3">getNbRdrPass</a>(<a class="code" href="types__nl_8h.html#a14">uint</a> matrixBlockIndex)<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o5">_MatrixBlocks</a>[matrixBlockIndex].RdrPass.size() ; } +00349 +<a name="l00354"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z545_4">00354</a> <font class="keyword">const</font> CPrimitiveBlock &<a class="code" href="classNL3D_1_1CMeshGeom.html#z545_4">getRdrPassPrimitiveBlock</a>(<a class="code" href="types__nl_8h.html#a14">uint</a> matrixBlockIndex, <a class="code" href="types__nl_8h.html#a14">uint</a> renderingPassIndex)<font class="keyword"> const</font> +00355 <font class="keyword"> </font>{ +00356 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o5">_MatrixBlocks</a>[matrixBlockIndex].RdrPass[renderingPassIndex].PBlock ; +00357 } +00358 +<a name="l00363"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z545_5">00363</a> <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="classNL3D_1_1CMeshGeom.html#z545_5">getRdrPassMaterial</a>(<a class="code" href="types__nl_8h.html#a14">uint</a> matrixBlockIndex, <a class="code" href="types__nl_8h.html#a14">uint</a> renderingPassIndex)<font class="keyword"> const</font> +00364 <font class="keyword"> </font>{ +00365 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o5">_MatrixBlocks</a>[matrixBlockIndex].RdrPass[renderingPassIndex].MaterialId ; +00366 } +00367 +00368 <font class="comment">// @}</font> +00369 +00370 +00372 <font class="comment">// @{</font> +00373 +<a name="l00375"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z546_0">00375</a> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z546_0">isSkinned</a> ()<font class="keyword"> const</font> +00376 <font class="keyword"> </font>{ +00377 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o7">_Skinned</a>; +00378 } +00379 +00381 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z546_1">computeBonesId</a> (CSkeletonModel *skeleton); +00382 +00384 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z546_2">updateSkeletonUsage</a>(CSkeletonModel *sm, <font class="keywordtype">bool</font> increment); +00385 +<a name="l00387"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z546_3">00387</a> <font class="keyword">const</font> std::vector<sint32> &<a class="code" href="classNL3D_1_1CMeshGeom.html#z546_3">getSkinBoneUsage</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o12">_BonesId</a>;} +00388 +00389 <font class="comment">// @}</font> +00390 +00391 +00399 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#a4">renderSimpleWithMaterial</a>(IDriver *drv, <font class="keyword">const</font> CMatrix &worldMatrix, CMaterial &mat); +00400 +00401 +00402 +00404 <font class="comment">// @{</font> +00405 +00409 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z547_0">supportMeshBlockRendering</a> () <font class="keyword">const</font>; +00410 +00411 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z547_1">sortPerMaterial</a>() <font class="keyword">const</font>; +00412 <font class="keyword">virtual</font> <a class="code" href="types__nl_8h.html#a14">uint</a> <a class="code" href="classNL3D_1_1CMeshGeom.html#z547_2">getNumRdrPasses</a>() <font class="keyword">const</font> ; +00413 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z547_3">beginMesh</a>(CMeshGeomRenderContext &rdrCtx) ; +00414 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z547_4">activeInstance</a>(CMeshGeomRenderContext &rdrCtx, CMeshBaseInstance *inst, <font class="keywordtype">float</font> polygonCount) ; +00415 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z547_5">renderPass</a>(CMeshGeomRenderContext &rdrCtx, CMeshBaseInstance *inst, <font class="keywordtype">float</font> polygonCount, <a class="code" href="types__nl_8h.html#a14">uint</a> rdrPass) ; +00416 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z547_6">endMesh</a>(CMeshGeomRenderContext &rdrCtx) ; +00417 +00418 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z547_7">getVBHeapInfo</a>(<a class="code" href="types__nl_8h.html#a14">uint</a> &vertexFormat, <a class="code" href="types__nl_8h.html#a14">uint</a> &numVertices); +00419 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z547_8">computeMeshVBHeap</a>(<font class="keywordtype">void</font> *dst, <a class="code" href="types__nl_8h.html#a14">uint</a> indexStart); +00420 +00421 <font class="comment">// @}</font> +00422 +00423 +00424 <font class="comment">// ************************</font> +00425 <font class="keyword">private</font>: +00426 +<a name="l00428"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CRdrPass.html">00428</a> <font class="keyword">class </font>CRdrPass +00429 { +00430 <font class="keyword">public</font>: +00431 <font class="comment">// The id of this material.</font> +<a name="l00432"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CRdrPass.html#m0">00432</a> <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="classNL3D_1_1CMeshGeom_1_1CRdrPass.html#m0">MaterialId</a>; +00433 <font class="comment">// The list of primitives.</font> +<a name="l00434"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CRdrPass.html#m1">00434</a> CPrimitiveBlock <a class="code" href="classNL3D_1_1CMeshGeom_1_1CRdrPass.html#m1">PBlock</a>; +00435 +00436 <font class="comment">// The same, shifted for VBHeap rendering.</font> +<a name="l00437"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CRdrPass.html#m2">00437</a> CPrimitiveBlock <a class="code" href="classNL3D_1_1CMeshGeom_1_1CRdrPass.html#m2">VBHeapPBlock</a>; +00438 +00439 +00440 <font class="comment">// Serialize a rdrpass.</font> +<a name="l00441"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CRdrPass.html#a0">00441</a> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom_1_1CRdrPass.html#a0">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f) +00442 { +00443 (void)f.<a class="code" href="classNLMISC_1_1IStream.html#a29">serialVersion</a>(0); +00444 +00445 f.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>(<a class="code" href="classNL3D_1_1CMeshGeom_1_1CRdrPass.html#m0">MaterialId</a>); +00446 f.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>(<a class="code" href="classNL3D_1_1CMeshGeom_1_1CRdrPass.html#m1">PBlock</a>); +00447 } +00448 }; +00449 +00450 +<a name="l00452"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html">00452</a> <font class="keyword">class </font>CMatrixBlock +00453 { +00454 <font class="keyword">public</font>: +<a name="l00456"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#m0">00456</a> <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#m0">MatrixId</a>[IDriver::MaxModelMatrix]; +<a name="l00458"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#m1">00458</a> <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#m1">NumMatrix</a>; +<a name="l00460"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#m2">00460</a> std::vector<CRdrPass> <a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#m2">RdrPass</a>; +00461 +<a name="l00462"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#a0">00462</a> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#a0">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f) +00463 { +00464 (void)f.<a class="code" href="classNLMISC_1_1IStream.html#a29">serialVersion</a>(0); +00465 +00466 <font class="comment">// Code written for IDriver::MaxModelMatrix==16 matrixs.</font> +00467 <a class="code" href="debug_8h.html#a6">nlassert</a>(IDriver::MaxModelMatrix == 16); +00468 <font class="keywordflow">for</font>(<a class="code" href="types__nl_8h.html#a14">uint</a> i=0;i<IDriver::MaxModelMatrix;i++) +00469 f.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>(<a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#m0">MatrixId</a>[i]); +00470 f.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>(<a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#m1">NumMatrix</a>); +00471 f.<a class="code" href="classNLMISC_1_1IStream.html#a7">serialCont</a>(<a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#m2">RdrPass</a>); +00472 } +00473 +00474 +00476 <a class="code" href="types__nl_8h.html#a13">sint</a> <a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlock.html#a1">getMatrixIdLocation</a>(<a class="code" href="types__nl_8h.html#a10">uint32</a> boneId) <font class="keyword">const</font>; +00477 }; +00478 +00479 +00480 <font class="keyword">private</font>: +<a name="l00486"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html">00486</a> <font class="keyword">struct </font>CCornerTmp : <font class="keyword">public</font> CMesh::CCorner +00487 { +<a name="l00488"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#m0">00488</a> CPaletteSkin <a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#m0">Palette</a>; +<a name="l00489"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#m1">00489</a> <font class="keywordtype">float</font> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#m1">Weights</a>[<a class="code" href="mesh_8h.html#a0">NL3D_MESH_SKINNING_MAX_MATRIX</a>]; +00490 +00491 <font class="comment">// The comparison.</font> +00492 <font class="keywordtype">bool</font> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#a0">operator<</a>(<font class="keyword">const</font> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#a1">CCornerTmp</a> &c) <font class="keyword">const</font>; +00493 <font class="comment">// The result of the compression.</font> +<a name="l00494"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#m2">00494</a> <font class="keyword">mutable</font> <a class="code" href="types__nl_8h.html#a13">sint</a> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#m2">VBId</a>; +00495 <font class="comment">// The flags to know what to compare.</font> +00496 <font class="keyword">static</font> <a class="code" href="types__nl_8h.html#a13">sint</a> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#p0">Flags</a>; +00497 +00498 <font class="comment">// Setup all to 0, but Color (to white)... Important for good corner comparison.</font> +00499 <font class="comment">// This is slow but doesn't matter since used at mesh building....</font> +<a name="l00500"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#a1">00500</a> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#a1">CCornerTmp</a>() +00501 { +00502 <a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#m2">VBId</a>= 0; +00503 <font class="keywordflow">for</font>(<a class="code" href="types__nl_8h.html#a13">sint</a> i=0;i<<a class="code" href="mesh_8h.html#a0">NL3D_MESH_SKINNING_MAX_MATRIX</a>;i++) +00504 { +00505 <a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#m0">Palette</a>.MatrixId[i]=0; +00506 <a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#m1">Weights</a>[i]=0; +00507 } +00508 } +00509 +00510 <font class="comment">// copy from corner.</font> +<a name="l00511"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#a2">00511</a> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#a1">CCornerTmp</a> &<a class="code" href="structNL3D_1_1CMeshGeom_1_1CCornerTmp.html#a2">operator=</a>(<font class="keyword">const</font> CMesh::CCorner &o) +00512 { +00513 <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m0">Vertex</a>= o.Vertex; +00514 <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m1">Normal</a>= o.Normal; +00515 <font class="keywordflow">for</font>(<a class="code" href="types__nl_8h.html#a13">sint</a> i=0;i<=CVertexBuffer::MaxStage;i++) +00516 { +00517 <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m2">Uvws</a>[i]= o.Uvws[i]; +00518 } +00519 <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m3">Color</a>= o.Color; +00520 <a class="code" href="structNL3D_1_1CMesh_1_1CCorner.html#m4">Specular</a>= o.Specular; +00521 +00522 <font class="keywordflow">return</font> *<font class="keyword">this</font>; +00523 } +00524 +00525 }; +00526 +00527 +<a name="l00530"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CBoneTmp.html">00530</a> <font class="keyword">struct </font>CBoneTmp +00531 { +00532 <font class="comment">// How many ref points on it? (NB: a corner may have multiple (up to 4) on it).</font> +<a name="l00533"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CBoneTmp.html#m0">00533</a> <a class="code" href="types__nl_8h.html#a14">uint</a> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CBoneTmp.html#m0">RefCount</a>; +00534 <font class="comment">// Am i inserted into the current matrixblock?</font> +<a name="l00535"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CBoneTmp.html#m1">00535</a> <font class="keywordtype">bool</font> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CBoneTmp.html#m1">Inserted</a>; +00536 <font class="comment">// If I am inserted into the current matrixblock, to which local bone (0-15) I am linked?</font> +<a name="l00537"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CBoneTmp.html#m2">00537</a> <a class="code" href="types__nl_8h.html#a14">uint</a> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CBoneTmp.html#m2">MatrixIdInMB</a>; +00538 +<a name="l00539"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CBoneTmp.html#a0">00539</a> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CBoneTmp.html#a0">CBoneTmp</a>() +00540 { +00541 <a class="code" href="structNL3D_1_1CMeshGeom_1_1CBoneTmp.html#m0">RefCount</a>= 0; +00542 <a class="code" href="structNL3D_1_1CMeshGeom_1_1CBoneTmp.html#m1">Inserted</a>=<font class="keyword">false</font>; +00543 } +00544 }; +00545 +00546 +<a name="l00549"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#u0">00549</a> <font class="keyword">typedef</font> std::map<uint, CBoneTmp> <a class="code" href="classNL3D_1_1CMeshGeom.html#u0">TBoneMap</a>; +<a name="l00550"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#u1">00550</a> <font class="keyword">typedef</font> TBoneMap::iterator <a class="code" href="classNL3D_1_1CMeshGeom.html#u1">ItBoneMap</a>; +00551 +00552 +<a name="l00555"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html">00555</a> <font class="keyword">struct </font>CFaceTmp +00556 { +<a name="l00557"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#m0">00557</a> CCornerTmp <a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#m0">Corner</a>[3]; +<a name="l00558"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#m1">00558</a> <a class="code" href="types__nl_8h.html#a14">uint</a> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#m1">MaterialId</a>; +00559 <font class="comment">// which matrixblock own this face. -1 <=> Not owned.</font> +<a name="l00560"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#m2">00560</a> <a class="code" href="types__nl_8h.html#a13">sint</a> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#m2">MatrixBlockId</a>; +00561 +<a name="l00562"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#a0">00562</a> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#a0">CFaceTmp</a>() +00563 { +00564 <a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#m2">MatrixBlockId</a>= -1; +00565 } +<a name="l00566"></a><a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#a1">00566</a> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#a0">CFaceTmp</a> &<a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#a1">operator=</a>(<font class="keyword">const</font> CMesh::CFace& o) +00567 { +00568 Corner[0]= o.Corner[0]; +00569 Corner[1]= o.Corner[1]; +00570 Corner[2]= o.Corner[2]; +00571 <a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#m1">MaterialId</a>= o.MaterialId; +00572 +00573 <font class="keywordflow">return</font> *<font class="keyword">this</font>; +00574 } +00575 +00576 +00577 <font class="keywordtype">void</font> <a class="code" href="structNL3D_1_1CMeshGeom_1_1CFaceTmp.html#a2">buildBoneUse</a>(std::vector<uint> &boneUse, std::vector<CMesh::CSkinWeight> &skinWeights); +00578 +00579 }; +00580 +00581 +<a name="l00584"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlockRemap.html">00584</a> <font class="keyword">class </font>CMatrixBlockRemap +00585 { +00586 <font class="keyword">public</font>: +<a name="l00587"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlockRemap.html#m0">00587</a> <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="classNL3D_1_1CMeshGeom_1_1CMatrixBlockRemap.html#m0">Remap</a>[IDriver::MaxModelMatrix]; +00588 }; +00589 +00590 +00591 <font class="keyword">private</font>: +<a name="l00595"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o0">00595</a> std::vector<CVector> <a class="code" href="classNL3D_1_1CMeshGeom.html#o0">_OriginalSkinVertices</a>; +<a name="l00596"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o1">00596</a> std::vector<CVector> <a class="code" href="classNL3D_1_1CMeshGeom.html#o1">_OriginalSkinNormals</a>; +<a name="l00597"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o2">00597</a> std::vector<CVector> <a class="code" href="classNL3D_1_1CMeshGeom.html#o2">_OriginalTGSpace</a>; +00598 +<a name="l00600"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o3">00600</a> CVertexBuffer <a class="code" href="classNL3D_1_1CMeshGeom.html#o3">_VBuffer</a>; +<a name="l00602"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o4">00602</a> CVertexBuffer <a class="code" href="classNL3D_1_1CMeshGeom.html#o4">_VBufferOri</a>; +<a name="l00604"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o5">00604</a> std::vector<CMatrixBlock> <a class="code" href="classNL3D_1_1CMeshGeom.html#o5">_MatrixBlocks</a>; +<a name="l00606"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o6">00606</a> <a class="code" href="classNLMISC_1_1CAABBoxExt.html">NLMISC::CAABBoxExt</a> <a class="code" href="classNL3D_1_1CMeshGeom.html#o6">_BBox</a>; +<a name="l00608"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o7">00608</a> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o7">_Skinned</a>; +<a name="l00610"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o8">00610</a> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o8">_OriginalSkinRestored</a>; +00611 +<a name="l00613"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o9">00613</a> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o9">_BoneIdComputed</a>; +<a name="l00615"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o10">00615</a> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o10">_BoneIdExtended</a>; +00616 +<a name="l00618"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o11">00618</a> std::vector<std::string> <a class="code" href="classNL3D_1_1CMeshGeom.html#o11">_BonesName</a>; +<a name="l00620"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o12">00620</a> std::vector<sint32> <a class="code" href="classNL3D_1_1CMeshGeom.html#o12">_BonesId</a>; +<a name="l00622"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o13">00622</a> std::vector<sint32> <a class="code" href="classNL3D_1_1CMeshGeom.html#o13">_BonesIdExt</a>; +00623 +00624 +00626 <font class="comment">// @{</font> +<a name="l00628"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z548_1">00628</a> <font class="comment"> CRefPtr<IVertexBufferHard> _VertexBufferHard;</font> +<a name="l00630"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z548_2">00630</a> <font class="comment"> CRefPtr<IDriver> _Driver;</font> +<a name="l00632"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z548_3">00632</a> <font class="comment"> bool _VertexBufferHardDirty;</font> +00633 +00635 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z548_0">updateVertexBufferHard</a>(IDriver *drv); +00636 <font class="comment">// @}</font> +00637 +00638 +00640 <font class="comment">// @{</font> +<a name="l00642"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z549_0">00642</a> <font class="comment"> bool _SupportMeshBlockRendering;</font> +00643 <font class="comment">// @}</font> +00644 +<a name="l00646"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o14">00646</a> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#o14">_PreciseClipping</a>; +00647 +00648 <font class="comment">// The Mesh Morpher</font> +<a name="l00649"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o15">00649</a> CMeshMorpher *<a class="code" href="classNL3D_1_1CMeshGeom.html#o15">_MeshMorpher</a>; +00650 +00651 +00652 <font class="comment">// Possible MeshVertexProgram to apply at render()</font> +<a name="l00653"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#o16">00653</a> <a class="code" href="classNLMISC_1_1CSmartPtr.html">NLMISC::CSmartPtr<IMeshVertexProgram></a> <a class="code" href="classNL3D_1_1CMeshGeom.html#o16">_MeshVertexProgram</a>; +00654 +00655 +00656 <font class="keyword">private</font>: +00657 <font class="comment">// Locals, for build.</font> +<a name="l00658"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CCornerPred.html">00658</a> <font class="keyword">class </font>CCornerPred +00659 { +00660 <font class="keyword">public</font>: +<a name="l00661"></a><a class="code" href="classNL3D_1_1CMeshGeom_1_1CCornerPred.html#a0">00661</a> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CMeshGeom_1_1CCornerPred.html#a0">operator()</a>(<font class="keyword">const</font> CCornerTmp *<a class="code" href="driver__opengl__extension__def_8h.html#a242">x</a>, <font class="keyword">const</font> CCornerTmp *<a class="code" href="driver__opengl__extension__def_8h.html#a243">y</a>)<font class="keyword"> const</font> +00662 <font class="keyword"> </font>{ +00663 <font class="keywordflow">return</font> (*x<*y); +00664 } +00665 }; +<a name="l00666"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#u2">00666</a> <font class="keyword">typedef</font> std::set<CCornerTmp*, CCornerPred> <a class="code" href="classNL3D_1_1CMeshGeom.html#u2">TCornerSet</a>; +<a name="l00667"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#u3">00667</a> <font class="keyword">typedef</font> TCornerSet::iterator <a class="code" href="classNL3D_1_1CMeshGeom.html#u3">ItCornerSet</a>; +00668 +00669 <font class="comment">// Find and fill the VBuffer.</font> +<a name="l00670"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#c0">00670</a> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#c0">findVBId</a>(<a class="code" href="classNL3D_1_1CMeshGeom.html#u2">TCornerSet</a> &corners, <font class="keyword">const</font> CCornerTmp *corn, <a class="code" href="types__nl_8h.html#a13">sint</a> &currentVBIndex, <font class="keyword">const</font> CVector &vert, <font class="keyword">const</font> CMesh::CMeshBuild &mb) +00671 { +00672 <a class="code" href="classNL3D_1_1CMeshGeom.html#u3">ItCornerSet</a> it= corners.find(const_cast<CCornerTmp *>(corn)); +00673 <font class="keywordflow">if</font>(it!=corners.end()) +00674 corn->VBId= (*it)->VBId; +00675 <font class="keywordflow">else</font> +00676 { +00677 <font class="comment">// Add corner to the set to not insert same corner two times.</font> +00678 corners.insert (const_cast<CCornerTmp *>(corn)); +00679 <a class="code" href="types__nl_8h.html#a13">sint</a> i; +00680 corn->VBId= currentVBIndex++; +00681 <font class="comment">// Fill the VBuffer.</font> +00682 <a class="code" href="classNL3D_1_1CMeshGeom.html#o3">_VBuffer</a>.setNumVertices(currentVBIndex); +00683 <a class="code" href="types__nl_8h.html#a13">sint</a> <a class="code" href="driver__opengl__extension__def_8h.html#a234">id</a>= currentVBIndex-1; +00684 <font class="comment">// XYZ.</font> +00685 <a class="code" href="classNL3D_1_1CMeshGeom.html#o3">_VBuffer</a>.setVertexCoord(<a class="code" href="driver__opengl__extension__def_8h.html#a234">id</a>, vert); +00686 <font class="comment">// Normal</font> +00687 <font class="keywordflow">if</font>(CCornerTmp::Flags & CVertexBuffer::NormalFlag) +00688 <a class="code" href="classNL3D_1_1CMeshGeom.html#o3">_VBuffer</a>.setNormalCoord(<a class="code" href="driver__opengl__extension__def_8h.html#a234">id</a>, corn->Normal); +00689 <font class="comment">// Uvws.</font> +00690 <font class="keywordflow">for</font>(i=0;i<CVertexBuffer::MaxStage;i++) +00691 { +00692 <font class="keywordflow">if</font>(CCornerTmp::Flags & (CVertexBuffer::TexCoord0Flag<<i)) +00693 { +00694 <font class="keywordflow">switch</font>(mb.NumCoords[i]) +00695 { +00696 <font class="keywordflow">case</font> 2: +00697 <a class="code" href="classNL3D_1_1CMeshGeom.html#o3">_VBuffer</a>.setTexCoord(<a class="code" href="driver__opengl__extension__def_8h.html#a234">id</a>, i, corn->Uvws[i].U, corn->Uvws[i].V); +00698 <font class="keywordflow">break</font>; +00699 <font class="keywordflow">case</font> 3: +00700 <a class="code" href="classNL3D_1_1CMeshGeom.html#o3">_VBuffer</a>.setValueFloat3Ex((CVertexBuffer::TValue) (CVertexBuffer::TexCoord0 + i), <a class="code" href="driver__opengl__extension__def_8h.html#a234">id</a>, corn->Uvws[i].U, corn->Uvws[i].V, corn->Uvws[i].W); +00701 <font class="keywordflow">break</font>; +00702 <font class="keywordflow">default</font>: <font class="comment">// not supported</font> +00703 <a class="code" href="debug_8h.html#a6">nlassert</a>(0); +00704 <font class="keywordflow">break</font>; +00705 } +00706 } +00707 } +00708 <font class="comment">// Color.</font> +00709 <font class="keywordflow">if</font>(CCornerTmp::Flags & CVertexBuffer::PrimaryColorFlag) +00710 <a class="code" href="classNL3D_1_1CMeshGeom.html#o3">_VBuffer</a>.setColor(<a class="code" href="driver__opengl__extension__def_8h.html#a234">id</a>, corn->Color); +00711 <font class="comment">// Specular.</font> +00712 <font class="keywordflow">if</font>(CCornerTmp::Flags & CVertexBuffer::SecondaryColorFlag) +00713 <a class="code" href="classNL3D_1_1CMeshGeom.html#o3">_VBuffer</a>.setSpecular(<a class="code" href="driver__opengl__extension__def_8h.html#a234">id</a>, corn->Specular); +00714 +00715 <font class="comment">// setup palette skinning.</font> +00716 <font class="keywordflow">if</font> ((CCornerTmp::Flags & CVertexBuffer::PaletteSkinFlag)==CVertexBuffer::PaletteSkinFlag) +00717 { +00718 <a class="code" href="classNL3D_1_1CMeshGeom.html#o3">_VBuffer</a>.setPaletteSkin(<a class="code" href="driver__opengl__extension__def_8h.html#a234">id</a>, corn->Palette); +00719 <font class="keywordflow">for</font>(i=0;i<<a class="code" href="mesh_8h.html#a0">NL3D_MESH_SKINNING_MAX_MATRIX</a>;i++) +00720 <a class="code" href="classNL3D_1_1CMeshGeom.html#o3">_VBuffer</a>.setWeight(<a class="code" href="driver__opengl__extension__def_8h.html#a234">id</a>, i, corn->Weights[i]); +00721 } +00722 } +00723 } +00724 +00725 +00726 <font class="comment">// optimize triangles order of all render pass.</font> +00727 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#c1">optimizeTriangleOrder</a>(); +00728 +00729 <font class="comment">// Some runtime not serialized compilation</font> +00730 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#c2">compileRunTime</a>(); +00731 +00732 +00734 <font class="comment">// @{</font> +00735 +<a name="l00736"></a><a class="code" href="classNL3D_1_1CMeshGeom.html#z550_0">00736</a> <font class="keyword">enum</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_0">TSkinType</a> {<a class="code" href="classNL3D_1_1CMeshGeom.html#z550_0u4">SkinPosOnly</a>=0, <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_0u5">SkinWithNormal</a>, <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_0u6">SkinWithTgSpace</a>}; +00737 +00738 <font class="comment">// build skinning.</font> +00739 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_1">buildSkin</a>(CMesh::CMeshBuild &m, std::vector<CFaceTmp> &tmpFaces); +00740 +00741 <font class="comment">// Build bone Usage information for serialized mesh <= version 3.</font> +00742 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_2">buildBoneUsageVer3</a> (); +00743 +00744 <font class="comment">// bkup from VBuffer into _OriginalSkin*</font> +00745 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_3">bkupOriginalSkinVertices</a>(); +00746 <font class="comment">// restore from _OriginalSkin* to VBuffer. set _OriginalSkinRestored to true</font> +00747 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_4">restoreOriginalSkinVertices</a>(); +00748 +00749 <font class="comment">// apply Skin to all vertices from _OriginalSkin* to _VBuffer.</font> +00750 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_5">applySkin</a>(CSkeletonModel *skeleton); +00751 +00752 +00753 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_6">flagSkinVerticesForMatrixBlock</a>(<a class="code" href="types__nl_8h.html#a6">uint8</a> *skinFlags, CMatrixBlock &mb); +00754 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_7">computeSkinMatrixes</a>(CSkeletonModel *skeleton, CMatrix3x4 *matrixes, CMatrixBlock *prevBlock, CMatrixBlock &curBlock); +00755 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_8">computeSoftwarePointSkinning</a>(CMatrix3x4 *matrixes, CVector *srcVector, CPaletteSkin *srcPal, <font class="keywordtype">float</font> *srcWgt, CVector *dstVector); +00756 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CMeshGeom.html#z550_9">computeSoftwareVectorSkinning</a>(CMatrix3x4 *matrixes, CVector *srcVector, CPaletteSkin *srcPal, <font class="keywordtype">float</font> *srcWgt, CVector *dstVector); +00757 +00758 <font class="comment">// @}</font> +00759 +00760 }; +00761 +00762 +00763 +00764 +00765 } <font class="comment">// NL3D</font> +00766 +00767 +00768 <font class="preprocessor">#endif // NL_MESH_H</font> +00769 <font class="preprocessor"></font> +00770 <font class="comment">/* End of mesh.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> |