C# Class CSharpGL.Scene

Afficher le fichier Open project: bitzhuwei/CSharpGL Class Usage Examples

Private Properties

Свойство Type Description
ColorCodedPicking PickedGeometry>>.List
Dispose void
DisposeObject void
DisposeUI void
GetPickGeometry PickedGeometry
ReadPixels uint>>.List
Render4Picking List
RenderPickableObject void
RenderViewPort void
Tick void
UpdateObject void

Méthodes publiques

Méthode Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Pick ( Point mousePosition, PickingGeometryType pickingGeometryType ) : PickedGeometry>>.List

Get geometry at specified mousePosition with specified pickingGeometryType.

Returns null when mousePosition is out of this scene's area or there's no active(visible and enabled) viewport.

Render ( PickingGeometryType pickingGeometryType = PickingGeometryType.None ) : void

Render this scene.

Resize ( object sender, EventArgs e ) : void

Please bind this method to Control.Resize event.

Scene ( ICamera camera, ICanvas canvas ) : System

Manages a scene to be rendered and updated.

Start ( int maxCycle ) : void

start running scripts.

Stop ( ) : void

stop running scripts.

ToString ( ) : string

UpdateOnce ( ) : void

update once.

Private Methods

Méthode Description
ColorCodedPicking ( ViewPort viewPort, Rectangle pickingRect, Rectangle clientRectangle, PickingGeometryType pickingGeometryType ) : PickedGeometry>>.List

Pick primitives in specified viewPort.

Dispose ( bool disposing ) : void

Dispose managed and unmanaged resources of this instance.

DisposeObject ( SceneObject sceneObject ) : void
DisposeUI ( UIRenderer uiRenderer ) : void
GetPickGeometry ( RenderEventArgs arg, int x, int y, uint stageVertexId, List pickableRendererList ) : PickedGeometry

get picked geometry.

ReadPixels ( Rectangle target ) : uint>>.List

Read pixels in specified rect and get the VertexIds they represent.

Render4Picking ( RenderEventArgs arg ) : List

Maybe something is picked because depth buffer is valid.

Render all PickableRenderers for color-coded picking.

RenderPickableObject ( SceneObject sceneObject, RenderEventArgs arg, uint &renderedVertexCount, List pickedRendererList ) : void
RenderViewPort ( ViewPort viewPort, Rectangle clientRectangle, PickingGeometryType pickingGeometryType ) : void

render scene in every view port.

Tick ( object sender, System e ) : void
UpdateObject ( SceneObject sceneObject ) : void

Method Details

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void

Pick() public méthode

Get geometry at specified mousePosition with specified pickingGeometryType.

Returns null when mousePosition is out of this scene's area or there's no active(visible and enabled) viewport.

public Pick ( Point mousePosition, PickingGeometryType pickingGeometryType ) : PickedGeometry>>.List
mousePosition Point mouse position in Windows coordinate system.(Left Up is (0, 0))
pickingGeometryType PickingGeometryType target's geometry type.
Résultat PickedGeometry>>.List

Render() public méthode

Render this scene.
public Render ( PickingGeometryType pickingGeometryType = PickingGeometryType.None ) : void
pickingGeometryType PickingGeometryType Specify type of primitive you want to pick or nothing to pick.
Résultat void

Resize() public méthode

Please bind this method to Control.Resize event.
public Resize ( object sender, EventArgs e ) : void
sender object
e EventArgs
Résultat void

Scene() public méthode

Manages a scene to be rendered and updated.
public Scene ( ICamera camera, ICanvas canvas ) : System
camera ICamera Camera of the scene
canvas ICanvas Canvas that this scene binds to.
Résultat System

Start() public méthode

start running scripts.
public Start ( int maxCycle ) : void
maxCycle int /// how many times should this engine run? /// 0 means endless.
Résultat void

Stop() public méthode

stop running scripts.
public Stop ( ) : void
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

UpdateOnce() public méthode

update once.
public UpdateOnce ( ) : void
Résultat void