Description
IAgVOModelTransCollection Interface. A
collection of available transformations in the model.
Object Model
Public Properties
Count |
Returns a number of
elements in the collection. |
Item |
Returns a model
transformation by name or at a specified position. |
Name |
Name of the Model
Transformation. |
Example
Configure 3D model
articulations
[C#] |
Copy Code
|
IAgVOModelArtic modelArticulation = model.Articulation;
modelArticulation.EnableDefaultSave = false;
modelArticulation.EnableSaveArticFile = false;
int levelOfDetail = 0;
string articulation = "Satellite";
string transformation = "Size";
double currentTransVal = modelArticulation.GetTransValue(levelOfDetail, articulation, transformation);
double newTransVal = currentTransVal * 0.50;
modelArticulation.SetTransValue(levelOfDetail, articulation, transformation, newTransVal);
|
|
List all 3D model
articulations
[C#] |
Copy Code
|
IAgVOModelArtic modelArticulation = model.Articulation;
for (int lod = 0; lod < modelArticulation.LODCount; lod++)
{
Array articulations = modelArticulation.GetAvailableArticulations(lod);
for (int articulation = 0; articulation < articulations.Length; articulation++)
{
String articulationString = articulations.GetValue(articulation) as String;
IAgVOModelTransCollection transformations = modelArticulation.GetAvailableTransformations(lod, articulationString);
foreach (IAgVOModelTrans trans in transformations)
{
Console.WriteLine("Name: {0}, Current {1}, Max {2}, Min {3}", trans.Name, trans.Value, trans.Max, trans.Min);
}
}
}
|
|
Configure 3D model
articulations
[Visual Basic .NET] |
Copy Code
|
Dim modelArticulation As IAgVOModelArtic = model.Articulation
modelArticulation.EnableDefaultSave = False
modelArticulation.EnableSaveArticFile = False
Dim levelOfDetail As Integer = 0
Dim articulation As String =
"Satellite"
Dim transformation As String =
"Size"
Dim currentTransVal As Double =
modelArticulation.GetTransValue(levelOfDetail, articulation,
transformation)
Dim newTransVal As Double =
currentTransVal * 0.5
modelArticulation.SetTransValue(levelOfDetail, articulation,
transformation, newTransVal)
|
|
List all 3D model
articulations
[Visual Basic .NET] |
Copy Code
|
Dim modelArticulation As IAgVOModelArtic = model.Articulation
Dim lod As Integer = 0
While lod <>
Dim
articulations As Array =
modelArticulation.GetAvailableArticulations(lod)
Dim
articulation As Integer = 0
While
articulation <>
Dim articulationString As [String] =
TryCast(articulations.GetValue(articulation), [String])
Dim transformations As IAgVOModelTransCollection =
modelArticulation.GetAvailableTransformations(lod,
articulationString)
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
|
|