C# Класс CSharpGL.Scene

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ColorCodedPicking PickedGeometry>>.List
Dispose void
DisposeObject void
DisposeUI void
GetPickGeometry PickedGeometry
ReadPixels uint>>.List
Render4Picking List
RenderPickableObject void
RenderViewPort void
Tick void
UpdateObject void

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Dispose() публичный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

Pick() публичный Метод

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.
Результат PickedGeometry>>.List

Render() публичный Метод

Render this scene.
public Render ( PickingGeometryType pickingGeometryType = PickingGeometryType.None ) : void
pickingGeometryType PickingGeometryType Specify type of primitive you want to pick or nothing to pick.
Результат void

Resize() публичный Метод

Please bind this method to Control.Resize event.
public Resize ( object sender, EventArgs e ) : void
sender object
e EventArgs
Результат void

Scene() публичный Метод

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.
Результат System

Start() публичный Метод

start running scripts.
public Start ( int maxCycle ) : void
maxCycle int /// how many times should this engine run? /// 0 means endless.
Результат void

Stop() публичный Метод

stop running scripts.
public Stop ( ) : void
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string

UpdateOnce() публичный Метод

update once.
public UpdateOnce ( ) : void
Результат void