SetDeclaration Data Member Function

Forms a relationship between the <StructInstanceNode> and the <StructNode> for which it is a variable. For example, given the expression 'struct S { vec3 v; };' and the expression 'S s', 's' is represented by the <StructInstanceNode> and 'S' is the <StructNode>. This function configures the <StructInstanceNode> object's underlying <NodeSelector> object to refer to the <StructNode> ( whether it is in the same document or in a remote document ). Requires the <StructInstanceNode> to have been added to a <Model3D> via Model3D.AddNode(), and the <Model3D> must have been saved at least once ( because it must have a valid filename ).

Prototype

int32 SetDeclaration( Model3D p_oModel, Node p_oStructNode )

Parameters

Parameter Type Parameter Name Documentation
<Model3D>p_oModelA pointer to the <Model3D> in which the <StructInstanceNode> is resident.
<Node>p_oStructNodeA pointer to the <StructNode> that serves as the declaration type for the <StructInstanceNode>.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.