1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Castle Game Engine: X3DNodes: Class TX3DRootNode</title>
<meta name="generator" content="PasDoc 0.13.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<a name="TX3DRootNode"></a><h1 class="cio">Class TX3DRootNode</h1>
<table class="sections wide_list">
<tr>
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td><a class="section" href="#PasDoc-Fields">Fields</a></td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
<a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="X3DNodes.html">X3DNodes</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TX3DRootNode = class(<a class="normal" href="X3DNodes.TGroupNode.html">TGroupNode</a>)</code></p>
<h2 class="description">Description</h2>
<p>
A top-level VRML/X3D node. This is what you get by loading 3D model from file.
<p>It is declared as a descendant of VRML/X3D >= 2.0 Group node, but it's used with all VRML/X3D versions (including VRML 1.0 and Inventor). This makes things simple (previously we had two separate TX3DRootNode_1 and <code>TX3DRootNode</code>, which was complicating stuff). Children (for all VRML/X3D versions) are inside <a class="normal" href="X3DNodes.TAbstractX3DGroupingNode.html#FdChildren">FdChildren</a> field.
<p>This way VRML/X3D files may have many nodes at the top level (which is a standard feature of VRML/X3D >= 2.0, but we also allow it for VRML 1.0 as a commonly used extension). It may also have prototypes, routes etc. at the root level.
<p>This also allows us to record in one place some information that is returned by the parser. Like parsed VRML/X3D version, X3D profile, some namespace information (exported names and such).</p>
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TPersistent</li>
<li class="ancestor"><a class="normal" href="CastleInterfaces.TNonRefCountedInterfacedPersistent.html">TNonRefCountedInterfacedPersistent</a></li>
<li class="ancestor"><a class="normal" href="X3DFields.TX3DFileItem.html">TX3DFileItem</a></li>
<li class="ancestor"><a class="normal" href="X3DNodes.TX3DNode.html">TX3DNode</a></li>
<li class="ancestor"><a class="normal" href="X3DNodes.TAbstractNode.html">TAbstractNode</a></li>
<li class="ancestor"><a class="normal" href="X3DNodes.TAbstractChildNode.html">TAbstractChildNode</a></li>
<li class="ancestor"><a class="normal" href="X3DNodes.TAbstractGroupingNode.html">TAbstractGroupingNode</a></li>
<li class="ancestor"><a class="normal" href="X3DNodes.TAbstractX3DGroupingNode.html">TAbstractX3DGroupingNode</a></li>
<li class="ancestor"><a class="normal" href="X3DNodes.TGroupNode.html">TGroupNode</a></li>
<li class="thisitem">TX3DRootNode</li></ul><h2 class="overview">Overview</h2>
<a name="PasDoc-Fields"></a><h3 class="summary">Fields</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><b><a href="X3DNodes.TX3DRootNode.html#ForceVersion">ForceVersion</a></b>: <a href="X3DNodes.html#TX3DVersion">TX3DVersion</a>;</code></td>
</tr>
</table>
<a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="X3DNodes.TX3DRootNode.html#DeepCopyCore">DeepCopyCore</a></b>(CopyState: <a href="X3DNodes.TX3DNodeDeepCopyState.html">TX3DNodeDeepCopyState</a>): <a href="X3DNodes.TX3DNode.html">TX3DNode</a>; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="X3DNodes.TX3DRootNode.html#SeparateGroup">SeparateGroup</a></b>: boolean; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a href="X3DNodes.TX3DRootNode.html#ApplyTransform">ApplyTransform</a></b>(State: <a href="X3DNodes.TX3DGraphTraverseState.html">TX3DGraphTraverseState</a>); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="X3DNodes.TX3DRootNode.html#CreateNode">CreateNode</a></b>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <b><a href="X3DNodes.TX3DRootNode.html#Destroy">Destroy</a></b>; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="X3DNodes.TX3DRootNode.html#SaveToStream">SaveToStream</a></b>(Writer: <a href="X3DFields.TX3DWriter.html">TX3DWriter</a>); override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="X3DNodes.TX3DRootNode.html#ForceSaveAsX3D">ForceSaveAsX3D</a></b>(const AMajor: Integer = 3; const AMinor: Integer = 2; const AProfile: string = 'Interchange');</code></td>
</tr>
</table>
<a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="X3DNodes.TX3DRootNode.html#SaveAsRootNode">SaveAsRootNode</a></b>: boolean read FSaveAsRootNode write FSaveAsRootNode
default true;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="X3DNodes.TX3DRootNode.html#HasForceVersion">HasForceVersion</a></b>: boolean
read FHasForceVersion write FHasForceVersion default false;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="X3DNodes.TX3DRootNode.html#Profile">Profile</a></b>: string read FProfile write FProfile;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="X3DNodes.TX3DRootNode.html#Components">Components</a></b>: <a href="X3DNodes.html#TStringLongIntMap">TStringLongIntMap</a> read FComponents;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="X3DNodes.TX3DRootNode.html#Meta">Meta</a></b>: <a href="X3DNodes.TStringStringMap.html">TStringStringMap</a> read FMeta;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="X3DNodes.TX3DRootNode.html#PrototypeNames">PrototypeNames</a></b>: <a href="X3DNodes.TX3DPrototypeNames.html">TX3DPrototypeNames</a> read FPrototypeNames;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="X3DNodes.TX3DRootNode.html#ExportedNames">ExportedNames</a></b>: <a href="X3DNodes.TX3DNodeNames.html">TX3DNodeNames</a> read FExportedNames;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="X3DNodes.TX3DRootNode.html#Scale">Scale</a></b>: Single read FScale write FScale default 1.0;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Fields</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ForceVersion"></a><code><b>ForceVersion</b>: <a href="X3DNodes.html#TX3DVersion">TX3DVersion</a>;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="DeepCopyCore"></a><code>function <b>DeepCopyCore</b>(CopyState: <a href="X3DNodes.TX3DNodeDeepCopyState.html">TX3DNodeDeepCopyState</a>): <a href="X3DNodes.TX3DNode.html">TX3DNode</a>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="SeparateGroup"></a><code>function <b>SeparateGroup</b>: boolean; override;</code></td>
</tr>
<tr><td colspan="2">
<p>
Root node never saves/restores the traversing state. This means that all state changes "leak out" from a root node. This is a good thing: if root node isn't used as a final <a class="normal" href="CastleSceneCore.TCastleSceneCore.html#RootNode">TCastleSceneCore.RootNode</a>, then it is placed inside Inline node, which will do save/restore anyway. And this way VRML 1.0 WWWInline with separate=FALSE may also work too.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="ApplyTransform"></a><code>procedure <b>ApplyTransform</b>(State: <a href="X3DNodes.TX3DGraphTraverseState.html">TX3DGraphTraverseState</a>); override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CreateNode"></a><code>procedure <b>CreateNode</b>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Destroy"></a><code>destructor <b>Destroy</b>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SaveToStream"></a><code>procedure <b>SaveToStream</b>(Writer: <a href="X3DFields.TX3DWriter.html">TX3DWriter</a>); override;</code></td>
</tr>
<tr><td colspan="2">
<p>
Save contents to the stream.
<p>If <a class="normal" href="X3DNodes.TX3DRootNode.html#SaveAsRootNode">SaveAsRootNode</a> then this is saved in a special way, such that only the contents are written, without surrounding braces (for classic encoding) or XML element (for xml encoding). This way, when saving, we hide the fact that everything was wrapped in an artificial <a class="normal" href="X3DNodes.TX3DRootNode.html">TX3DRootNode</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ForceSaveAsX3D"></a><code>procedure <b>ForceSaveAsX3D</b>(const AMajor: Integer = 3; const AMinor: Integer = 2; const AProfile: string = 'Interchange');</code></td>
</tr>
<tr><td colspan="2">
<p>
Set properties to force saving this node graph as X3D. If we're already configured to save as X3D (major version >= 3) then do nothing. Otherwise, sets major/minor versions (by default: for X3D 3.2; make sure AMajor is >= 3) and sets X3D profile (default: Interchange).</p>
</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SaveAsRootNode"></a><code>property <b>SaveAsRootNode</b>: boolean read FSaveAsRootNode write FSaveAsRootNode
default true;</code></td>
</tr>
<tr><td colspan="2">
<p>
Should <a class="normal" href="X3DNodes.TX3DRootNode.html#SaveToStream">SaveToStream</a> take care to nicely save us, treating as a root node of whole VRML file or prototype.
<p>If this node isn't a root node, you should set this to <code>False</code> (or saving this node may generate dumb contents). Although, generally, you should avoid using the <a class="normal" href="X3DNodes.TX3DRootNode.html">TX3DRootNode</a> class at all for non-root nodes.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="HasForceVersion"></a><code>property <b>HasForceVersion</b>: boolean
read FHasForceVersion write FHasForceVersion default false;</code></td>
</tr>
<tr><td colspan="2">
<p>
Set <code>HasForceVersion</code> to <code>True</code> to force saving this model with given <a class="normal" href="X3DNodes.TX3DRootNode.html#ForceVersion">ForceVersion</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Profile"></a><code>property <b>Profile</b>: string read FProfile write FProfile;</code></td>
</tr>
<tr><td colspan="2">
<p>
Profile required for this X3D file. See X3D spec about profiles. Every X3D file must always define a profile. (However, we use this class also for VRML 1.0 and 2.0 root nodes, where profile is empty.) Relevant only if this node is the root of X3D file.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Components"></a><code>property <b>Components</b>: <a href="X3DNodes.html#TStringLongIntMap">TStringLongIntMap</a> read FComponents;</code></td>
</tr>
<tr><td colspan="2">
<p>
<code>Components</code> and levels required for this X3D file. Relevant if this node is the root of X3D file.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Meta"></a><code>property <b>Meta</b>: <a href="X3DNodes.TStringStringMap.html">TStringStringMap</a> read FMeta;</code></td>
</tr>
<tr><td colspan="2">
<p>
Meta keys and values of this X3D file. Relevant if this node is the root of X3D file.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="PrototypeNames"></a><code>property <b>PrototypeNames</b>: <a href="X3DNodes.TX3DPrototypeNames.html">TX3DPrototypeNames</a> read FPrototypeNames;</code></td>
</tr>
<tr><td colspan="2">
<p>
Global prototype namespace at the end of parsing the file. Useful for things like EXTERNPROTO implementation.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ExportedNames"></a><code>property <b>ExportedNames</b>: <a href="X3DNodes.TX3DNodeNames.html">TX3DNodeNames</a> read FExportedNames;</code></td>
</tr>
<tr><td colspan="2">
<p>
Node names exported from the file by EXPORT keyword. Useful for importing them later, to handle IMPORT/EXPORT X3D mechanism.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Scale"></a><code>property <b>Scale</b>: Single read FScale write FScale default 1.0;</code></td>
</tr>
<tr><td colspan="2">
<p>
Scale of the model. When loading, this is set to honor <code>"UNIT length ..."</code> declaration in X3D 3.3. It scales model such that 1 unit = 1 meter. When one model is inlined inside another (e.g. using X3D Inline node), this is adjusted to the existing scale of the outer model (always to make the resulting complete node graph keep the assumption 1 unit = 1 meter).</p>
</td></tr>
</table>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://michalis.ii.uni.wroc.pl/piwik-castle-engine/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "1"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
<noscript>
<!-- Piwik Image Tracker -->
<img src="http://michalis.ii.uni.wroc.pl/piwik-castle-engine/piwik.php?idsite=1&rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2015-06-15 04:43:14</em>
</span>
</td></tr></table></body></html>
|