Difference between revisions of "Anchor"

From Web3D.org
Jump to: navigation, search
Line 1: Line 1:
 
* [[Node Reference]]
 
* [[Node Reference]]
 
==Anchor==
 
==Anchor==
 +
 +
Specification Link: [http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/networking.html#Anchor Anchor]
  
 
<pre>Anchor : X3DGroupingNode {  
 
<pre>Anchor : X3DGroupingNode {  
Line 9: Line 11:
 
   SFNode  [in,out] metadata      NULL    [X3DMetadataObject]
 
   SFNode  [in,out] metadata      NULL    [X3DMetadataObject]
 
   MFString [in,out] parameter      []
 
   MFString [in,out] parameter      []
   MFString [in,out] url            []      [<i>url</i> or <i>urn</i>]
+
   MFString [in,out] url            []      [URI]
   SFVec3f  []      bboxCenter    0 0 0    (-&#8734;,&#8734;)
+
   SFVec3f  []      bboxCenter    0 0 0    (-&infin;,&infin;)
   SFVec3f  []      bboxSize      -1 -1 -1 [0,&#8734;) or &minus;1 &minus;1 &minus;1  
+
   SFVec3f  []      bboxSize      -1 -1 -1 [0 &infin;) or &minus;1 &minus;1 &minus;1  
 
}
 
}
  
</pre>
+
==DTD Validation==
  
<p>The Anchor grouping node retrieves the content of a URL when the user activates
+
===Children===
  (e.g.,&nbsp;clicks) some geometry contained within the Anchor node's children.
+
  If the URL points to a valid X3D file, that world replaces the world of which
+
  the Anchor node is a part (except when the <i>parameter</i> field, described
+
  below, alters this behaviour). If non-X3D data is retrieved, the browser shall
+
  determine how to handle that data; typically, it will be passed to an appropriate
+
  non-X3D browser.</p>
+
  
<p>Exactly how a user activates geometry contained by the Anchor node depends
+
Children must appear as follows:
  on the pointing device and is determined by the X3D browser. Typically, clicking
+
  with the pointing device will result in the new scene replacing the current
+
  scene. An Anchor node with an empty <i>url</i> does nothing when its children
+
  are chosen. A description of how multiple Anchors and pointing-device sensors
+
  are resolved on activation is contained in
+
<a href="pointingsensor.html#Concepts">20.2&nbsp;Concepts.</a></p>
+
  
<p>More details on the <i>children</i>, <i>addChildren</i>, and <i>removeChildren</i>
+
# A single, optional IS.
fields can be found in <a href="group.html#Concepts">10.2 Concepts</a>.</p>
+
# A single, optional node derived from X3DMetadataObject for the ''metadata'' field.
 +
# Any number, including none, of nodes derived from X3DChildNode or Prototype nodes in any order.
  
<p>The <i>description</i> field in the Anchor node specifies a textual description
+
===Attributes===
  of the Anchor node. This may be used by browser-specific user interfaces that
+
  wish to present users with more detailed information about the Anchor.</p>
+
  
<p>The <i>parameter</i>&nbsp; field may be used to supply any additional information
+
There is no validation of the numerical values of the ''bboxCenter'' or ''bboxSize'' fields. Neither is there any validation of the number of values.
  to be interpreted by the browser. Each string shall consist of &quot;keyword=value&quot;
+
  pairs. For example, some browsers allow the specification of a &quot;target&quot; for
+
  a link to display a link in another part of an HTML document. The <i>parameter</i>
+
  field is then:</p>
+
  
<pre>Anchor {
+
==Schema Validation==
parameter [ &quot;target=name_of_frame&quot; ];
+
  ...
+
}
+
  
</pre>
+
===Children===
  
<p>An Anchor node may be used to bind the initial Viewpoint node in a world by
+
Children must appear as follows:
  specifying a URL ending with &quot;#ViewpointName&quot;
+
where &quot;ViewpointName&quot;
+
  is the DEF name of a viewpoint defined in the X3D file.</p>
+
  
<p><span class="example">EXAMPLE</span></p>
+
# A single, optional IS.
 +
# A single, optional node derived from X3DMetadataObject for the ''metadata'' field.
 +
# Any number, including none, of nodes derived from X3DChildNode or Prototype nodes in any order.
  
<pre>Anchor {
+
===Attributes===
  url &quot;http://www.school.edu/X3D/someScene.wrl#OverView&quot;;
+
    children  Shape { geometry Box {} };
+
}
+
  
</pre>
+
The ''bboxCenter'' field accepts a triplet of numerical values.
 +
The ''bboxsize'' field accepts either three positive values or the triplet -1 -1 -1.
  
<p>specifies an anchor that loads the X3D file &quot;someScene.wrl&quot; and binds
+
==Schematron Validation==
  the initial user view to the Viewpoint node named &quot;OverView&quot; when
+
  the Anchor node's geometry (Box) is activated. If the named Viewpoint node is
+
  not found in the X3D file, the X3D file is loaded using the default Viewpoint
+
  node binding stack rules (see <a href="navigation.html#Viewpoint">23.3.5
+
Viewpoint</a>).</p>
+
  
<p>If the <i>url</i> field is specified in the form &quot;#ViewpointName&quot;
+
TBD
  (i.e.&nbsp;no file name), the Viewpoint node
+
with the given name (&quot;ViewpointName&quot;)
+
  in the Anchor's run-time name scope(s) shall
+
be bound (<i>set_bind </i> <span class="code"> <code>TRUE</code></span>).
+
  The results are undefined if there are multiple Viewpoints with the same name
+
  in the Anchor's run-time name scope(s). The results are undefined if the Anchor
+
  node is not part of any run-time name scope or is part of more than one run-time
+
  name scope. See <a href="../concepts.html#Runtimenamescope">4.4.7 Run-time
+
name scope</a> for a description of run-time name scopes.
+
See <a href="navigation.html#Viewpoint">23.3.5 Viewpoint</a>, for the Viewpoint transition
+
  rules that specify how browsers shall interpret the transition from the old
+
  Viewpoint node to the new one. For example:</p>
+
  
<pre>Anchor {
 
  url &quot;#Doorway&quot;;
 
  children Shape { geometry Sphere {} };
 
}
 
</pre>
 
 
<p>binds the viewer to the viewpoint defined by the &quot;Doorway&quot; viewpoint
 
  in the current world when the sphere is activated. In this case, if the Viewpoint
 
  is not found, no action occurs on activation.</p>
 
 
<p>More details on the <i>url</i> field are contained in
 
<a href="../concepts.html#URLs">9.2.1 URLs</a>.</p>
 
 
<p>The <i>bboxCenter</i> and <i>bboxSize</i> fields specify a bounding box that
 
  encloses the Anchor's children. This is a hint that may be used for optimization
 
  purposes. The results are undefined if the specified bounding box is smaller
 
  than the actual bounding box of the children at any time. The default <i>bboxSize</i>
 
  value, (-1,&nbsp;-1,&nbsp;-1), implies that the bounding box is not specified
 
  and if needed shall be calculated by the browser. More details on the <i>bboxCenter</i>
 
  and <i>bboxSize</i> fields can be found in <a href="group.html#Boundingboxes">
 
 
10.2.2 Bounding boxes</a>.</p>
 
 
==Example==
 
<pre>
 
#X3D V3.0 utf8
 
 
PROFILE Immersive
 
 
Anchor {
 
    description "A test anchor"
 
    url ["anchor_dest.x3dv" ]
 
  children [
 
      Shape {
 
        geometry Box {}
 
      }
 
  ]
 
}
 
</pre>
 
 
* [[Node Reference]]
 
* [[Node Reference]]

Revision as of 15:08, 17 April 2015

Anchor

Specification Link: Anchor

Anchor : X3DGroupingNode { 
  MFNode   [in]     addChildren
  MFNode   [in]     removeChildren
  MFNode   [in,out] children       []       [X3DChildNode]
  SFString [in,out] description    ""
  SFNode   [in,out] metadata       NULL     [X3DMetadataObject]
  MFString [in,out] parameter      []
  MFString [in,out] url            []       [URI]
  SFVec3f  []       bboxCenter     0 0 0    (-∞,∞)
  SFVec3f  []       bboxSize       -1 -1 -1 [0 ∞) or −1 −1 −1 
}

==DTD Validation==

===Children===

Children must appear as follows:

# A single, optional IS.
# A single, optional node derived from X3DMetadataObject for the ''metadata'' field.
# Any number, including none, of nodes derived from X3DChildNode or Prototype nodes in any order.

===Attributes===

There is no validation of the numerical values of the ''bboxCenter'' or ''bboxSize'' fields. Neither is there any validation of the number of values.

==Schema Validation==

===Children===

Children must appear as follows:

# A single, optional IS.
# A single, optional node derived from X3DMetadataObject for the ''metadata'' field.
# Any number, including none, of nodes derived from X3DChildNode or Prototype nodes in any order.

===Attributes===

The ''bboxCenter'' field accepts a triplet of numerical values.
The ''bboxsize'' field accepts either three positive values or the triplet -1 -1 -1.

==Schematron Validation==

TBD

* [[Node Reference]]