Drawing3d documented Class Library

MNDevice Methods

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

Public Instance Methods

addLight With this method you can add a Light.
BeginPaint The first call in the Paint-method is BeginPaint. It clears the Background by ClearScreen and sets the ProjectionBase
Changed Call this method, if the outlook of the device has been changed. Refresh invokes every time a Painting, but the method Changed() waits for example if all mousevents are called. So it is better for the performance to call Changed.
ClearScreen In the BeginPaint- Method ClearScreen is called. This method depends on the graphic engine and must be overridden?.
ClipPlane A call to this method hides all parts on the side of the Plane, which are on the other side of the planes normalvector. Id is an integer between 0 and 7.
Close Closes the device.
DeleteTexture Delete a Texture in a Device and gives its handle free.
DisableClipPlane Disable the Clippingplane, which was called by ClipPlane
DisplayListFree Removes a display list from the engine.
DisplayListPlay Draws a display list, which is created by getDisplayList
DoPaint DoPaint calls the paintmetod of the Root at first, then the paintmethod of the Work and finally the OnPaint-event.
drawCurveOverloaded. Draw a Curve
DrawEntity If you have an Entity with an overridden Drawing3d.Entity.Draw(MNDevice) or a filled Entity.OnDraw, you can call this method. It will call the drawmethods of the entity.
drawImageOverloaded. This primitive draw method draws an Image at a xyz-position relative to the projection base. The image is static, if you change the the ProjectionBase.
drawLine Draw a Line From A to B.
drawMesh Draws a Mesh.
drawPointOverloaded. Draws a point. The kind of drawing is described in pt. MNDevice.PointData
drawPolyCurve Draws an array of curve.
drawPolyLine Draws a Polyline. If PolygonMode = Fill, a filled area bounded by lines is drawn, but they shouldn`t have any cross points.
drawPolyPolyCurve This primitive draw method draws a Loca. In case of PolygonMode = line, simple curves are drawn. If PolygonMode = Fill, then a filled area, bounded by curves, is drawn. The Loca must have the property that the entries are coherent curve arrays and additionally, there are no cross points. If this is done, the curve arrays, which lay in an other filled curve array is "drawn as hole". If it lays in a hole, the curvearray is filled drawn.
drawPolyPolyLineOverloaded. Draws a Polypolyline with Normals
drawSphere Draws a sphere at (0,0,0) with "Radius"
drawSurfaceOverloaded. Call the drawSurface-method with resolutions taken from the surface. See UResolution and VResolution.
drawText This primitive drawmethod writes a Text in a xyz-position.
drawTextureOverloaded. Draws a texture at a position.
drawTriangle Draws a triangle with Normals and texture, which is given by TexturePos
EndPaint The last call in the Paint-method is EndPaint. It fires the SwapBuffers-method
Equals (inherited from Object) 
FastRefresh Copies the Background to the to Drawbuffer and invokes the OnPaintFloat-method. At least a SwapBuffers-call moves the drawbuffer to the screen. "Background" means in that context: All paintings, which are made in a drawmethod. The "Foreground" is painted in a drawFlo
FromScrOverloaded. Calculates a Line from a Screen coordinate to the Camera.
getDisplayList Contructs a display list and returns that. You can draw this list with DisplayListPlay and destroy by DisplayListFree
GetGlyphOutLine Returns a Loca for the Curves of a Char.
GetHashCode (inherited from Object) 
GetMaxBoxOverloaded. Gets a envelopping box for all elements rendered by the device.
GetSmoothBase Retrieves a Base, which lies on the catched object. The direction of the x-axes is given by the direction of a catched Direction, the z-axis is the normal of a catched Normal. The BaseOrigin is put to the nearestpoint to the point closest to the the catch object. If you draw this base, it smooths around the object, which lays under the cursor.
GetTextExtent Gets an extending rectangle for a string, using the current Font
GetType (inherited from Object) 
LookAt Sets the camera of the device.
MakeCurrent If you have more devices this call makes it current
MouseUp The device gets the MouseUp-event from the WinControl.
MulMatrix By a call of MulMatrix the modelmatrix will be multiplied by a the transformation matrix. And so you can transform your drawings.
MulTextureMatrix By a call of MulTextureMatrix the TextureMatrix will be multiplied by a the transformation matrix. And so you can transform your drawings. Matrix, which transform the TexureMatrix.
Paint Paint calls the three methods BeginPaint, DoPaint and EndPaint. The Method is allways called, if WinControl should be painted.
PopMatrixOverloaded. To save the ModelMatrix for a short time you can push it with PushMatrix and restore with PopMatrix.
popTag Pops a tag, which was pushed with pushTag
PushMatrixOverloaded. To save the ModelMatrix for a short time you can push them with PushMatrix and restore with PopMatrix
pushTag Pushes a Tag to a Tag-stack. If the mouse hits a draw element the last tag is set into the HitItem. You can get it from the HitItemlistpopTag
Refresh Refreshes the device.
removeLight Removes a Light from the list Lights. Its the same as Lights.Remove(Light);
ResetShadow
Resize If WinControl was resized, the method Resize is called.
Rotate Rotates the following drawings by a call to MulMatrix. Call before this PushMatrix and after the painting a PopMatrix
Select Clears the HitItemlist and searches the draw elements, which are close to the point p. This means, that the distance to p is less then CatchDistance The method calls the Paintmethod of the device with RenderMode = RenderMode.Select.
SetAntiAliasing Sets antialiasing.
setCulling The wirtual setter of the Culling-property
SetCurrentCursor If the defaultcursor is null then the currentcursor will be taken.
SetDefaultCursor Sets a defaultcursor.
SimulateMouseDown By a call to this method you can simulate a mousedownclick. See also SimulateMouseMove
SimulateMouseMove By a call to this method you can simulate a mousemove. See also SimulateMouseDown
SimulateMouseUp By a call to this method you can simulate a mousedownclick. See also SimulateMouseMove
SolidConvexOverloaded. This abstract method must be overridden by a derived instance. It draws the array xyzArray, which is assumed to be convex. The normals of the vertices are held by the array normals. They correspond to the vertices by its index. Also the texture coordinates, which are stored in TexturePos?. An other abstract draw method, which has to be overridden is LineStrip.
SwapBuffers In most cases a double-buffer-system is used and in EndPaint a call SwapBuffers fired. This call depends on the graphic engine. Therefore it has to be overridden.
ToScrOverloaded. Calculates the screen coordinates of a 3d-Point p.
ToString (inherited from Object) 
Translate Translates the following drawings by a call to MulMatrix. Call before this PushMatrix and after the painting a PopMatrix
UpDated If you make any modifications in the component, you should first call
UpDating()
..Change some things
UpDated()
In this case the method Refresh will be called only one time. Internal a counter will be incremented for UpDating and decremented by UpDated. If he is 0 then Refresh is called. See UpDating
UpDating If you make any modifications in the component you should first call
UpDating()
..Change some things
UpDated()
In this case the method Refresh will be called only one time. Internal a counter will be incremented for UpDating and decremented by UpDated. If it is 0 then Refresh is called. See UpDated

Protected Instance Methods

CheckViewPort The method sets the ViewPort to the ClientRectangle of the WinControl and refreshes the ProjectionMatrix
CopyFromSaveBuffer Copy the accumulation buffer to the rendercontext. Assumed is PaintFloatEnable.
CopyToSaveBuffer Copies the RenderContext to the accumulation buffer. Assumed is PaintFloatEnable.
CreateMaterial This method is called from the constructur. For example the OpenGlDevice overrides them, to implement OglMaterial
Disposed Overrides this method ans sets the WinControl-property to null.
Finalize
getCulling The virtual getter of the property Culling
GetGraphics Getmethod of the property Graphics
getModelMatrix protected getMethod for the ModelMatrix-property.
getProjectionMatrix GetMethod of the ProjectionMatrix.
GetTextureMatrix Virtual getmethod of the property TextureMatrix
getWorldHeight Getmethod of the WorldHeight-property
getWorldWidth GetMethod of the property WorldWidth
GraphicsPaint After painting in the "normal" device, a call to GraphicsPaint is done.
IsReady The method IsReady returns true, if the device is able to draw something. For example: if there is no Control or the graphic engine is not installed then IsReady is false.
KeyDown This method is called from the EventServer when a key is clicked down.
KeyPress This method is called from the EventServer, when a key is pressed.
KeyUp This method is called from the EventServer when a key goes up.
LineStrip This abstract method must be overridden by a derived instance. It draws lines over the points given by the xyzArray. An other abstract draw method, which must be overridden is SolidConvex.
MemberwiseClone (inherited from Object) 
MouseDown The device gets the MouseDown-event from the WinControl.
MouseMove The device gets the MouseMove - event from the WinControl.
newLight This abstract method has to be overridden by an instance of MNDevice. She creates a Light and returns that.
RealizeAmbient
RealizeDiffuse
RealizeEmission
RealizeShininess
RealizeSpecular
RealizeTranslucent
SetClockWise Virtual settermethod of the Clockwise-property
setFontName Setmethod of FontName
SetGraphics 
SetLighting Setmethod of the Lighting-property
setModelMatrix protected SetMethod for the ModelMatrix-property.
setPencolor The protected settermethod of the property PenColor.
setPenStyle The setmethod of the property PenStyle
SetPenWidth Setmethod of the property PenWidth.
SetPolygonmode Setmethod of the property PolygonMode
setProjectionMatrix SetMethod of the ProjectionMatrix.
SetRoot The virtual settermethod of Root property.
setShadow The protected Settermethod for the Shadow-property.
setTexture Virtual setmethod of the property Texture
SetTextureMatrix Virtual setmethod of the property TextureMatrix
SetTranslucent
SetViewPort Setmethod of the property ViewPort"/>
SetWinControl Setmethod of the property WinControl
setZoomFactor Setmethod of the property Zoomfactor
SizeChanged If the size of the WinControl was changed, this method is called.
TimeEvent A protected method, which call OnTick,if is assigned.
UpDateMaterial UpDateMaterial set up the property of Material to the graphic engine and must be overridden.
ValidHandleCreated A valid handle has been created. This means that the WinControl is set and has a good Handle. In the method CheckViewPort and UpDateMaterial is fired.
ValidHandleDestroyed If the Handle of the WinControl is destructed or WinControl is set to null, the ValidHandleDestructed will be called. This is a good moment to reset any created things.

See Also

MNDevice Class | Drawing3d Namespace