C# Class 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").
Inheritance: IDisposable
Afficher le fichier Open project: nohbdy/ffxivmodelviewer

Protected Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
Dispose ( ) : void

Disposes of object resources.

Run ( ) : void

Runs the sample.

Sample ( ) : System

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

CreateForm() protected méthode

protected CreateForm ( SampleConfiguration config ) : Form
config SampleConfiguration
Résultat System.Windows.Forms.Form

Dispose() public méthode

Disposes of object resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Disposes of object resources.
protected Dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool If true, managed resources should be /// disposed of in addition to unmanaged resources.
Résultat void

InitializeDevice() protected méthode

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.
Résultat void

OnConfigure() protected méthode

In a derived class, implements logic to control the configuration of the sample via a SampleConfiguration object.
protected OnConfigure ( ) : SampleConfiguration
Résultat SampleConfiguration

OnInitialize() protected méthode

In a derived class, implements logic to initialize the sample.
protected OnInitialize ( ) : void
Résultat void

OnKeyDown() protected méthode

protected OnKeyDown ( object sender, KeyEventArgs e ) : void
sender object
e System.Windows.Forms.KeyEventArgs
Résultat void

OnKeyUp() protected méthode

protected OnKeyUp ( object sender, KeyEventArgs e ) : void
sender object
e System.Windows.Forms.KeyEventArgs
Résultat void

OnRender() protected méthode

In a derived class, implements logic to render the sample.
protected OnRender ( ) : void
Résultat void

OnRenderBegin() protected méthode

In a derived class, implements logic that should occur before all other rendering.
protected OnRenderBegin ( bool isScreenshot ) : void
isScreenshot bool
Résultat void

OnRenderEnd() protected méthode

In a derived class, implements logic that should occur after all other rendering.
protected OnRenderEnd ( bool isScreenshot ) : void
isScreenshot bool
Résultat void

OnResourceLoad() protected méthode

protected OnResourceLoad ( ) : void
Résultat void

OnResourceUnload() protected méthode

protected OnResourceUnload ( ) : void
Résultat void

OnUpdate() protected méthode

In a derived class, implements logic to update any relevant sample state.
protected OnUpdate ( ) : void
Résultat void

Quit() protected méthode

Quits the sample.
protected Quit ( ) : void
Résultat void

Run() public méthode

Runs the sample.
public Run ( ) : void
Résultat void

Sample() public méthode

public Sample ( ) : System
Résultat System

Property Details

EnableCamera protected_oe property

protected bool EnableCamera
Résultat bool

arcBall protected_oe property

protected ModelViewer.ArcBall arcBall
Résultat ModelViewer.ArcBall

cameraForward protected_oe property

protected SlimDX.Vector3 cameraForward
Résultat SlimDX.Vector3

cameraForwardDirection protected_oe property

protected float cameraForwardDirection
Résultat float

cameraPosition protected_oe property

protected SlimDX.Vector3 cameraPosition
Résultat SlimDX.Vector3

cameraRaiseDirection protected_oe property

protected float cameraRaiseDirection
Résultat float

cameraRight protected_oe property

protected SlimDX.Vector3 cameraRight
Résultat SlimDX.Vector3

cameraStrafeDirection protected_oe property

protected float cameraStrafeDirection
Résultat float

cameraUp protected_oe property

protected SlimDX.Vector3 cameraUp
Résultat SlimDX.Vector3

cameraVelocity protected_oe property

protected float cameraVelocity
Résultat float

globalSettings protected_oe property

protected ModelViewer.Renderer.GlobalRenderSettings globalSettings
Résultat ModelViewer.Renderer.GlobalRenderSettings

renderList protected_oe property

protected List renderList
Résultat List

sceneOffset protected_oe property

protected SlimDX.Vector3 sceneOffset
Résultat SlimDX.Vector3

zoom protected_oe property

protected float zoom
Résultat float

zoomSensitivity protected_oe property

protected float zoomSensitivity
Résultat float