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

Revision 964, 9.5 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: FUtils/FUDaeParser.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>FUtils/FUDaeParser.h</h1><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="l00012"></a>00012 <span class="preprocessor">#ifndef _FU_DAE_PARSER_</span>
34<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#define _FU_DAE_PARSER_</span>
35<a name="l00014"></a>00014 <span class="preprocessor"></span>
36<a name="l00015"></a>00015 <span class="preprocessor">#ifdef HAS_LIBXML</span>
37<a name="l00016"></a>00016 <span class="preprocessor"></span>
38<a name="l00017"></a>00017 <span class="preprocessor">#include "FUtils/FUDaeSyntax.h"</span>
39<a name="l00018"></a>00018 <span class="preprocessor">#include "FUtils/FUUri.h"</span>
40<a name="l00019"></a>00019 <span class="preprocessor">#include "FUtils/FUXmlParser.h"</span>
41<a name="l00020"></a>00020 <span class="preprocessor">#include "FUtils/FUXmlNodeIdPair.h"</span>
42<a name="l00021"></a>00021
43<a name="l00022"></a>00022 <span class="keyword">namespace </span>FUDaeParser
44<a name="l00023"></a>00023 {
45<a name="l00024"></a>00024     <span class="keyword">using namespace </span>FUXmlParser;
46<a name="l00025"></a>00025
47<a name="l00026"></a>00026     <span class="comment">// Retrieve specific child nodes</span>
48<a name="l00027"></a>00027 FCOLLADA_EXPORT xmlNode* FindChildById(xmlNode* parent, <span class="keyword">const</span> string&amp; <span class="keywordtype">id</span>);
49<a name="l00028"></a>00028 FCOLLADA_EXPORT xmlNode* FindChildByRef(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* ref);
50<a name="l00029"></a>00029 FCOLLADA_EXPORT xmlNode* FindHierarchyChildBySid(xmlNode* hierarchyRoot, <span class="keyword">const</span> <span class="keywordtype">char</span>* sid);
51<a name="l00030"></a>00030 FCOLLADA_EXPORT xmlNode* FindTechnique(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* profile);
52<a name="l00031"></a>00031     FCOLLADA_EXPORT xmlNode* FindTechniqueAccessor(xmlNode* parent);
53<a name="l00032"></a>00032 FCOLLADA_EXPORT xmlNode* FindArray(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* arrayType);
54<a name="l00033"></a>00033 FCOLLADA_EXPORT <span class="keywordtype">void</span> FindParameters(xmlNode* parent, <a class="code" href="classvector.html">StringList</a>&amp; parameterNames, <a class="code" href="classvector.html">xmlNodeList</a>&amp; parameterNodes);
55<a name="l00034"></a>00034
56<a name="l00035"></a>00035     <span class="comment">// Import source arrays</span>
57<a name="l00036"></a>00036     FCOLLADA_EXPORT uint32 ReadSource(xmlNode* sourceNode, <a class="code" href="classvector.html">FloatList</a>&amp; array);
58<a name="l00037"></a>00037 FCOLLADA_EXPORT <span class="keywordtype">void</span> ReadSource(xmlNode* sourceNode, <a class="code" href="classvector.html">Int32List</a>&amp; array);
59<a name="l00038"></a>00038 FCOLLADA_EXPORT <span class="keywordtype">void</span> ReadSource(xmlNode* sourceNode, <a class="code" href="classvector.html">StringList</a>&amp; array);
60<a name="l00039"></a>00039 FCOLLADA_EXPORT <span class="keywordtype">void</span> ReadSource(xmlNode* sourceNode, <a class="code" href="classvector.html">FMVector3List</a>&amp; array, <span class="keywordtype">float</span> lengthFactor=1.0f);
61<a name="l00040"></a>00040 FCOLLADA_EXPORT <span class="keywordtype">void</span> ReadSource(xmlNode* sourceNode, <a class="code" href="classvector.html">FMMatrix44List</a>&amp; array, <span class="keywordtype">float</span> lengthFactor=1.0f);
62<a name="l00041"></a>00041 FCOLLADA_EXPORT <span class="keywordtype">void</span> ReadSourceInterleaved(xmlNode* sourceNode, <a class="code" href="classvector.html">vector&lt;FloatList*&gt;</a>&amp; arrays);
63<a name="l00042"></a>00042 FCOLLADA_EXPORT <span class="keywordtype">void</span> ReadSourceInterpolation(xmlNode* sourceNode, <a class="code" href="classvector.html">UInt32List</a>&amp; array);
64<a name="l00043"></a>00043 FCOLLADA_EXPORT <span class="keywordtype">void</span> ReadSourceInterpolationInterleaved(xmlNode* sourceNode, <a class="code" href="classvector.html">vector&lt;UInt32List*&gt;</a>&amp; arrays);
65<a name="l00044"></a>00044
66<a name="l00045"></a>00045     <span class="comment">// Target support</span>
67<a name="l00046"></a>00046 FCOLLADA_EXPORT <span class="keywordtype">void</span> ReadNodeTargetProperty(xmlNode* targetingNode, string&amp; pointer, string&amp; qualifier);
68<a name="l00047"></a>00047 FCOLLADA_EXPORT <span class="keywordtype">void</span> SplitTarget(<span class="keyword">const</span> string&amp; target, string&amp; pointer, string&amp; qualifier);
69<a name="l00048"></a>00048 FCOLLADA_EXPORT <span class="keywordtype">void</span> CalculateNodeTargetPointer(xmlNode* targetedNode, string&amp; pointer);
70<a name="l00049"></a>00049     FCOLLADA_EXPORT int32 ReadTargetMatrixElement(string&amp; qualifier);
71<a name="l00050"></a>00050
72<a name="l00051"></a>00051     <span class="comment">// Retrieve common node properties</span>
73<a name="l00052"></a>00052 <span class="keyword">inline</span> string ReadNodeId(xmlNode* node) { <span class="keywordflow">return</span> ReadNodeProperty(node, DAE_ID_ATTRIBUTE); }
74<a name="l00053"></a>00053 <span class="keyword">inline</span> string ReadNodeSid(xmlNode* node) { <span class="keywordflow">return</span> ReadNodeProperty(node, DAE_SID_ATTRIBUTE); }
75<a name="l00054"></a>00054 <span class="keyword">inline</span> string ReadNodeSemantic(xmlNode* node) { <span class="keywordflow">return</span> ReadNodeProperty(node, DAE_SEMANTIC_ATTRIBUTE); }
76<a name="l00055"></a>00055 <span class="keyword">inline</span> string ReadNodeName(xmlNode* node) { <span class="keywordflow">return</span> ReadNodeProperty(node, DAE_NAME_ATTRIBUTE); }
77<a name="l00056"></a>00056 <span class="keyword">inline</span> string ReadNodeSource(xmlNode* node) { <span class="keywordflow">return</span> ReadNodeProperty(node, DAE_SOURCE_ATTRIBUTE); }
78<a name="l00057"></a>00057 <span class="keyword">inline</span> string ReadNodeStage(xmlNode* node) { <span class="keywordflow">return</span> ReadNodeProperty(node, DAE_STAGE_ATTRIBUTE); }
79<a name="l00058"></a>00058 FCOLLADA_EXPORT FUUri ReadNodeUrl(xmlNode* node, <span class="keyword">const</span> <span class="keywordtype">char</span>* attribute=DAE_URL_ATTRIBUTE);
80<a name="l00059"></a>00059     FCOLLADA_EXPORT uint32 ReadNodeCount(xmlNode* node);
81<a name="l00060"></a>00060     FCOLLADA_EXPORT uint32 ReadNodeStride(xmlNode* node);
82<a name="l00061"></a>00061
83<a name="l00062"></a>00062     <span class="comment">// Pre-buffer the children of a node, with their ids, for performance optimization</span>
84<a name="l00063"></a>00063 FCOLLADA_EXPORT <span class="keywordtype">void</span> ReadChildrenIds(xmlNode* node, <a class="code" href="classvector.html">FUXmlNodeIdPairList</a>&amp; pairs);
85<a name="l00064"></a>00064
86<a name="l00065"></a>00065     <span class="comment">// Skip the pound(#) character from a COLLADA id string</span>
87<a name="l00066"></a>00066 FCOLLADA_EXPORT <span class="keyword">const</span> <span class="keywordtype">char</span>* SkipPound(<span class="keyword">const</span> string&amp; <span class="keywordtype">id</span>);
88<a name="l00067"></a>00067 };
89<a name="l00068"></a>00068
90<a name="l00069"></a>00069 <span class="preprocessor">#endif // HAS_LIBXML</span>
91<a name="l00070"></a>00070 <span class="preprocessor"></span>
92<a name="l00071"></a>00071 <span class="preprocessor">#endif // _FU_DAE_PARSER_</span>
93</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri May 12 16:44:39 2006 for FCollada by&nbsp;
94<a href="http://www.doxygen.org/index.html">
95<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address>
96</body>
97</html>
Note: See TracBrowser for help on using the repository browser.