[X3D-Public] SFNode and MFNode

Michalis Kamburelis michalis.kambi at gmail.com
Thu Apr 28 10:10:56 PDT 2011

Sajjadul Islam wrote:
> Hello forum,
> What is the purpose of these two field types?
> I have not found any examples where these field types are specified
> explicitly by the user. The default value is always NULL.
> Any reference example to their usage will be very helpful.

Pretty much every VRML 2.0 and X3D file is an example of SFNode and
MFNode usage. These fields allow you to place one node within the other
(for example, place "Sphere" node inside "geometry" field of "Shape"
node, which is inside "children" field of "Group" node and so on). They
are quite at the core of the VRML/X3D "nodes graph" idea :)

SFNode contains one child node or NULL, and all SFNode fields inside
standard nodes indeed have a default value always NULL. MFNode contains
any number of child nodes, and all MFNode fields inside standard nodes
have a default value = [] (empty list).


More information about the X3D-Public mailing list