Drawing3d documented Class Library

MNDevice Properties

The properties of the MNDevice class are listed below. For a complete list of MNDevice class members, see the MNDevice Members topic.

Public Instance Properties

Ambient Gets and sets the ambient part of the Material-property.
BackColor Retrieves and sets the color of the background.
Camera The Camera defines the lookout of the device You can get or set.
CatchDisplayListDirty Deutsch: Um ein Catchen mit guter Performance zu erreichen, wird eine Liste von umschließenden Rechtecken für jeden Zeichenbefehl erstellt. Im Fall, dass sich die Zeichnungsausgabe ändert, muss diese Liste neu erstellt werden. Durch Setzen von CatchDisplayListDirty auf den Wert true, wird erreicht,dass vor dem nächsten Catchvorgang die Liste neu erstellt wird.
CatchDistance With this value magnetism is controlled.
Objects that are closer as Catchdistance, will be added to the HitItemlist.
It is the distance in screen coordinate. By default the value is 5 pixels.
CatchDistanceF Converts the value CatchDistance in world distance.
Clockwise Gives the orientation of the painted regions. If you paint with "wrong"- Orientation and the Culling has the value true, nothing occurs on thescreen.
Culling Gets or sets the the cullingvalue of the graphic output. If Culling has the value true, the polygons, which has an other Orientation as is given by Clockwise will bee omitted. A Cullingvalue of true increases the performance, becaus only thes sides of an object will be draw, which looks to the observer.
CurrentHit If a hit happens, CurrentHit holds the first element if HitItemlist
Currentxyz Returns the 3-point, which is allocated by the cursor and magnetism to some objects, given in world coordinates
DCReservation If you set this property true, the Device crates at first a Device context DC and release this at the end. If you set this property false, the Device creates for a painting a device context and release them immediately.
Diffuse Gets and sets the diffuse part of the Material-property.
DisplayListCreatingState If you create a displaylist with getDisplayList this field has the value true, running the DrawNotify event )
Emisson Gets and sets the emission part of the Material-property.
EventServer The Eventsever handles all MouseEvents and Keyevents by distributing to it IEvents. See EventServer
Eye Returns the point of view.
EyeDistance This is the distance from the Eye to the projection plane. In case of orthogonal projection we have a fix EyeDistance of 30, otherwise the distance is given by WorldWidth/(2*Tan(FieldOfView));
FarClipping Sets or gets the far clipping distance. She is relative to the Eye. By default she is 50. This means an object, which is further away from the eye than 50, logical unit will be clipped.
FieldOfView Sets or gets the filed of view angle. If this is 0 the Projection is orthogonal. if the value is greather 0 the projection to tscreen is perspective.
Fnavigating
FontName Sets or gets the name of the current font. A call to drawText uses this font.
FontSize Determines the size of the font in logical units.
See also drawText
FontStyle Gets or set a style for the current Font
Graphics Yo can use any graphics for the output Bitmap
HitEnabled If HitEnabled = true then the select procedure works, otherwise it is turned off. Default it is true. Also see HitItemlist
HitItemlist HitItemlist contains Hititems, which belongs to the selected drawing elements. This are elements, which lay in the near of the Point p, for which the method Select was called. See also HitItemList
Lighting Controls, whether the lighting is activated or not.
Lights Contains the D3DLights, which are used by the device
Material Sets and gets the Material.
ModelMatrix 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()

Navigate If Navigate is true, you can navigate in the scene by pressed mousemoves.
NavigateAngles Gets or sets the three angles yaw, pitch and roll to the camera of the device.
NearClipping Sets or gets the nearclipping distance. It is relative to the Eye. By default, it is 1. This means that an object, which is closer to the Eye as 1 logical unit will be clipped.
OwnWndProc The device generates a own wndproc for the WinControl, if OwnWndProc is set to true. Default is true.
PaintFloatEnable If you have the situation, that only a part of the scene has changed and you dont want refresh the hole scene you can use the following concept:
1. Set PaintFloatEnable 2. Add a drawEvent to OnPaintFloatOnPaintFloat. 3. Every time, when the "small" scene has changed, call FastRefresh
Panning Sets or gets a Point which contains the x and y Panning of the screen.
PenColor With this color the lines of an object will be drawn. Also see PolygonMode
PenStyle Sets or gets the PenStyle, which that it will be drawn.
PenWidth Sets or gets the width of a pen.
PixelsPerUnit Set and gets the number of pixels per logical unit. Default is 30. A larger value makes a scene bigger.
PolygonMode The PolygonMode indicates, whether the scene is drawn as line model or as fully rendered model. See PolygonMode
PositionPipe The items of this list are called whenever the position will be changed by a mouse event. You can use it to manipulate the Currentxyz Position
ProjectionBase Gets or sets the projection base in which the scene will be projected. You can also transform the
...
// rotate the projectionbase around her x-axis
Base P = Device.ProjectionBase;
P = P.mul(Math.Matrix.Rotation(P.Basex, Math.PI/6)); 
Device.ProjectionBase = P

...

ProjectionMatrix Contains information about the projection of 3D-Data to the screen The matrix will be influenced by setting the FieldOfView. But you can set this directly for example:
// initialize ProjectionMatrix by a frustum 
ProjectionMatrix = Math.Matrix.Frustum(-10, 10, -10, 10, 2, 50);
// or 
ProjectionMatrix = Matrix.Orthogonal(left,right,bottom,top,-20,20);

RenderMode This property holds the RenderMode. He indicates the kind of drawing. If RenderMode = Nothing the device is not in a paint state. The RenderMode = Select is used to calculate the selection. See Select The RenderMode = MaxBox is used to calculate an environment box for an object. The RenderMode = MaxRect is used to calculate a rectangle for an object.
Root If you set this property to a Entity, the the entity will be drawn with all its children. Apart of this the ActriveCtrl Work will be drawn by the device. Work
Shadow U can use this property to produce shadows.With ShadowKind you can set the used algoritm: TextureShadow or ShadowVolume.
ShadowKind If the property Shadow is true, one of the both algoritm are used: TextureShadow or ShadowVolume. TextureShadow is much faster then ShadowVolume. In the Shadowvolumealgorithm all the callculations are made in the CPU.
ShadowSetting You can get or set a ShadowSettings-object. ShadowSetting will be usend if Shadow is true and a Shadow will be painted.
Shininess Gets and sets the Shininess of the Material-property.
Specular Gets and sets the specular part of the Material-property.
SwapbuffersEnabled Sets or gets a value, which indicates, wheter the SwapBuffers - will be executed or not.
texture Sets and gets a Texture, which will be drawn.
TextureMatrix Gets and sets a transformation for a texture.
Timer Every device contains a Timer. See also OnTick and TimerEnable.
TimerEnable Gets or set the Timer.Enable-property
ToGlobal With this Matrix you are able to convert local coordinates to global coordinates. ToLocal
Translucent Gets and sets the Translucency of the Material-property.
ViewPort Set or gets the viewport of a device. As soon as it was setted, the method CheckViewPort is called. Addionally the event OnViewportChanged is fired. For example the viewport of a control is changed, if the size of the control is changed.
WinControl In general you use a Control to output the device drawings. It is possible to draw in a Bitmap or in a Graphics
Work This is an ActiveCtrl which is created by the Device. It is used as a Parent for ActiveCtrl Apart of this the Root will be drawn, if it is not null.
WorldHeight Gets the height of the window in logical units.
WorldLeftUp Gets the world coordinates of the left up point in the ViewPort .
WorldRightDown Gets the world coordinates of the right down point in the ViewPort .
WorldWidth Returns the width of the windows in logical units.
Zoomfactor Sets or gets the zoom factor of the scene. By default it is 1. If you want to play the scene with 200%, the set Zoofactor to 2;

See Also

MNDevice Class | Drawing3d Namespace