AGI STK Objects 11 Send comments on this topic.
GetAvailableArticulations Method (IAgVOModelArtic)
See Also  Example
LOD
The level of detail. Usually 0.





Description

The available articulations.

Syntax

[Visual Basic .NET]
Public Function GetAvailableArticulations( _
   ByVal LOD As Integer _
) As System.Array

[C#]
public System.Array GetAvailableArticulations(
int LOD
);

[Managed C++]
public: System::Array GetAvailableArticulations(
int LOD
);

[Java]
public Object[] getAvailableArticulations(
int LOD
);

[Unmanaged C++]
public: HRESULT GetAvailableArticulations(
long LOD,
SAFEARRAY ** Array
);

Parameters

LOD
The level of detail. Usually 0.

Example

List all 3D model articulations
[C#] Copy Code
// Enumerating through the transformation collection is helpful if you do not 
// know what tranformations exist or their value ranges 
 
IAgVOModelArtic modelArticulation = model.Articulation; 
 
for (int lod = 0; lod < modelArticulation.LODCount; lod++) 

    // Get all articulations 
    // GetAvailableArticulations returns a one dimensional array of articulation names 
    Array articulations = modelArticulation.GetAvailableArticulations(lod); 
 
    // Enumerate through available articulations 
    for (int articulation = 0; articulation < articulations.Length; articulation++) 
    { 
        // We need the articulation string to call the GetAvailableTransformations function 
        String articulationString = articulations.GetValue(articulation) as String
 
        // Get all transformations 
        IAgVOModelTransCollection transformations = modelArticulation.GetAvailableTransformations(lod, articulationString); 
 
        // Enumerate through available transformations 
        foreach (IAgVOModelTrans trans in transformations) 
        { 
            Console.WriteLine("Name: {0}, Current {1}, Max {2}, Min {3}", trans.Name, trans.Value, trans.Max, trans.Min); 
        } 
    } 

 

List all 3D model articulations
[Visual Basic .NET] Copy Code
' Enumerating through the transformation collection is helpful if you do not
' know what tranformations exist or their value ranges

Dim modelArticulation As IAgVOModelArtic = model.Articulation

Dim lod As Integer = 0
While lod < modelArticulation.LODCount
    ' Get all articulations
    ' GetAvailableArticulations returns a one dimensional array of articulation names
    Dim articulations As Array = modelArticulation.GetAvailableArticulations(lod)

    ' Enumerate through available articulations
    Dim articulation As Integer = 0
    While articulation < articulations.Length
        ' We need the articulation string to call the GetAvailableTransformations function
        Dim articulationString As [String] = TryCast(articulations.GetValue(articulation), [String])

        ' Get all transformations
        Dim transformations As IAgVOModelTransCollection = modelArticulation.GetAvailableTransformations(lod, articulationString)

        ' Enumerate through available transformations
        For Each trans As IAgVOModelTrans In transformations
            Console.WriteLine("Name: {0}, Current {1}, Max {2}, Min {3}", trans.Name, trans.Value, trans.Max, trans.Min)
        Next
        System.Math.Max(System.Threading.Interlocked.Increment(articulation),articulation - 1)
    End While
    System.Math.Max(System.Threading.Interlocked.Increment(lod),lod - 1)
End While

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1