Description
Get 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
);
|
[Unmanaged C++] |
---|
public: HRESULT GetAvailableArticulations(
long LOD,
SAFEARRAY * * ppRetVal
);
|
[Java] |
---|
public AgSafeArray getAvailableArticulations(
int LOD
);
|
[Python - STK API ] |
---|
def GetAvailableArticulations(self, LOD:int) -> list:
|
Parameters
See Also
Example
List all 3D model articulations
[C#] |
---|
// 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] |
---|
' 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
|
|