Sets the elements of the MFNode event-in slot.
C# |
---|
public abstract void SetValue (
Node[] value
) |
The following example demonstrates how to add two geometric
objects (a box and a sphere) to a Group node:
C# |
---|
Vrml.EAI.Node group = ...;
Vrml.EAI.Field.EventInMFNode addChildren = (Vrml.EAI.Field.EventInMFNode)group.GetEventIn("addChildren");
string vrmlCode =
"Transform {\n" +
" translation -2 0 0\n" +
" children [\n" +
" Shape {\n" +
" appearance Appearance {\n" +
" material Material {}\n" +
" }\n" +
" geometry Box {}\n" +
" }\n" +
" ]\n" +
"}\n" +
"Transform {\n" +
" translation 2 0 0\n" +
" children [\n" +
" Shape {\n" +
" appearance Appearance {\n" +
" material Material {}\n" +
" }\n" +
" geometry Sphere {}\n" +
" }\n" +
" ]\n" +
"}\n";
Vrml.EAI.Node[] nodes = browser.CreateVrmlFromString(vrmlCode);
addChildren.SetValue(nodes);
|