Drawing3d documented Class Library

OpenGlDevice Properties

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

Public Instance Properties

ActiveMultiTexture Gets active texture and sets it by a call to glActiveTextureARB(Gl.GL_TEXTURE0 + value);
Ambient (inherited from MNDevice) Gets and sets the ambient part of the Material-property.
BackColor (inherited from MNDevice) Retrieves and sets the color of the background.
Camera (inherited from MNDevice) The Camera defines the lookout of the device You can get or set.
CatchDisplayListDirty (inherited from MNDevice) 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 (inherited from MNDevice) 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 (inherited from MNDevice) Converts the value CatchDistance in world distance.
Clockwise (inherited from MNDevice) 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 (inherited from MNDevice) 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 (inherited from MNDevice) If a hit happens, CurrentHit holds the first element if HitItemlist
Currentxyz (inherited from MNDevice) Returns the 3-point, which is allocated by the cursor and magnetism to some objects, given in world coordinates
DCReservation (inherited from MNDevice) 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 (inherited from MNDevice) Gets and sets the diffuse part of the Material-property.
DisplayListCreatingState (inherited from MNDevice) If you create a displaylist with getDisplayList this field has the value true, running the DrawNotify event )
Emisson (inherited from MNDevice) Gets and sets the emission part of the Material-property.
EventServer (inherited from MNDevice) The Eventsever handles all MouseEvents and Keyevents by distributing to it IEvents. See EventServer
Eye (inherited from MNDevice) Returns the point of view.
EyeDistance (inherited from MNDevice) 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 (inherited from MNDevice) 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 (inherited from MNDevice) 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 (inherited from MNDevice)
FontName (inherited from MNDevice) Sets or gets the name of the current font. A call to drawText uses this font.
FontSize (inherited from MNDevice) Determines the size of the font in logical units.
See also drawText
FontStyle (inherited from MNDevice) Gets or set a style for the current Font
Graphics (inherited from MNDevice) Yo can use any graphics for the output Bitmap
HitEnabled (inherited from MNDevice) If HitEnabled = true then the select procedure works, otherwise it is turned off. Default it is true. Also see HitItemlist
HitItemlist (inherited from MNDevice) 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 (inherited from MNDevice) Controls, whether the lighting is activated or not.
Lights (inherited from MNDevice) Contains the D3DLights, which are used by the device
Material (inherited from MNDevice) Sets and gets the Material.
ModelMatrix (inherited from MNDevice) 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);
// save the modelmatrix
Device.ModelMatrix = Device.ModelMatrix * Translation(new (5, 0, 0);
// this Sphere has the center at (5 /0 /0 ).
Device.ModelMatrix = Device.ModelMatrix * Translation(new (5, 0, 0);
// this Sphere has the center at (5 /0 /0 ).
// reset the Modelmatrix

Navigate (inherited from MNDevice) If Navigate is true, you can navigate in the scene by pressed mousemoves.
NavigateAngles (inherited from MNDevice) Gets or sets the three angles yaw, pitch and roll to the camera of the device.
NearClipping (inherited from MNDevice) 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 (inherited from MNDevice) The device generates a own wndproc for the WinControl, if OwnWndProc is set to true. Default is true.
PaintFloatEnable (inherited from MNDevice) 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 (inherited from MNDevice) Sets or gets a Point which contains the x and y Panning of the screen.
PenColor (inherited from MNDevice) With this color the lines of an object will be drawn. Also see PolygonMode
PenStyle (inherited from MNDevice) Sets or gets the PenStyle, which that it will be drawn.
PenWidth (inherited from MNDevice) Sets or gets the width of a pen.
PixelsPerUnit (inherited from MNDevice) Set and gets the number of pixels per logical unit. Default is 30. A larger value makes a scene bigger.
PolygonMode (inherited from MNDevice) The PolygonMode indicates, whether the scene is drawn as line model or as fully rendered model. See PolygonMode
PositionPipe (inherited from MNDevice) 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 (inherited from MNDevice) 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 (inherited from MNDevice) 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 (inherited from MNDevice) 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 (inherited from MNDevice) 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 (inherited from MNDevice) U can use this property to produce shadows.With ShadowKind you can set the used algoritm: TextureShadow or ShadowVolume.
ShadowKind (inherited from MNDevice) 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 (inherited from MNDevice) You can get or set a ShadowSettings-object. ShadowSetting will be usend if Shadow is true and a Shadow will be painted.
Shininess (inherited from MNDevice) Gets and sets the Shininess of the Material-property.
Specular (inherited from MNDevice) Gets and sets the specular part of the Material-property.
SwapbuffersEnabled (inherited from MNDevice) Sets or gets a value, which indicates, wheter the SwapBuffers - will be executed or not.
texture (inherited from MNDevice) Sets and gets a Texture, which will be drawn.
Texturedisabled If true no texture will be drawn
TextureMatrix (inherited from MNDevice) Gets and sets a transformation for a texture.
Timer (inherited from MNDevice) Every device contains a Timer. See also OnTick and TimerEnable.
TimerEnable (inherited from MNDevice) Gets or set the Timer.Enable-property
ToGlobal (inherited from MNDevice) With this Matrix you are able to convert local coordinates to global coordinates. ToLocal
Translucent (inherited from MNDevice) Gets and sets the Translucency of the Material-property.
ViewPort (inherited from MNDevice) 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 (inherited from MNDevice) In general you use a Control to output the device drawings. It is possible to draw in a Bitmap or in a Graphics
Work (inherited from MNDevice) 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 (inherited from MNDevice) Gets the height of the window in logical units.
WorldLeftUp (inherited from MNDevice) Gets the world coordinates of the left up point in the ViewPort .
WorldRightDown (inherited from MNDevice) Gets the world coordinates of the right down point in the ViewPort .
WorldWidth (inherited from MNDevice) Returns the width of the windows in logical units.
Zoomfactor (inherited from MNDevice) 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

OpenGlDevice Class | Drawing3d.Devices Namespace