SilverScreen Solid Modeler

PrimList.FromChildren method

PrimList.FromChildren method

Previous topic Next topic  

PrimList.FromChildren method

Previous topic Next topic JavaScript is required for the print function  

SilverSharpAPI

 

public static PrimList FromChildren ( string obj_path )

public static PrimList FromChildren ( OBJECT_NODE obj )

 

string      obj_path;   // A System.String

OBJECT_NODE obj;        // A SilverSharp.OBJECT_NODE data type

 

 




Synopsis

The PrimList.FromChildren methods  return a PrimList object that will enumerate all of the primitives of an object entity.

 

 

Parameters

obj_path is a string that contains a SilverScreen path to the object whose primitives are to be enumerated

 

obj is a SilverSharp.OBJECT_NODE handle to the object whose primitives are to be enumerated

 

 

Return Value

FromChildren returns a PrimList class

 

 

Remarks

This function retrieves every child of an object entity, but will not delve into children of primitives that serve as containers (such as POLYGON_NODEs).

 

 

See Also

PrimList, FromPgroup

 

 

Example

To visit all the children of an object entity, do this:

 

C# Code

 

 using SilverSharp;

 

 . . .

 

 PrimList pl = PrimList.FromChildren("\\assembly\\a1\\a2\\claw\\claw1");

   

 foreach ( PRIM_NODE prim in pl )

    {

    VisitOnePrimitive(prim);

    }

 

 

To visit all the children of a polygon primitive, do this:

C# Code

 

 using SilverSharp;

 

 . . .

 

 POLYGON_NODE poly = get_prim("\\base.2");

 

 foreach ( PRIM_NODE prim in poly.Children )
    {

    VisitOnePrimitive(prim);

    }