C# Class Axiom.Core.SubEntity

Utility class which defines the sub-parts of an Entity.

Just as models are split into meshes, an Entity is made up of potentially multiple SubEntities. These are mainly here to provide the link between the Material which the SubEntity uses (which may be the default Material for the SubMesh or may have been changed for this object) and the SubMesh data.

SubEntity instances are never created manually. They are created at the same time as their parent Entity by the SceneManager method CreateEntity.

Inheritance: DisposableObject, IRenderable
Datei anzeigen Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Property Type Description
customParams List
hardwarePoseCount ushort
hardwareSkinningEnabled bool
hardwareVertexAnimVertexData Axiom.Graphics.VertexData
isVisible bool
material Axiom.Graphics.Material
materialName string
parent Entity
renderOperation Axiom.Graphics.RenderOperation
skelAnimVertexData Axiom.Graphics.VertexData
softwareVertexAnimVertexData Axiom.Graphics.VertexData
subMesh SubMesh
tempSkelAnimInfo Axiom.Graphics.TempBlendedBufferInfo
tempVertexAnimInfo Axiom.Graphics.TempBlendedBufferInfo
useVertexProgram bool
vertexAnimationAppliedThisFrame bool

Private Properties

Property Type Description
SubEntity System

Public Methods

Method Description
GetCustomParameter ( int index ) : Vector4
GetSquaredViewDepth ( Camera camera ) : float

GetVertexDataForBinding ( ) : VertexData
GetWorldTransforms ( Matrix4 matrices ) : void

MarkBuffersUnusedForAnimation ( ) : void
MarkBuffersUsedForAnimation ( ) : void
RestoreBuffersForUnusedAnimation ( bool hardwareAnimation ) : void
SetCustomParameter ( int index, Vector4 val ) : void
UpdateCustomGpuParameter ( GpuProgramParameters entry, GpuProgramParameters gpuParams ) : void

Protected Methods

Method Description
PrepareTempBlendBuffers ( ) : void

Internal method for preparing this sub entity for use in animation.

dispose ( bool disposeManagedResources ) : void

Class level dispose method

When implementing this method in an inherited class the following template should be used; protected override void dispose( bool disposeManagedResources ) { if ( !isDisposed ) { if ( disposeManagedResources ) { // Dispose managed resources. } // There are no unmanaged resources to release, but // if we add them, they need to be released here. } // If it is available, make the call to the // base class's Dispose(Boolean) method base.dispose( disposeManagedResources ); }

Private Methods

Method Description
SubEntity ( ) : System

Internal constructor, only allows creation of SubEntities within the engine core.

Method Details

GetCustomParameter() public method

public GetCustomParameter ( int index ) : Vector4
index int
return Vector4

GetSquaredViewDepth() public method

public GetSquaredViewDepth ( Camera camera ) : float
camera Camera
return float

GetVertexDataForBinding() public method

public GetVertexDataForBinding ( ) : VertexData
return Axiom.Graphics.VertexData

GetWorldTransforms() public method

public GetWorldTransforms ( Matrix4 matrices ) : void
matrices Axiom.Math.Matrix4
return void

MarkBuffersUnusedForAnimation() public method

public MarkBuffersUnusedForAnimation ( ) : void
return void

MarkBuffersUsedForAnimation() public method

public MarkBuffersUsedForAnimation ( ) : void
return void

PrepareTempBlendBuffers() protected method

Internal method for preparing this sub entity for use in animation.
protected PrepareTempBlendBuffers ( ) : void
return void

RestoreBuffersForUnusedAnimation() public method

public RestoreBuffersForUnusedAnimation ( bool hardwareAnimation ) : void
hardwareAnimation bool
return void

SetCustomParameter() public method

public SetCustomParameter ( int index, Vector4 val ) : void
index int
val Vector4
return void

UpdateCustomGpuParameter() public method

public UpdateCustomGpuParameter ( GpuProgramParameters entry, GpuProgramParameters gpuParams ) : void
entry Axiom.Graphics.GpuProgramParameters
gpuParams Axiom.Graphics.GpuProgramParameters
return void

dispose() protected method

Class level dispose method
When implementing this method in an inherited class the following template should be used; protected override void dispose( bool disposeManagedResources ) { if ( !isDisposed ) { if ( disposeManagedResources ) { // Dispose managed resources. } // There are no unmanaged resources to release, but // if we add them, they need to be released here. } // If it is available, make the call to the // base class's Dispose(Boolean) method base.dispose( disposeManagedResources ); }
protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool True if Unmanaged resources should be released.
return void

Property Details

customParams protected_oe property

protected List customParams
return List

hardwarePoseCount protected_oe property

Number of hardware blended poses supported by material
protected ushort hardwarePoseCount
return ushort

hardwareSkinningEnabled protected_oe property

Flag indicating whether hardware skinning is supported by this subentity's materials.
protected bool hardwareSkinningEnabled
return bool

hardwareVertexAnimVertexData protected_oe property

Vertex data details for hardware Vertex anim of shared geometry - separate since we need to s/w anim for shadows whilst still altering the vertex data for hardware morphing (pos2 binding)
protected VertexData,Axiom.Graphics hardwareVertexAnimVertexData
return Axiom.Graphics.VertexData

isVisible protected_oe property

Flag indicating whether this sub entity should be rendered or not.
protected bool isVisible
return bool

material protected_oe property

Reference to the material being used by this SubEntity.
protected Material,Axiom.Graphics material
return Axiom.Graphics.Material

materialName protected_oe property

Name of the material being used.
protected string materialName
return string

parent protected_oe property

Reference to the parent Entity.
protected Entity parent
return Entity

renderOperation protected_oe property

protected RenderOperation,Axiom.Graphics renderOperation
return Axiom.Graphics.RenderOperation

skelAnimVertexData protected_oe property

Blend buffer details for dedicated geometry.
protected VertexData,Axiom.Graphics skelAnimVertexData
return Axiom.Graphics.VertexData

softwareVertexAnimVertexData protected_oe property

Vertex data details for software Vertex anim of shared geometry
protected VertexData,Axiom.Graphics softwareVertexAnimVertexData
return Axiom.Graphics.VertexData

subMesh protected_oe property

Reference to the subMesh that represents the geometry for this SubEntity.
protected SubMesh,Axiom.Core subMesh
return SubMesh

tempSkelAnimInfo protected_oe property

Temp buffer details for software skeletal anim geometry
protected TempBlendedBufferInfo,Axiom.Graphics tempSkelAnimInfo
return Axiom.Graphics.TempBlendedBufferInfo

tempVertexAnimInfo protected_oe property

Temp buffer details for software Vertex anim geometry
protected TempBlendedBufferInfo,Axiom.Graphics tempVertexAnimInfo
return Axiom.Graphics.TempBlendedBufferInfo

useVertexProgram protected_oe property

Flag indicating whether vertex programs are used by this subentity's materials.
protected bool useVertexProgram
return bool

vertexAnimationAppliedThisFrame protected_oe property

Have we applied any vertex animation to geometry?
protected bool vertexAnimationAppliedThisFrame
return bool