C# Class Ohana3DS_Transfigured.Ohana.RenderEngine

Inheritance: IDisposable
Datei anzeigen Open project: Quibilia/Ohana3DS-Transfigured Class Usage Examples

Public Properties

Property Type Description
ctrlMA animationControl
ctrlSA animationControl
ctrlVA animationControl
lockCamera bool
models RenderBase.OModelGroup

Public Methods

Method Description
Dispose ( ) : void
addTexture ( RenderBase texture ) : void

Adds a single texture to the model and the cache.

addTextureRange ( List textures ) : void

Adds a list of textures to the model and the cache.

initialize ( IntPtr handle, int width, int height ) : void

Initialize the renderer at a given target.

removeAllTextures ( ) : void

Removes all textures from the model and the cache.

removeTexture ( int index ) : void

Removes a texture at the given index.

render ( ) : void

Renders a single frame of the scene.

resetCamera ( ) : void

Set Camera back to zero position.

resize ( int width, int height ) : void

Resizes the Back Buffer.

setRotation ( float y, float x ) : void

Set X/Y angles to rotate the Mesh.

setTranslation ( float x, float y ) : void

Set translation of the Mesh.

setZoom ( float z ) : void

Set Zoom (distance of the Mesh to the Camera).

updateMeshes ( ) : void

Updates the internal meshes buffer used for rendering. Call this if you change the current model or the meshes on the current model.

updateSettings ( ) : void

Reloads all settings from the app settings file. Call this when you changes the settings.

updateTextures ( ) : void

Forces all textures on the model to be cached.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
cacheTexture ( RenderBase texture ) : void

Adds a texture to the texture cache.

drawText ( string text, int width, int height ) : void

Draws a text inside a box on the Screen.

getBlend ( RenderBase function ) : Blend

Gets a DirectX Blend from a RenderBase Blend.

getBlendOperation ( RenderBase equation ) : BlendOperation

Gets a DirectX Blend operation from a RenderBase Blend operation.

getColor ( Color input ) : System.Vector4

Transforms a Color into a Vector4.

getCompare ( RenderBase function ) : Compare

Gets a DirectX Compare from a RenderBase Compare.

getMaterialAnimationColor ( RenderBase data, Color &color ) : void

Gets the current frame of a Material Animation color.

getMaterialAnimationFloat ( RenderBase data, float &value ) : void

Gets the current frame of a Material Animation float value.

getMaterialAnimationInt ( RenderBase data, int &value ) : void

Gets the current frame of a Material Animation integer value.

getMaterialAnimationVector2 ( RenderBase data, System.Vector2 &vector ) : void

Gets the current frame of a Material Animation 2-D vector.

getMatrix ( RenderBase mtx ) : System.Matrix

Gets a MDX Matrix from a RenderBase Matrix.

getQuaternion ( RenderBase vector ) : Quaternion

Creates a Quaternion from a Rotation 3-D Vector.

getStencilOperation ( RenderBase operation ) : StencilOperation

Gets a DirectX Stencil operation from a RenderBase Stencil operation.

refresh ( object sender, EventArgs e ) : void
resetRenderState ( ) : void

Resets the Render State to the default values.

rotateCenter2D ( float rotation ) : System.Matrix

Rotates a 2-D UV Coordinate around the center.

transformAnimationSkeleton ( List skeleton, int index, System.Matrix &target ) : void

Transforms a Skeleton from relative to absolute positions. Uses Quaternion for rotations.

transformSkeleton ( List skeleton, int index, System.Matrix &target ) : void

Transforms a Skeleton from relative to absolute positions.

translate2D ( System.Vector2 translation ) : System.Matrix

Builds a 2-D translation Matrix.

wrap ( float value ) : float

Wrap a Rotation Angle between -PI and PI.

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

addTexture() public method

Adds a single texture to the model and the cache.
public addTexture ( RenderBase texture ) : void
texture RenderBase The texture to be added
return void

addTextureRange() public method

Adds a list of textures to the model and the cache.
public addTextureRange ( List textures ) : void
textures List The list of textures to be added
return void

initialize() public method

Initialize the renderer at a given target.
public initialize ( IntPtr handle, int width, int height ) : void
handle System.IntPtr Memory pointer to the control rendering buffer
width int Render width
height int Render height
return void

removeAllTextures() public method

Removes all textures from the model and the cache.
public removeAllTextures ( ) : void
return void

removeTexture() public method

Removes a texture at the given index.
public removeTexture ( int index ) : void
index int The index of the texture
return void

render() public method

Renders a single frame of the scene.
public render ( ) : void
return void

resetCamera() public method

Set Camera back to zero position.
public resetCamera ( ) : void
return void

resize() public method

Resizes the Back Buffer.
public resize ( int width, int height ) : void
width int New width
height int New height
return void

setRotation() public method

Set X/Y angles to rotate the Mesh.
public setRotation ( float y, float x ) : void
y float
x float
return void

setTranslation() public method

Set translation of the Mesh.
public setTranslation ( float x, float y ) : void
x float
y float
return void

setZoom() public method

Set Zoom (distance of the Mesh to the Camera).
public setZoom ( float z ) : void
z float
return void

updateMeshes() public method

Updates the internal meshes buffer used for rendering. Call this if you change the current model or the meshes on the current model.
public updateMeshes ( ) : void
return void

updateSettings() public method

Reloads all settings from the app settings file. Call this when you changes the settings.
public updateSettings ( ) : void
return void

updateTextures() public method

Forces all textures on the model to be cached.
public updateTextures ( ) : void
return void

Property Details

ctrlMA public_oe property

public animationControl ctrlMA
return animationControl

ctrlSA public_oe property

public animationControl ctrlSA
return animationControl

ctrlVA public_oe property

public animationControl ctrlVA
return animationControl

lockCamera public_oe property

public bool lockCamera
return bool

models public_oe property

public RenderBase.OModelGroup models
return RenderBase.OModelGroup