This page contains reference documentation for the Select function. This function selects a node in the scene graph.
int Select( Node NodeToSelect )
Function parameters are as follows:
Examples are as follows:
// Select nodes by name. Use Select to select the node if the name is the same.
if( testNode.Name == name )
{
Model.Select( testNode );
}
if( testNode.IsDerived( Group ) )
{
Group testGroup = (Group)testNode;
for( int i = 0; i < testGroup.ChildCount; ++i )
{
SelectNodesWithSameName( testGroup.Children[ i ], name );
}
}
// Select the remainder of a list below the current selection. Use Select to select nodes
// below the current selection
Model.DeselectAll();
int selectCount = Model.GetSelectCount();
for( int s = 0; s < selectCount; ++s )
{
Node node = Model.GetSelectedNode( s ).GetNode();
Group parent = node.Parent();
int startIndex = parent.GetChildIndex( node );
for( int c = startIndex; c < parent.ChildCount; ++c )
{
Model.Select( parent.Children[c] );
}
}
For sample code: