C# Класс ModelViewer.Renderer.Sample

Implements core application logic of a SlimDX sample. The Sample class provides a minimal wrapper around window setup, user interaction, and OS-level details, but provides very little abstraction of the underlying DirectX functionality. The reason for this is that the purpose of a SlimDX sample is to illustrate how a particular technique might be implemented using SlimDX; providing high level rendering abstractions in the sample framework simplify obfuscates that. A sample is implemented by overriding various base class methods (those prefixed with "on").
Наследование: IDisposable
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
EnableCamera bool
arcBall ModelViewer.ArcBall
cameraForward SlimDX.Vector3
cameraForwardDirection float
cameraPosition SlimDX.Vector3
cameraRaiseDirection float
cameraRight SlimDX.Vector3
cameraStrafeDirection float
cameraUp SlimDX.Vector3
cameraVelocity float
globalSettings ModelViewer.Renderer.GlobalRenderSettings
renderList List
sceneOffset SlimDX.Vector3
zoom float
zoomSensitivity float

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

Метод Описание
Dispose ( ) : void

Disposes of object resources.

Run ( ) : void

Runs the sample.

Sample ( ) : System

Защищенные методы

Метод Описание
CreateForm ( SampleConfiguration config ) : Form
Dispose ( bool disposeManagedResources ) : void

Disposes of object resources.

InitializeDevice ( DeviceSettings9 settings ) : void

Initializes a Direct3D9 device context according to the specified settings. The base class retains ownership of the context and will dispose of it when appropriate.

OnConfigure ( ) : SampleConfiguration

In a derived class, implements logic to control the configuration of the sample via a SampleConfiguration object.

OnInitialize ( ) : void

In a derived class, implements logic to initialize the sample.

OnKeyDown ( object sender, KeyEventArgs e ) : void
OnKeyUp ( object sender, KeyEventArgs e ) : void
OnRender ( ) : void

In a derived class, implements logic to render the sample.

OnRenderBegin ( bool isScreenshot ) : void

In a derived class, implements logic that should occur before all other rendering.

OnRenderEnd ( bool isScreenshot ) : void

In a derived class, implements logic that should occur after all other rendering.

OnResourceLoad ( ) : void
OnResourceUnload ( ) : void
OnUpdate ( ) : void

In a derived class, implements logic to update any relevant sample state.

Quit ( ) : void

Quits the sample.

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

Метод Описание
HandleKeyDown ( object sender, KeyEventArgs e ) : void

Handles a key down event.

HandleKeyUp ( object sender, KeyEventArgs e ) : void

Handles a key up event.

HandleMouseClick ( object sender, MouseEventArgs e ) : void

Handles a mouse click event.

HandleMouseDown ( object sender, MouseEventArgs e ) : void
HandleMouseMove ( object sender, MouseEventArgs e ) : void
HandleMouseUp ( object sender, MouseEventArgs e ) : void
HandleResize ( object sender, EventArgs e ) : void
Render ( bool isScreenshot ) : void

Renders the sample.

RenderScreenshot ( ) : void
Update ( ) : void

Updates sample state.

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

CreateForm() защищенный Метод

protected CreateForm ( SampleConfiguration config ) : Form
config SampleConfiguration
Результат System.Windows.Forms.Form

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

Disposes of object resources.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Disposes of object resources.
protected Dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool If true, managed resources should be /// disposed of in addition to unmanaged resources.
Результат void

InitializeDevice() защищенный Метод

Initializes a Direct3D9 device context according to the specified settings. The base class retains ownership of the context and will dispose of it when appropriate.
protected InitializeDevice ( DeviceSettings9 settings ) : void
settings DeviceSettings9 The settings.
Результат void

OnConfigure() защищенный Метод

In a derived class, implements logic to control the configuration of the sample via a SampleConfiguration object.
protected OnConfigure ( ) : SampleConfiguration
Результат SampleConfiguration

OnInitialize() защищенный Метод

In a derived class, implements logic to initialize the sample.
protected OnInitialize ( ) : void
Результат void

OnKeyDown() защищенный Метод

protected OnKeyDown ( object sender, KeyEventArgs e ) : void
sender object
e System.Windows.Forms.KeyEventArgs
Результат void

OnKeyUp() защищенный Метод

protected OnKeyUp ( object sender, KeyEventArgs e ) : void
sender object
e System.Windows.Forms.KeyEventArgs
Результат void

OnRender() защищенный Метод

In a derived class, implements logic to render the sample.
protected OnRender ( ) : void
Результат void

OnRenderBegin() защищенный Метод

In a derived class, implements logic that should occur before all other rendering.
protected OnRenderBegin ( bool isScreenshot ) : void
isScreenshot bool
Результат void

OnRenderEnd() защищенный Метод

In a derived class, implements logic that should occur after all other rendering.
protected OnRenderEnd ( bool isScreenshot ) : void
isScreenshot bool
Результат void

OnResourceLoad() защищенный Метод

protected OnResourceLoad ( ) : void
Результат void

OnResourceUnload() защищенный Метод

protected OnResourceUnload ( ) : void
Результат void

OnUpdate() защищенный Метод

In a derived class, implements logic to update any relevant sample state.
protected OnUpdate ( ) : void
Результат void

Quit() защищенный Метод

Quits the sample.
protected Quit ( ) : void
Результат void

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

Runs the sample.
public Run ( ) : void
Результат void

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

public Sample ( ) : System
Результат System

Описание свойств

EnableCamera защищенное свойство

protected bool EnableCamera
Результат bool

arcBall защищенное свойство

protected ModelViewer.ArcBall arcBall
Результат ModelViewer.ArcBall

cameraForward защищенное свойство

protected SlimDX.Vector3 cameraForward
Результат SlimDX.Vector3

cameraForwardDirection защищенное свойство

protected float cameraForwardDirection
Результат float

cameraPosition защищенное свойство

protected SlimDX.Vector3 cameraPosition
Результат SlimDX.Vector3

cameraRaiseDirection защищенное свойство

protected float cameraRaiseDirection
Результат float

cameraRight защищенное свойство

protected SlimDX.Vector3 cameraRight
Результат SlimDX.Vector3

cameraStrafeDirection защищенное свойство

protected float cameraStrafeDirection
Результат float

cameraUp защищенное свойство

protected SlimDX.Vector3 cameraUp
Результат SlimDX.Vector3

cameraVelocity защищенное свойство

protected float cameraVelocity
Результат float

globalSettings защищенное свойство

protected ModelViewer.Renderer.GlobalRenderSettings globalSettings
Результат ModelViewer.Renderer.GlobalRenderSettings

renderList защищенное свойство

protected List renderList
Результат List

sceneOffset защищенное свойство

protected SlimDX.Vector3 sceneOffset
Результат SlimDX.Vector3

zoom защищенное свойство

protected float zoom
Результат float

zoomSensitivity защищенное свойство

protected float zoomSensitivity
Результат float