STK Graphics PrimitivesSend comments on this topic.
IAgStkGraphicsSurfacePolygonTriangulatorInitializer Interface

Description

Triangulates a polygon, with an optional hole, on a central body, into a triangle mesh and a surrounding boundary. The mesh is commonly visualized with the Triangle Mesh Primitive or Surface Mesh Primitive. The boundary is commonly visualized with the Polyline Primitive.

Public Methods

Public Method ComputeComputes the triangulation on the specified centralBody for a polygon whose boundary is defined by the specified positions. This is equivalent to calling Compute with an altitude of 0, a granularity of 1 degree, and a positionsWindingOrder of Compute.
Public Method ComputeCartographicFor convenience. Computes the triangulation on the specified centralBody for a polygon whose boundary is defined by the specified Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Compute.
Public Method ComputeCartographicWithAltitudeAndGranularityFor convenience. Computes the triangulation on the specified centralBody for a polygon whose boundary is defined by the specified Cartographic positions. This is equivalent to converting each position in positions to Cartesian and calling Compute.
Public Method ComputeWithAltitudeAndGranularityComputes the triangulation on the specified centralBody for a polygon whose boundary is defined by the specified positions.
Public Method ComputeWithHoleComputes the triangulation on the specified centralBody for a polygon whose boundary is defined by the specified positions with a hole specified by holePositions. This is equivalent to calling Compute with an altitude of 0 and a granularity of 1 degree.
Public Method ComputeWithHoleAltitudeAndGranularityComputes the triangulation on the specified centralBody for a polygon whose boundary is defined by the specified positions with a hole specified by holePositions.

Example

Draw a new Surface Extent Triangulator
[Python - STK API]
# IAgScenario scenario: Scenario object
manager = scenario.SceneManager
texture = manager.Textures.LoadFromStringUri(r'C:\Program Files\AGI\STK 12\STKData\VO\Textures\AGI_logo_small.png')
mesh = manager.Initializers.SurfaceMeshPrimitive.Initialize()
mesh.Texture = texture
mesh.Translucency = 0
cartographicExtent = [[-55], [10], [-24], [30]]

triangles = manager.Initializers.SurfaceExtentTriangulator.ComputeSimple('Earth', cartographicExtent)
mesh.Set(triangles)
mesh.Translucency = .25
c0 = [[10], [-55]]
c1 = [[30], [-55]]
c2 = [[30], [-24]]
c3 = [[10], [-24]]

mesh.TextureMatrix = manager.Initializers.TextureMatrix.InitializeWithRectangles(c0, c1, c2, c3)
mesh.TransparentTextureBorder = True
manager.Primitives.Add(mesh)
manager.Render()

Draw a new Surface Extent Triangulator
[MATLAB]
% IAgScenario scenario: Scenario object
manager = scenario.SceneManager;
texture = manager.Textures.LoadFromStringUri('c:\Program Files\AGI\STK 12\STKData\VO\Textures\AGI_logo.png');
mesh = manager.Initializers.SurfaceMeshPrimitive.Initialize();
mesh.Texture = texture;
mesh.Translucency = 0;
cartographicExtent = {-55;10;-24;30};

triangles = manager.Initializers.SurfaceExtentTriangulator.ComputeSimple('Earth', cartographicExtent);
mesh.Set(triangles);
mesh.Translucency = .25;
c0 = {10;-55};
c1 = {30;-55};
c2 = {30;-24};
c3 = {10;-24};

mesh.TextureMatrix = manager.Initializers.TextureMatrix.InitializeWithRectangles(c0, c1, c2, c3);
mesh.TransparentTextureBorder = true;
manager.Primitives.Add(mesh);
manager.Render();


        

See Also

© 2024 Analytical Graphics, Inc. All Rights Reserved.