STK Graphics PrimitivesSend comments on this topic.
SetSubset Method (IAgStkGraphicsPolylinePrimitive)
See Also
Positions
An array of positions in the order x, y, z. The subset of this array defined by index and count define the new positions for the polyline.
Index
A zero-based index into positions that defines the first position copied to the polyline. Note that this index considers a set of x, y, and z coordinates as a single element.
Count
The number of elements in positions copied to the polyline. Note that is number considers a set of x, y, and z elements as a single element.
Windows





Windows & Linux

Description

Defines the positions of a polyline using a subset of input positions.

Syntax

[Visual Basic .NET]
Public Sub SetSubset( _
    ByVal Positions As System.Array, _
    ByVal Index As Integer, _
    ByVal Count As Integer _
)
[C#]
public void SetSubset(
    System.Array Positions,
    int Index,
    int Count
);
[Managed C++]
public: void SetSubset(
    System::Array ^ Positions,
    int Index,
    int Count
);
[Unmanaged C++]
public: HRESULT SetSubset(
    SAFEARRAY * * Positions,
    int Index,
    int Count
);
[Java]
public void setSubset(
    AgSafeArray Positions,
    Integer Index,
    Integer Count
);
[Python - STK API ]
def SetSubset(self, Positions:list, Index:int, Count:int) -> None:

Parameters

Positions
An array of positions in the order x, y, z. The subset of this array defined by index and count define the new positions for the polyline.
Index
A zero-based index into positions that defines the first position copied to the polyline. Note that this index considers a set of x, y, and z coordinates as a single element.
Count
The number of elements in positions copied to the polyline. Note that is number considers a set of x, y, and z elements as a single element.

Remarks

When the caller has an array of positions and wants to define a polyline primitive using a continuous subset of the array, calling SetSubset is more convenient and efficient than copying the positions into a temporary array and calling Set

See Also

Example

Shows the format of the Positions parameter when updating a polyline primitive.
[C#]
Array positions = new object[]
{
    1247.87, -4739.74, 4067.77,
    1115.48, -4847.09, 3979.36,   
    -24.12, -5529.31, 3168.45,
    -2683.42, -4307.74, 3850.11
};

polyline.SetSubset(
    ref positions,
    1,
    2);
Shows the format of the Positions parameter when updating a polyline primitive.
[Visual Basic .NET]
Dim positions As Array = New Object() {1247.87, -4739.74, 4067.77, 1115.48, -4847.09, 3979.36, _
	-24.12, -5529.31, 3168.45, -2683.42, -4307.74, 3850.11}

polyline.SetSubset(positions, 1, 2)
© 2024 Analytical Graphics, Inc. All Rights Reserved.