source: NonGTP/FCollada/Documentation/_f_c_d_skin_controller_8h-source.html @ 964

Revision 964, 16.2 KB checked in by igarcia, 18 years ago (diff)
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>FCollada: FCDocument/FCDSkinController.h Source File</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.4.6-NO -->
8<div class="tabs">
9  <ul>
10    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11    <li><a href="modules.html"><span>Modules</span></a></li>
12    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
13    <li><a href="classes.html"><span>Classes</span></a></li>
14    <li id="current"><a href="files.html"><span>Files</span></a></li>
15    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
16  </ul></div>
17<div class="tabs">
18  <ul>
19    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
20    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
21  </ul></div>
22<h1>FCDocument/FCDSkinController.h</h1><a href="_f_c_d_skin_controller_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
23<a name="l00002"></a>00002 <span class="comment">    Copyright (C) 2005-2006 Feeling Software Inc.</span>
24<a name="l00003"></a>00003 <span class="comment">    MIT License: http://www.opensource.org/licenses/mit-license.php</span>
25<a name="l00004"></a>00004 <span class="comment">*/</span>
26<a name="l00005"></a>00005 <span class="comment">/*</span>
27<a name="l00006"></a>00006 <span class="comment">    Based on the FS Import classes:</span>
28<a name="l00007"></a>00007 <span class="comment">    Copyright (C) 2005-2006 Feeling Software Inc</span>
29<a name="l00008"></a>00008 <span class="comment">    Copyright (C) 2005-2006 Autodesk Media Entertainment</span>
30<a name="l00009"></a>00009 <span class="comment">    MIT License: http://www.opensource.org/licenses/mit-license.php</span>
31<a name="l00010"></a>00010 <span class="comment">*/</span>
32<a name="l00011"></a>00011
33<a name="l00017"></a>00017 <span class="preprocessor">#ifndef _FCD_SKIN_CONTROLLER_H_</span>
34<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _FCD_SKIN_CONTROLLER_H_</span>
35<a name="l00019"></a>00019 <span class="preprocessor"></span>
36<a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="_f_c_d_object_8h.html">FCDocument/FCDObject.h</a>"</span>
37<a name="l00021"></a>00021
38<a name="l00022"></a>00022 <span class="keyword">class </span><a class="code" href="class_f_c_document.html">FCDocument</a>;
39<a name="l00023"></a>00023 <span class="keyword">class </span><a class="code" href="class_f_c_d_controller.html">FCDController</a>;
40<a name="l00024"></a>00024 <span class="keyword">class </span><a class="code" href="class_f_c_d_geometry.html">FCDGeometry</a>;
41<a name="l00025"></a>00025 <span class="keyword">class </span><a class="code" href="class_f_c_d_scene_node.html">FCDSceneNode</a>;
42<a name="l00026"></a>00026
43<a name="l00030"></a><a class="code" href="struct_f_c_d_joint_weight_pair.html">00030</a> <span class="keyword">struct </span><a class="code" href="struct_f_c_d_joint_weight_pair.html">FCDJointWeightPair</a>
44<a name="l00031"></a>00031 {
45<a name="l00033"></a><a class="code" href="struct_f_c_d_joint_weight_pair.html#db720c80d8fde84e5fdecf16f9b6de8a">00033</a>     <a class="code" href="struct_f_c_d_joint_weight_pair.html#db720c80d8fde84e5fdecf16f9b6de8a">FCDJointWeightPair</a>() { <a class="code" href="struct_f_c_d_joint_weight_pair.html#ece54f47c6074c164c1d56bd7efa8294">jointIndex</a> = 0; <a class="code" href="struct_f_c_d_joint_weight_pair.html#375a6320fef00a704bbdaf67097f8552">weight</a> = 0.0f; }
46<a name="l00034"></a>00034
47<a name="l00038"></a><a class="code" href="struct_f_c_d_joint_weight_pair.html#93fccc71bc258c3b83bb3ef0c4112bac">00038</a>     <a class="code" href="struct_f_c_d_joint_weight_pair.html#db720c80d8fde84e5fdecf16f9b6de8a">FCDJointWeightPair</a>(uint32 _jointIndex, <span class="keywordtype">float</span> _weight) { <a class="code" href="struct_f_c_d_joint_weight_pair.html#ece54f47c6074c164c1d56bd7efa8294">jointIndex</a> = _jointIndex; <a class="code" href="struct_f_c_d_joint_weight_pair.html#375a6320fef00a704bbdaf67097f8552">weight</a> = _weight; }
48<a name="l00039"></a>00039
49<a name="l00040"></a><a class="code" href="struct_f_c_d_joint_weight_pair.html#ece54f47c6074c164c1d56bd7efa8294">00040</a>     uint32 <a class="code" href="struct_f_c_d_joint_weight_pair.html#ece54f47c6074c164c1d56bd7efa8294">jointIndex</a>;
50<a name="l00041"></a><a class="code" href="struct_f_c_d_joint_weight_pair.html#375a6320fef00a704bbdaf67097f8552">00041</a>     <span class="keywordtype">float</span> <a class="code" href="struct_f_c_d_joint_weight_pair.html#375a6320fef00a704bbdaf67097f8552">weight</a>;
51<a name="l00042"></a>00042 };
52<a name="l00043"></a>00043
53<a name="l00047"></a><a class="code" href="struct_f_c_d_joint_matrix_pair.html">00047</a> <span class="keyword">struct </span><a class="code" href="struct_f_c_d_joint_matrix_pair.html">FCDJointMatrixPair</a>
54<a name="l00048"></a>00048 {
55<a name="l00049"></a><a class="code" href="struct_f_c_d_joint_matrix_pair.html#6e2b3f39bc8d10c748600301b476d168">00049</a>     <a class="code" href="class_f_m_matrix44.html">FMMatrix44</a> <a class="code" href="struct_f_c_d_joint_matrix_pair.html#6e2b3f39bc8d10c748600301b476d168">invertedBindPose</a>;
56<a name="l00050"></a><a class="code" href="struct_f_c_d_joint_matrix_pair.html#b2c8c82aa9acb32f441982db8746720c">00050</a>     <a class="code" href="class_f_c_d_scene_node.html">FCDSceneNode</a>* <a class="code" href="struct_f_c_d_joint_matrix_pair.html#b2c8c82aa9acb32f441982db8746720c">joint</a>;
57<a name="l00051"></a>00051 };
58<a name="l00052"></a>00052
59<a name="l00054"></a><a class="code" href="_f_c_d_skin_controller_8h.html#6d0ef640853ccbb6b8e15835e289d30f">00054</a> <span class="keyword">typedef</span> <a class="code" href="classvector.html">vector&lt;FCDJointMatrixPair&gt;</a> <a class="code" href="classvector.html">FCDJointList</a>;
60<a name="l00055"></a>00055
61<a name="l00058"></a><a class="code" href="_f_c_d_skin_controller_8h.html#d0bfc4b70f98dc236ed0c93a675d5680">00058</a> <span class="keyword">typedef</span> <a class="code" href="classvector.html">vector&lt;FCDJointWeightPair&gt;</a> <a class="code" href="classvector.html">FCDJointWeightPairList</a>;
62<a name="l00059"></a>00059
63<a name="l00062"></a><a class="code" href="_f_c_d_skin_controller_8h.html#405755403903decf464f6aee972645b5">00062</a> <span class="keyword">typedef</span> <a class="code" href="classvector.html">vector&lt;FCDJointWeightPairList&gt;</a> <a class="code" href="classvector.html">FCDWeightedMatches</a>;
64<a name="l00063"></a>00063
65<a name="l00076"></a><a class="code" href="class_f_c_d_skin_controller.html">00076</a> <span class="keyword">class </span>FCOLLADA_EXPORT <a class="code" href="class_f_c_d_skin_controller.html">FCDSkinController</a> : <span class="keyword">public</span> <a class="code" href="class_f_c_d_object.html">FCDObject</a>
66<a name="l00077"></a>00077 {
67<a name="l00078"></a>00078 <span class="keyword">private</span>:
68<a name="l00079"></a>00079     <a class="code" href="_f_u_object_type_8h.html#8124b8a8706cd10260f8cd5a7bd8e691">DeclareObjectType</a>;
69<a name="l00080"></a>00080     <a class="code" href="class_f_c_d_controller.html">FCDController</a>* parent;
70<a name="l00081"></a>00081
71<a name="l00082"></a>00082 <span class="keywordtype">bool</span> ownsTarget;
72<a name="l00083"></a>00083     <a class="code" href="class_f_c_d_entity.html">FCDEntity</a>* target;
73<a name="l00084"></a>00084 <a class="code" href="class_f_m_matrix44.html">FMMatrix44</a> bindShapeTransform;
74<a name="l00085"></a>00085
75<a name="l00086"></a>00086 <a class="code" href="classvector.html">StringList</a> jointIds;
76<a name="l00087"></a>00087 <a class="code" href="classvector.html">FCDJointList</a> joints;
77<a name="l00088"></a>00088 <a class="code" href="classvector.html">FCDWeightedMatches</a> weightedMatches;
78<a name="l00089"></a>00089
79<a name="l00090"></a>00090 <span class="keyword">public</span>:
80<a name="l00095"></a>00095     <a class="code" href="class_f_c_d_skin_controller.html">FCDSkinController</a>(<a class="code" href="class_f_c_document.html">FCDocument</a>* document, <a class="code" href="class_f_c_d_controller.html">FCDController</a>* parent);
81<a name="l00096"></a>00096
82<a name="l00099"></a>00099 <span class="keyword">virtual</span> ~<a class="code" href="class_f_c_d_skin_controller.html">FCDSkinController</a>();
83<a name="l00100"></a>00100     
84<a name="l00104"></a><a class="code" href="class_f_c_d_skin_controller.html#20318bd59ae1e95005eb7ac59a314dae">00104</a>     <a class="code" href="class_f_c_d_entity.html">FCDEntity</a>* GetTarget() { <span class="keywordflow">return</span> target; }
85<a name="l00105"></a><a class="code" href="class_f_c_d_skin_controller.html#c7c493410e4c600362bcf6997bd3e187">00105</a>     <span class="keyword">const</span> <a class="code" href="class_f_c_d_entity.html">FCDEntity</a>* GetTarget()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> target; }
86<a name="l00113"></a>00113 <span class="keywordtype">void</span> SetTarget(<a class="code" href="class_f_c_d_entity.html">FCDEntity</a>* _target);
87<a name="l00114"></a>00114
88<a name="l00117"></a><a class="code" href="class_f_c_d_skin_controller.html#fdd606f592acbdbb18e987dd7ac7f526">00117</a>     <span class="keyword">const</span> <a class="code" href="class_f_m_matrix44.html">FMMatrix44</a>&amp; GetBindShapeTransform()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> bindShapeTransform; }
89<a name="l00118"></a>00118
90<a name="l00121"></a><a class="code" href="class_f_c_d_skin_controller.html#98e96fb0d648822f57ac2f94a2d13c63">00121</a>     <span class="keywordtype">void</span> SetBindShapeTransform(<span class="keyword">const</span> <a class="code" href="class_f_m_matrix44.html">FMMatrix44</a>&amp; bindPose) { bindShapeTransform = bindPose; }
91<a name="l00122"></a>00122
92<a name="l00125"></a><a class="code" href="class_f_c_d_skin_controller.html#50c10208d6dbb0d6f4462562bae0b519">00125</a>     <a class="code" href="classvector.html">FCDJointList</a>&amp; GetJoints() { <span class="keywordflow">return</span> joints; }
93<a name="l00126"></a><a class="code" href="class_f_c_d_skin_controller.html#a77e51340875b7a2d43cb5ebc2b17b45">00126</a>     <span class="keyword">const</span> <a class="code" href="classvector.html">FCDJointList</a>&amp; GetJoints()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> joints; }
94<a name="l00130"></a><a class="code" href="class_f_c_d_skin_controller.html#4ec9325fef3ed3ed837eb99e82b79f35">00130</a>     size_t GetJointCount()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> joints.size(); }
95<a name="l00131"></a>00131
96<a name="l00135"></a><a class="code" href="class_f_c_d_skin_controller.html#47f41dd14a41e86e2b78fbca47631318">00135</a>     <a class="code" href="struct_f_c_d_joint_matrix_pair.html">FCDJointMatrixPair</a>* GetJoint(size_t index) { <a class="code" href="_f_u_assert_8h.html#72b8444eb608787f1db6bf1d53e0310f">FUAssert</a>(index &lt; GetJointCount(), <span class="keywordflow">return</span> NULL); <span class="keywordflow">return</span> &amp;joints.at(index); }
97<a name="l00136"></a><a class="code" href="class_f_c_d_skin_controller.html#355affaa56997502c9d7fd02e71040ab">00136</a>     <span class="keyword">const</span> <a class="code" href="struct_f_c_d_joint_matrix_pair.html">FCDJointMatrixPair</a>* GetJoint(size_t index)<span class="keyword"> const </span>{ <a class="code" href="_f_u_assert_8h.html#72b8444eb608787f1db6bf1d53e0310f">FUAssert</a>(index &lt; GetJointCount(), <span class="keywordflow">return</span> NULL); <span class="keywordflow">return</span> &amp;joints.at(index); }
98<a name="l00142"></a>00142     <a class="code" href="struct_f_c_d_joint_matrix_pair.html">FCDJointMatrixPair</a>* FindJoint(<a class="code" href="class_f_c_d_scene_node.html">FCDSceneNode</a>* joint);
99<a name="l00143"></a>00143 <span class="keyword">const</span> <a class="code" href="struct_f_c_d_joint_matrix_pair.html">FCDJointMatrixPair</a>* FindJoint(<span class="keyword">const</span> <a class="code" href="class_f_c_d_scene_node.html">FCDSceneNode</a>* joint) <span class="keyword">const</span>;
100<a name="l00148"></a>00148 <span class="keywordtype">void</span> AddJoint(<a class="code" href="class_f_c_d_scene_node.html">FCDSceneNode</a>* joint, <span class="keyword">const</span> <a class="code" href="class_f_m_matrix44.html">FMMatrix44</a>&amp; bindPose);
101<a name="l00149"></a>00149
102<a name="l00153"></a>00153 <span class="keywordtype">void</span> RemoveJoint(<a class="code" href="class_f_c_d_scene_node.html">FCDSceneNode</a>* joint);
103<a name="l00154"></a>00154
104<a name="l00159"></a><a class="code" href="class_f_c_d_skin_controller.html#67ae45a2c46fdfcad1030c591debb50f">00159</a>     <a class="code" href="classvector.html">FCDWeightedMatches</a>&amp; GetWeightedMatches() { <span class="keywordflow">return</span> weightedMatches; }
105<a name="l00160"></a><a class="code" href="class_f_c_d_skin_controller.html#03fd4da711c2a9d8dc1c1264734bc4d5">00160</a>     <span class="keyword">const</span> <a class="code" href="classvector.html">FCDWeightedMatches</a>&amp; GetWeightedMatches()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> weightedMatches; }
106<a name="l00165"></a><a class="code" href="class_f_c_d_skin_controller.html#ee3de90c78f999482e7b29e0f0c0af3e">00165</a>     <a class="code" href="classvector.html">FCDWeightedMatches</a>&amp; GetVertexInfluences() { <span class="keywordflow">return</span> weightedMatches; }
107<a name="l00166"></a><a class="code" href="class_f_c_d_skin_controller.html#460781d52f85ae9b83b5ad7dc6047531">00166</a>     <span class="keyword">const</span> <a class="code" href="classvector.html">FCDWeightedMatches</a>&amp; GetVertexInfluences()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> weightedMatches; }
108<a name="l00172"></a><a class="code" href="class_f_c_d_skin_controller.html#142399b71519a95b23a39ac36aecb048">00172</a>     size_t GetVertexInfluenceCount()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> weightedMatches.size(); }
109<a name="l00173"></a>00173
110<a name="l00177"></a><a class="code" href="class_f_c_d_skin_controller.html#f8ea848c9fc580de40659ac7ecb4bade">00177</a>     <a class="code" href="classvector.html">FCDJointWeightPairList</a>* GetInfluences(size_t index) { <a class="code" href="_f_u_assert_8h.html#72b8444eb608787f1db6bf1d53e0310f">FUAssert</a>(index &lt; GetVertexInfluenceCount(), <span class="keywordflow">return</span> NULL); <span class="keywordflow">return</span> &amp;weightedMatches.at(index); }
111<a name="l00178"></a><a class="code" href="class_f_c_d_skin_controller.html#fc0aef92cd4ab53c6265273cf4bc6816">00178</a>     <span class="keyword">const</span> <a class="code" href="classvector.html">FCDJointWeightPairList</a>* GetInfluences(size_t index)<span class="keyword"> const </span>{ <a class="code" href="_f_u_assert_8h.html#72b8444eb608787f1db6bf1d53e0310f">FUAssert</a>(index &lt; GetVertexInfluenceCount(), <span class="keywordflow">return</span> NULL); <span class="keywordflow">return</span> &amp;weightedMatches.at(index); }
112<a name="l00187"></a>00187 <span class="keywordtype">void</span> ReduceInfluences(uint32 maxInfluenceCount, <span class="keywordtype">float</span> minimumWeight=0.0f);
113<a name="l00188"></a>00188
114<a name="l00193"></a>00193 <a class="code" href="class_f_u_status.html">FUStatus</a> LoadFromXML(xmlNode* skinNode);
115<a name="l00194"></a>00194
116<a name="l00198"></a>00198     xmlNode* WriteToXML(xmlNode* parentNode) <span class="keyword">const</span>;
117<a name="l00199"></a>00199
118<a name="l00204"></a>00204 <a class="code" href="class_f_u_status.html">FUStatus</a> Link();
119<a name="l00205"></a>00205 };
120<a name="l00206"></a>00206
121<a name="l00207"></a>00207 <span class="preprocessor">#endif // _FCD_SKIN_CONTROLLER_H_</span>
122<a name="l00208"></a>00208 <span class="preprocessor"></span>
123</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri May 12 16:44:39 2006 for FCollada by&nbsp;
124<a href="http://www.doxygen.org/index.html">
125<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address>
126</body>
127</html>
Note: See TracBrowser for help on using the repository browser.