Description
Access Constraint used for min/max
constraints.
Public Properties
EnableMax |
Enable the Max
property. |
EnableMin |
Enable the Min
property. |
Max |
Max value for the access
constrain. |
Min |
Min value for the access
constraint. |
Interfaces
Example
Add and configure a
sun elevation angle access constraint
[C#] |
Copy Code
|
IAgAccessCnstrMinMax minmax = accessConstraints.AddConstraint(AgEAccessConstraints.eCstrSunElevationAngle) as IAgAccessCnstrMinMax;
minmax.EnableMin = true;
minmax.Min = 22.2;
minmax.EnableMax = true;
minmax.Max = 77.7;
|
|
Add and configure a
lunar elevation angle access constraint
[C#] |
Copy Code
|
IAgAccessCnstrMinMax minmax = accessConstraints.AddConstraint(AgEAccessConstraints.eCstrLunarElevationAngle) as IAgAccessCnstrMinMax;
minmax.EnableMin = true;
minmax.Min = 11.1;
minmax.EnableMax = true;
minmax.Max = 88.8;
|
|
Add and configure an
altitude access constraint
[C#] |
Copy Code
|
IAgAccessCnstrMinMax altitude = accessConstraints.AddConstraint(AgEAccessConstraints.eCstrAltitude) as IAgAccessCnstrMinMax;
altitude.EnableMin = true;
altitude.Min = 20.5;
|
|
Enumerate the
available constraints collection
[C#] |
Copy Code
|
Array arAvailable = accessConstraints.AvailableConstraints();
for (int i = 0; i < arAvailable.GetLength(0); i++)
{
string availName = (string)arAvailable.GetValue(i, 0);
AgEAccessConstraints eAccessConstraint = (AgEAccessConstraints)(int)arAvailable.GetValue(i, 1);
Console.WriteLine("\tConstraint {0}: {1} ({2})", i, availName, eAccessConstraint);
}
|
|
Add and configure a
sun elevation angle access constraint
[Visual Basic .NET] |
Copy Code
|
Dim minmax As
IAgAccessCnstrMinMax =
TryCast(accessConstraints.AddConstraint(AgEAccessConstraints.eCstrSunElevationAngle),
IAgAccessCnstrMinMax)
minmax.EnableMin = True
minmax.Min = 22.2
minmax.EnableMax = True
minmax.Max = 77.7
|
|
Add and configure a
lunar elevation angle access constraint
[Visual Basic .NET] |
Copy Code
|
Dim minmax As
IAgAccessCnstrMinMax =
TryCast(accessConstraints.AddConstraint(AgEAccessConstraints.eCstrLunarElevationAngle),
IAgAccessCnstrMinMax)
minmax.EnableMin = True
minmax.Min = 11.1
minmax.EnableMax = True
minmax.Max = 88.8
|
|
Add and configure an
altitude access constraint
[Visual Basic .NET] |
Copy Code
|
Dim altitude As IAgAccessCnstrMinMax =
TryCast(accessConstraints.AddConstraint(AgEAccessConstraints.eCstrAltitude),
IAgAccessCnstrMinMax)
altitude.EnableMin = True
altitude.Min = 20.5
|
|
Enumerate the
available constraints collection
[Visual Basic .NET] |
Copy Code
|
Dim arAvailable As Array =
accessConstraints.AvailableConstraints()
Dim i As
Integer = 0
While i <>
Dim availName
As String
= DirectCast(arAvailable.GetValue(i, 0), String)
Dim
eAccessConstraint As
AgEAccessConstraints =
DirectCast(DirectCast(arAvailable.GetValue(i, 1), Integer), AgEAccessConstraints)
Console.WriteLine(vbTab & "Constraint {0}: {1} ({2})", i, availName,
eAccessConstraint)
System.Math.Max(System.Threading.Interlocked.Increment(i),i
- 1)
End While
|
|
CoClasses that Implement
IAgAccessCnstrMinMax