IndexArray (FacetCollection) *

Description

Returns a SafeArray of indices from the Geometry.Facets collection.

C# Syntax

    // get accessor
    Object rtn = FacetCollection.IndexArray;

Examples

JScript Example

    NewScene( null, false );
    var oRoot = ActiveProject.ActiveScene.Root;
    var oCube = oRoot.AddGeometry( "Cube", "MeshSurface" );
    var oGeometry = oCube.ActivePrimitive.Geometry;

    // Since this property returns a safearray, we have to
    // convert it to a JScript array before using it
    var vbaIndices = oGeometry.Facets.IndexArray;
    var aIndices = vbaIndices.toArray()

    for ( var i=0; i<aIndices.length; i++ ) {
       LogMessage( "facet[" + i + "]" + ", Index : " + aIndices[i] );
    }

    // Expected result:
    //INFO : facet[0], Index : 0
    //INFO : facet[1], Index : 1
    //INFO : facet[2], Index : 2
    //INFO : facet[3], Index : 3
    //INFO : facet[4], Index : 4
    //INFO : facet[5], Index : 5

Autodesk Softimage v7.5