AGI STK Graphics 11 Send comments on this topic.
ComputeWithAltitudeAndGranularity Method (IAgStkGraphicsSurfacePolygonTriangulatorInitializer)
See Also  Example
CentralBody
The central body to compute the triangulation on.
Positions
An array containing positions (in the order x, y, z) defining the boundary of the polygon, in the centralBody's fixed reference frame, to triangulate.
Altitude
The altitude of the triangulation. When 0, the mesh is computed to conform to the ellipsoid.
Granularity
The angular separation, in radians, of positions in the triangulation. Lower granularities are more precise but create more triangles.
PositionsWindingOrder
The winding order of positions.





Description

Computes the triangulation on the specified centralBody for a polygon whose boundary is defined by the specified positions.

Syntax

[Visual Basic .NET]
Public Function ComputeWithAltitudeAndGranularity( _
   ByVal CentralBody As String, _
   ByRef Positions As System.Array, _
   ByVal Altitude As Double, _
   ByVal Granularity As Double, _
   ByVal PositionsWindingOrder As AgEStkGraphicsWindingOrder _
) As IAgStkGraphicsSurfaceTriangulatorResult

[C#]
public IAgStkGraphicsSurfaceTriangulatorResult ComputeWithAltitudeAndGranularity(
string CentralBody,
ref System.Array Positions,
double Altitude,
double Granularity,
AgEStkGraphicsWindingOrder PositionsWindingOrder
);

[Managed C++]
public: IAgStkGraphicsSurfaceTriangulatorResult^ ComputeWithAltitudeAndGranularity(
String __gc ^ CentralBody,
System::Array ^^ Positions,
double Altitude,
double Granularity,
AgEStkGraphicsWindingOrder PositionsWindingOrder
);

[Java]
public IAgStkGraphicsSurfaceTriangulatorResult computeWithAltitudeAndGranularity(
String CentralBody,
Object[] Positions,
double Altitude,
double Granularity,
AgEStkGraphicsWindingOrder PositionsWindingOrder
);

[Unmanaged C++]
public: HRESULT ComputeWithAltitudeAndGranularity(
BSTR CentralBody,
SAFEARRAY ** Positions,
double Altitude,
double Granularity,
AgEStkGraphicsWindingOrder PositionsWindingOrder,
IAgStkGraphicsSurfaceTriangulatorResult ** ReturnValue
);

Parameters

CentralBody
The central body to compute the triangulation on.
Positions
An array containing positions (in the order x, y, z) defining the boundary of the polygon, in the centralBody's fixed reference frame, to triangulate.
Altitude
The altitude of the triangulation. When 0, the mesh is computed to conform to the ellipsoid.
Granularity
The angular separation, in radians, of positions in the triangulation. Lower granularities are more precise but create more triangles.
PositionsWindingOrder
Member Value Description
eStkGraphicsWindingOrderCounterClockwise 0 Positions or triangles are defined in counter-clockwise order.
eStkGraphicsWindingOrderClockwise 1 Positions or triangles are defined in clockwise order.
eStkGraphicsWindingOrderCompute 2 The winding order is unknown and should be computed. For best performance, only use this value if you do not know the actual winding order.
The winding order of positions.

Example

Shows the format of the Positions and HolePositions parameters when computing using a surface polygon triangulator.
[C#] Copy Code
Array positions = new object[] 

    1097959.63, -5171334.093556288
    1007572.15, -5150349.713612667.74
    978879.05, -5195164.233556326.55
    1037389.68, -5188523.963549473.77
    1097959.63, -5171334.093556288 
}; 
 
Array holePositions = new object[] 

    1079859.69, -5169944.963563791.24
    1030755, -5179965.113563781.97
    1028569.57, -5145251.033614006.53
    1039944.33, -5153880.713598525.9
    1027115.87, -5150522.493606951.77
    1026998.55, -5162243.133590303.25
    1079859.69, -5169944.963563791.24 
}; 
 
IAgStkGraphicsSurfaceTriangulatorResult result = sceneManager.Initializers.SurfacePolygonTriangulator.ComputeWithHole("Earth"ref positions, ref holePositions); 
 

Shows the format of the Positions and HolePositions parameters when computing using a surface polygon triangulator.
[Visual Basic .NET] Copy Code
Dim positions As Array = New Object() {1097959.63, -5171334.09, 3556288, 1007572.15, -5150349.71, 3612667.74, _
    978879.05, -5195164.23, 3556326.55, 1037389.68, -5188523.96, 3549473.77, _
    1097959.63, -5171334.09, 3556288}

Dim holePositions As Array = New Object() {1079859.69, -5169944.96, 3563791.24, 1030755, -5179965.11, 3563781.97, _
    1028569.57, -5145251.03, 3614006.53, 1039944.33, -5153880.71, 3598525.9, _
    1027115.87, -5150522.49, 3606951.77, 1026998.55, -5162243.13, 3590303.25, _
    1079859.69, -5169944.96, 3563791.24}

Dim result As IAgStkGraphicsSurfaceTriangulatorResult = sceneManager.Initializers.SurfacePolygonTriangulator.ComputeWithHole("Earth", positions, holePositions)

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1