Home | Hierarchy | Members | Alphabetical | Related Pages |
#include <mfnode.h>
Static Public Member Functions | |
const char * | typeName () |
FieldTypeId | typeId () |
Friends | |
std::ostream & | operator<< (std::ostream &s, const MFNode &f) |
Transform* t = new Transform(); // Transform has a field children of type MFNode Shape* s1 = new Shape(); Shape* s2 = new Shape(); t->children.push_back(SFNode(s1)); // push_back(s1); would fail since t->children.push_back(SFNode(s2)); // constructor SFNode(Node*) is explicit cout<<t->children[0]->typeName()<<endl; // echoes "Shape"
Below is included the documentation for this field type from the ISO standard.
The SFNode field and event specifies a VRML node. The MFNode field and event specifies zero or more nodes. The following example illustrates valid syntax for an MFNode field, fooNode, defining four nodes:
fooNode [ Transform { translation 1 0 0 } DEF CUBE Box { } USE CUBE USE SOME_OTHER_NODE ]
The SFNode field and event may contain the keyword NULL to indicate that it is empty.
The initial value of an SFNode eventOut is NULL. The initial value of an MFNode eventOut is [ ].
|
|
|
|
|
|
Generated on 24 Feb 2005 with version 1.3.9.1. |