Class SkinnedMeshRenderer
Renders a mesh on the screen.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Components.Graphics3D
Assembly: Evergine.Framework.dll
Syntax
public class SkinnedMeshRenderer : Drawable3D, IDependencyObject
Fields
InverseBindPoses
The inverse bind matrices.
Declaration
public Matrix4x4[] InverseBindPoses
Field Value
Type | Description |
---|---|
Matrix4x4[] |
Materials
Materials used rendering the MeshComponent.
Declaration
[BindComponent(true, true, BindComponentSource.Owner, null, true)]
public List<MaterialComponent> Materials
Field Value
Type | Description |
---|---|
List<MaterialComponent> |
MeshComponent
MeshComponent to render.
Declaration
[BindComponent(false, true, BindComponentSource.Owner, null, true)]
public MeshComponent MeshComponent
Field Value
Type | Description |
---|---|
MeshComponent |
MorphTargetWeights
The morph target weights.
Declaration
public float[] MorphTargetWeights
Field Value
Type | Description |
---|---|
float[] |
Transform
Transform of the MeshRenderer.
Declaration
[BindComponent(true, true, BindComponentSource.Owner, null, true)]
public Transform3D Transform
Field Value
Type | Description |
---|---|
Transform3D |
renderMeshes
The render meshes.
Declaration
protected RenderMeshInfo[] renderMeshes
Field Value
Type | Description |
---|---|
RenderMeshInfo[] |
Properties
JointIds
Gets or sets the joints used to skin this mesh.
Declaration
public Guid[] JointIds { get; set; }
Property Value
Type | Description |
---|---|
Guid[] |
RootJoint
Gets the root joint.
Declaration
public Transform3D RootJoint { get; }
Property Value
Type | Description |
---|---|
Transform3D |
RootJointId
Gets or sets the root joint.
Declaration
public Guid RootJointId { get; set; }
Property Value
Type | Description |
---|---|
Guid |
SkinnedNormalBuffer
Gets the Buffer containing the processed normals.
Declaration
public Buffer SkinnedNormalBuffer { get; }
Property Value
Type | Description |
---|---|
Buffer |
SkinnedNormalData
Gets the skinned normal array data (calculated when Compute shader is not available.
Declaration
public Vector3[] SkinnedNormalData { get; }
Property Value
Type | Description |
---|---|
Vector3[] |
SkinnedPositionBuffer
Gets the Buffer containing the processed positions.
Declaration
public Buffer SkinnedPositionBuffer { get; }
Property Value
Type | Description |
---|---|
Buffer |
SkinnedPositionData
Gets the skinned position array data (calculated when Compute shader is not available.
Declaration
public Vector3[] SkinnedPositionData { get; }
Property Value
Type | Description |
---|---|
Vector3[] |
SkinnedTangentBuffer
Gets the Buffer containing the processed normals.
Declaration
public Buffer SkinnedTangentBuffer { get; }
Property Value
Type | Description |
---|---|
Buffer |
SkinnedTangentData
Gets the skinned tangent array data (calculated when Compute shader is not available.
Declaration
public Vector4[] SkinnedTangentData { get; }
Property Value
Type | Description |
---|---|
Vector4[] |
UseComputeSkinning
Gets or sets a value indicating whether the Skinning tries to be generated by compute shader.
Declaration
public bool UseComputeSkinning { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
DestroyMeshes()
Destroy current meshes array.
Declaration
protected void DestroyMeshes()
Draw(DrawContext)
Draws the model.
Declaration
public override void Draw(DrawContext drawContext)
Parameters
Type | Name | Description |
---|---|---|
DrawContext | drawContext | The draw context. |
Overrides
OnActivated()
Invoked when the object is activated once is attached.
Declaration
protected override void OnActivated()
Overrides
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if all is OK. |
Overrides
OnDeactivated()
Invoked when the object is deactivated.
Declaration
protected override void OnDeactivated()
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
Overrides
RefreshMaterial(MaterialComponent)
Refresh Material.
Declaration
protected void RefreshMaterial(MaterialComponent materialComponent)
Parameters
Type | Name | Description |
---|---|---|
MaterialComponent | materialComponent | Material component instance. |
RefreshMeshes()
Generates a new renderMeshInfo collection.
Declaration
protected virtual void RefreshMeshes()