SilverScreen Solid Modeler

VertexList        

VertexList        

Previous topic Next topic  

VertexList        

Previous topic Next topic JavaScript is required for the print function  

SilverSharpAPI

 

VertexList

 

 


A VertexList enumerator is used to traverse a list of SilverSharp SS_XYZs. Because the VertexList class supports the IEnumerable interface, the enumerators in an VertexList work with the Visual-C# foreach statement.

 



C# Code

 

 public class VertexList : System.Collections.IEnumerable

    {

    public SS_XYZ this[int index];

    public UInt32 Count;

 

    public static VertexList FromObject(OBJECT_NODE obj);

    public static VertexList FromObject(string      obj_path);

    };

 

 

 

Properties

Property

Description

this [int index]

A read-only indexer to access a VertexList as if it were an array

Count

A read-only value that is the number of vertices in the VertexList

 

 

Methods

Name

Meaning

FromObject

Enumerate every vertex in an object entity

 


Remarks

An VertexList object is contained in object entities as the Vertices property

 


See Also

OBJECT_NODE, SS_XYZ

 


Example

The following code enumerates all of the vertices contained in a SilverSharp OBJECT_NODE:

C# Code

using SilverSharp;

 

. . .

 

OBJECT_NODE obj = SC.get_bos("\\assembly\\a1\\a2\\claw\\claw2");

 

foreach ( SS_XYZ vertex in obj.Vertices )

  {

  VisitOneVertex(vertex);

  }

 

 

Since a VertexList defines an iterator, the following code would work similarly:

C# Code

using SilverSharp;

 

. . .

 

OBJECT_NODE obj = get_bos("\\assembly\\a1\\a2\\claw\\claw2");

Uint32   i;

 

for (i = 1; i <= obj.Vertices.Count; i++)

  {

  VisitOneVertex(obj.Vertices[i]);

  }