<br><br><div class="gmail_quote">On Thu, Apr 28, 2011 at 7:10 PM, Michalis Kamburelis <span dir="ltr"><<a href="mailto:michalis.kambi@gmail.com">michalis.kambi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">Sajjadul Islam wrote:<br>
> Hello forum,<br>
><br>
> What is the purpose of these two field types?<br>
><br>
> I have not found any examples where these field types are specified<br>
> explicitly by the user. The default value is always NULL.<br>
><br>
><br>
> Any reference example to their usage will be very helpful.<br>
><br>
><br>
<br>
</div></div>Pretty much every VRML 2.0 and X3D file is an example of SFNode and<br>
MFNode usage. These fields allow you to place one node within the other<br>
(for example, place "Sphere" node inside "geometry" field of "Shape"<br>
node, which is inside "children" field of "Group" node and so on).</blockquote><div><br></div><div>Consider the following example picked from the book "Extensible 3D Graphics   for Web Authors":</div>
<div><br></div><div><Shape></div><div>     <Sphere radius="10.0" Solid="true" /></div><div><br></div><div>     <Appearance></div><div>          <ImageTexture = "earth-topo.png" /></div>
<div>     </Appearance></div><div></Shape></div><div><br></div><div>In the above example Shape node contains some child nodes. This node has two fields of type SFNode ; one for the geometry and the other for the appearance. And Node of this nodes are edited explicitly by the author. Will they be still NULL? Should it not be something the following:</div>
<div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><Shape geometry=? appearance=?></div><div>     <Sphere radius="10.0" Solid="true" /></div><div><br>
</div><div>     <Appearance></div><div>          <ImageTexture = "earth-topo.png" /></div><div>     </Appearance></div><div></Shape></div></div><div><br></div><div><br></div><div> "?" means i do not know what to put there. </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> They<br>
are quite at the core of the VRML/X3D "nodes graph" idea :)<br>
<br>
SFNode contains one child node or NULL, and all SFNode fields inside<br>
standard nodes indeed have a default value always NULL. MFNode contains<br>
any number of child nodes, and all MFNode fields inside standard nodes<br>
have a default value = [] (empty list).<br>
<font color="#888888"><br>
Michalis<br>
</font></blockquote></div><br>