STK Graphics PrimitivesSend comments on this topic.
Set Method (IAgStkGraphicsTriangleMeshPrimitive)
See Also
Positions
An array containing positions (in the order x, y, z) for the triangle mesh.
Normals
An array containing the normals (in the order x, y, z) used for lighting the triangle mesh. There must be one normal for each position in positions.
Indices
An array of integers containing the indices into positions and normals. A set of x, y, and z elements is considered a single index. Every 3 indices represent 1 triangle.
Windows





Windows & Linux

Description

Defines the triangle mesh using an indexed triangle list specified by positions, normals, and indices. The mesh is rendered in the primitive's Reference Frame.

Syntax

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

Parameters

Positions
An array containing positions (in the order x, y, z) for the triangle mesh.
Normals
An array containing the normals (in the order x, y, z) used for lighting the triangle mesh. There must be one normal for each position in positions.
Indices
An array of integers containing the indices into positions and normals. A set of x, y, and z elements is considered a single index. Every 3 indices represent 1 triangle.

Remarks

See Also

Example

Shows the format of the Positions, Normals and Indices parameters when updating a triangle mesh primitive.
[C#]
Array positions = new object[]
{
    0, 0, 0,
    70000, 0, 0,   
    0, 70000, 0
};

Array normals = new object[]
{
    0, 0, 1,
    0, 0, 1,   
    0, 0, 1
};

Array indices = new object[]
{
    0,
    1,
    2
};

triangleMesh.Set(ref positions, ref normals, ref indices);
Shows the format of the Positions, Normals and Indices parameters when updating a triangle mesh primitive.
[Visual Basic .NET]
Dim positions As Array = New Object() {0, 0, 0, 70000, 0, 0, _
	0, 70000, 0}

Dim normals As Array = New Object() {0, 0, 1, 0, 0, 1, _
	0, 0, 1}

Dim indices As Array = New Object() {0, 1, 2}

triangleMesh.[Set](positions, normals, indices)
© 2024 Analytical Graphics, Inc. All Rights Reserved.