Click or drag to resize

ModelManagerSetModelMatrix Method

Set Model Matrix

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public void SetModelMatrix(
	float[] matrix
)

Parameters

matrix
Type: SystemSingle
Matrix
Examples
C#
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
    string file = "C:\\Model\\BLOCK.viz";

    vizcore3d.Model.Open(file);

    // ===============================
    //            Matrix
    // ===============================
    // 00       01      02      03
    // 10       11      12      13
    // 20       21      22      23
    // 30       31      32      33

    float[] matrix = new float[16];
    matrix[0] = 1.0f;   matrix[1] = 0.0f;   matrix[2] = 0.0f;   matrix[3] = 0.0f;
    matrix[4] = 0.0f;   matrix[5] = 1.0f;   matrix[6] = 0.0f;   matrix[7] = 0.0f;
    matrix[8] = 0.0f;   matrix[9] = 0.0f;   matrix[10] = 1.0f;  matrix[11] = 0.0f;
    matrix[12] = 0.0f;  matrix[13] = 0.0f;  matrix[14] = 0.0f;  matrix[15] = 1.0f;

    vizcore3d.Model.SetModelMatrix(matrix);

    vizcore3d.View.ResetView();

    vizcore3d.View.MoveCamera(Data.CameraDirection.Z_PLUS);
}
See Also