SetDeclaration Data Member Function

Forms a relationship between the <StructInstanceArrayNode> and the <StructNode> for which it is a variable. For example, given the expression 'struct S { vec3 v; };' and the expression 'S s', 's[4]' is represented by the <StructInstanceArrayNode> and 'S' is the <StructNode>. This function configures the <StructInstanceArrayNode> object's underlying <NodeSelector> object to refer to the <StructNode> ( whether it is in the same document or in a remote document ). Requires the <StructInstanceArrayNode> to have been added to a Model via Model.AddNode(), and the Model 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 <StructInstanceArrayNode> is resident.
<Node>p_oStructNodeA pointer to the <StructNode> that serves as the declaration type for the <StructInstanceArrayNode>.

Examples

Copy Text To Clipboard

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