AGI STK Graphics 11 Send comments on this topic.
SetWithOptionalParameters Method (IAgStkGraphicsTriangleMeshPrimitive)
See Also  Example
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.
OptionalParameters
Optional parameters corresponding to positions.





Description

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

Syntax

[Visual Basic .NET]
Public Sub SetWithOptionalParameters( _
   ByRef Positions As System.Array, _
   ByRef Normals As System.Array, _
   ByRef Indices As System.Array, _
   ByVal OptionalParameters As IAgStkGraphicsTriangleMeshPrimitiveOptionalParameters _
) 

[C#]
public void SetWithOptionalParameters(
ref System.Array Positions,
ref System.Array Normals,
ref System.Array Indices,
IAgStkGraphicsTriangleMeshPrimitiveOptionalParameters OptionalParameters
);

[Managed C++]
public: void SetWithOptionalParameters(
System::Array ^^ Positions,
System::Array ^^ Normals,
System::Array ^^ Indices,
IAgStkGraphicsTriangleMeshPrimitiveOptionalParameters ^ OptionalParameters
);

[Java]
public  setWithOptionalParameters(
Object[] Positions,
Object[] Normals,
Object[] Indices,
IAgStkGraphicsTriangleMeshPrimitiveOptionalParameters OptionalParameters
);

[Unmanaged C++]
public: HRESULT SetWithOptionalParameters(
SAFEARRAY ** Positions,
SAFEARRAY ** Normals,
SAFEARRAY ** Indices,
IAgStkGraphicsTriangleMeshPrimitiveOptionalParameters * OptionalParameters
);

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.
OptionalParameters
Optional parameters corresponding to positions.

Remarks

See Triangle Mesh Primitive Optional Parameters for details on how to define parameters.

Example

Shows the format of the Positions, Normals and Indices parameters when updating a triangle mesh primitive.
[C#] Copy Code
Array positions = new object[] 

    000
    7000000
    0700000 
}; 
 
Array normals = new object[] 

    001
    001
    001 
}; 
 
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] Copy Code
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)

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1