C# Class open3mod.SceneRendererShared

Shared utility class for SceneRendererClassicGl and SceneRendererModernGl that encapsulates logic to traverse the scene graph, determine rendering passes and finally produce draw calls which are then dispatched to the (deriving) renderer implementation.
Afficher le fichier Open project: acgessler/open3mod

Protected Properties

Свойство Type Description
InitposeMax Vector3
InitposeMin Vector3
IsAlphaMaterial bool[]
Owner Scene
Skinner open3mod.CpuSkinningEvaluator

Méthodes protégées

Méthode Description
DrawAlphaMeshes ( Assimp.Node node, Dictionary visibleNodes, RenderFlags flags, bool animated ) : void

Draw the semi-transparent meshes pertaining to a node

DrawMesh ( Assimp.Node node, bool animated, bool showGhost, int index, Mesh mesh, RenderFlags flags ) : bool

Obtains a lock on a mesh and draws it. Also handles mesh overrides.

DrawOpaqueMeshes ( Assimp.Node node, Dictionary visibleMeshesByNode, RenderFlags flags, bool animated ) : bool

Draw the opaque (i.e. not semi-transparent) meshes pertaining to a node and checks whether the node has any semi-transparent meshes to be drawn later.

InternDrawMesh ( Assimp.Node node, bool animated, bool showGhost, int index, Mesh mesh, RenderFlags flags ) : bool

Abstract method to draw a mesh attached to a node. This is to be implemented by whichever rendering method should be used. The thread is guaranteed to own the monitor for the |mesh|, making read access to the mesh safe.

PopWorld ( ) : void
PushWorld ( Matrix4 &world ) : void
RecursiveRender ( Assimp.Node node, Dictionary visibleMeshesByNode, RenderFlags flags, bool animated ) : bool

Recursive rendering function

RecursiveRenderWithAlpha ( Assimp.Node node, Dictionary visibleNodes, RenderFlags flags, bool animated ) : void

Recursive rendering function for semi-transparent (i.e. alpha-blended) meshes. Alpha blending is not globally on, meshes need to do that on their own. This render function is called _after_ solid geometry has been drawn, so the relative order between transparent and opaque geometry is maintained. There is no further ordering within the alpha rendering pass.

SceneRendererShared ( Scene owner, Vector3 initposeMin, Vector3 initposeMax ) : System

Constructs an instance given a scene with its bounds (AABB)

UploadTextures ( ) : void

Make sure all textures required for the materials in the scene are uploaded to VRAM.

Method Details

DrawAlphaMeshes() protected méthode

Draw the semi-transparent meshes pertaining to a node
protected DrawAlphaMeshes ( Assimp.Node node, Dictionary visibleNodes, RenderFlags flags, bool animated ) : void
node Assimp.Node
visibleNodes Dictionary
flags RenderFlags
animated bool
Résultat void

DrawMesh() protected méthode

Obtains a lock on a mesh and draws it. Also handles mesh overrides.
protected DrawMesh ( Assimp.Node node, bool animated, bool showGhost, int index, Mesh mesh, RenderFlags flags ) : bool
node Assimp.Node
animated bool
showGhost bool
index int
mesh Assimp.Mesh
flags RenderFlags
Résultat bool

DrawOpaqueMeshes() protected méthode

Draw the opaque (i.e. not semi-transparent) meshes pertaining to a node and checks whether the node has any semi-transparent meshes to be drawn later.
protected DrawOpaqueMeshes ( Assimp.Node node, Dictionary visibleMeshesByNode, RenderFlags flags, bool animated ) : bool
node Assimp.Node
visibleMeshesByNode Dictionary
flags RenderFlags
animated bool
Résultat bool

InternDrawMesh() protected abstract méthode

Abstract method to draw a mesh attached to a node. This is to be implemented by whichever rendering method should be used. The thread is guaranteed to own the monitor for the |mesh|, making read access to the mesh safe.
protected abstract InternDrawMesh ( Assimp.Node node, bool animated, bool showGhost, int index, Mesh mesh, RenderFlags flags ) : bool
node Assimp.Node
animated bool
showGhost bool
index int
mesh Assimp.Mesh
flags RenderFlags
Résultat bool

PopWorld() protected abstract méthode

protected abstract PopWorld ( ) : void
Résultat void

PushWorld() protected abstract méthode

protected abstract PushWorld ( Matrix4 &world ) : void
world Matrix4
Résultat void

RecursiveRender() protected méthode

Recursive rendering function
protected RecursiveRender ( Assimp.Node node, Dictionary visibleMeshesByNode, RenderFlags flags, bool animated ) : bool
node Assimp.Node Current node
visibleMeshesByNode Dictionary
flags RenderFlags Rendering flags
animated bool Play animation?
Résultat bool

RecursiveRenderWithAlpha() protected méthode

Recursive rendering function for semi-transparent (i.e. alpha-blended) meshes. Alpha blending is not globally on, meshes need to do that on their own. This render function is called _after_ solid geometry has been drawn, so the relative order between transparent and opaque geometry is maintained. There is no further ordering within the alpha rendering pass.
protected RecursiveRenderWithAlpha ( Assimp.Node node, Dictionary visibleNodes, RenderFlags flags, bool animated ) : void
node Assimp.Node Current node
visibleNodes Dictionary Set of visible meshes
flags RenderFlags Rendering flags
animated bool Play animation?
Résultat void

SceneRendererShared() protected méthode

Constructs an instance given a scene with its bounds (AABB)
protected SceneRendererShared ( Scene owner, Vector3 initposeMin, Vector3 initposeMax ) : System
owner Scene
initposeMin Vector3
initposeMax Vector3
Résultat System

UploadTextures() protected méthode

Make sure all textures required for the materials in the scene are uploaded to VRAM.
protected UploadTextures ( ) : void
Résultat void

Property Details

InitposeMax protected_oe property

protected Vector3 InitposeMax
Résultat Vector3

InitposeMin protected_oe property

protected Vector3 InitposeMin
Résultat Vector3

IsAlphaMaterial protected_oe property

protected bool[] IsAlphaMaterial
Résultat bool[]

Owner protected_oe property

protected Scene Owner
Résultat Scene

Skinner protected_oe property

protected CpuSkinningEvaluator,open3mod Skinner
Résultat open3mod.CpuSkinningEvaluator