Results 1 to 2 of 2

Thread: Invalid examples in instance_node spec?

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    4

    Invalid examples in instance_node spec?

    I have a question about the spec of the instance_node element in 1.5.0. On page 105 are two examples. The first example shows some node elements BESIDE a visual_scene. The second example shows node elements BESIDE a library_nodes element. This is a little bit confusing. according to the node spec a node element can only be in library_nodes, node and visual_scene elements.

    In fact I don't really understand the spec for instance_node at all. The "intuitive" way to use it would be to instantiate nodes (defined in library_nodes) in a visual scene. Like this:

    Code :
    <library_nodes>
      <node id="node1" />
    </library_nodes>
    <library_visual_scenes>
      <visual_scene>
        <node>
          <instance_node url="#node1" />
        </node>
      </visual_scene>
    </library_visual_scenes>

    Is that the right way (and only way) to do it? So a node in a visual_scene can only instantiate a node defined in a nodes library? Or can a visual_scene node instantiate another visual_scene node? If yes, what happens then? Is the node "cloned" so it is displayed two times in the scene?

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Invalid examples in instance_node spec?

    Quote Originally Posted by kayahr
    I have a question about the spec of the instance_node element in 1.5.0. On page 105 are two examples. The first example shows some node elements BESIDE a visual_scene.
    I think you are referring to the details description showing the elements that participate in constructing a level of detail hierarchy using the proxy attribute of <instance_node>. This is not in the examples section and not a complete example itself.
    Quote Originally Posted by kayahr
    In fact I don't really understand the spec for instance_node at all. The "intuitive" way to use it would be to instantiate nodes (defined in library_nodes) in a visual scene.... Is that the right way (and only way) to do it?
    That would be correct usage.
    Quote Originally Posted by kayahr
    So a node in a visual_scene can only instantiate a node defined in a nodes library?
    No because the url attribute is of type xs:anyURI, so the targeted node element can be in any document or database on the Internet.
    Quote Originally Posted by kayahr
    Or can a visual_scene node instantiate another visual_scene node? If yes, what happens then? Is the node "cloned" so it is displayed two times in the scene?
    Yes in that case the description is asking for two instances of the node (i.e. the place and all of the objects in it) within the visual scene. The policy of instantiation is application defined, COLLADA doesn't impose one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •