Drawing3d documented Class Library

MNDevice.ModelMatrix Property

The ModelMatrix plays an important rule. If scene data are going to the device they would be transformed first by the modelmatrix and then by the ProjectionMatrix. After this two transformations the data are laying in a cube, which is bounded by (-1, -1, -1) and (1, 1, 1). In the last step the points are positioned in the screen by expanding into the viewport. You see that the modelmatrix is a very powerful property.

Surface S = new Sphere(4);
Device.DrawSurface(S);
// save the modelmatrix
Device.PushMatrix()
Device.ModelMatrix = Device.ModelMatrix * Translation(new (5, 0, 0);
// this Sphere has the center at (5 /0 /0 ).
Device.DrawSurface(S);
Device.ModelMatrix = Device.ModelMatrix * Translation(new (5, 0, 0);
// this Sphere has the center at (5 /0 /0 ).
Device.DrawSurface(S);
// reset the Modelmatrix
Device.PopMatrix()

[Visual Basic]
<Browsable(Browsable:=False)> _
Public Property ModelMatrix() As Matrix
   Public Get
   End Get
   Public Set
   End Set
End Property
[C#]
[Browsable(Browsable=False)]
public Matrix ModelMatrix { public get; public set; }

See Also

MNDevice Class | Drawing3d Namespace