Class BoneSkinMeshNode
- Namespace
- HelixToolkit.SharpDX.Model.Scene
- Assembly
- HelixToolkit.SharpDX.dll
public class BoneSkinMeshNode : MeshNode, IDisposable, IComparable<SceneNode>, IAnimationNode, IHitable, IThrowingShadow, IInstancing, IBoundable, IApplyPostEffect, IDynamicReflectable, IBoneMatricesNode
- Inheritance
-
BoneSkinMeshNode
- Implements
- Inherited Members
- Extension Methods
Properties
BoneMatrices
Gets or sets the bone matrices.
public Matrix4x4[]? BoneMatrices { get; set; }
Property Value
- Matrix4x4[]
The bone matrices.
Bones
Gets or sets the bones.
public Bone[]? Bones { get; set; }
Property Value
- Bone[]
The bones.
HasBoneGroup
Gets or sets a value indicating whether this node has bone group. BoneGroupNode shares bones with multiple BoneSkinMeshNode
public bool HasBoneGroup { get; }
Property Value
- bool
trueif this instance has bone group; otherwise,false.
IsSkeletonNode
Gets or sets a value indicating whether this node is used to show skeleton. Only used as an indication.
public bool IsSkeletonNode { get; set; }
Property Value
- bool
trueif this node is used to show skeleton; otherwise,false.
MorphTargetWeights
Gets or sets the morph target weights.
public float[]? MorphTargetWeights { get; set; }
Property Value
- float[]
The morph target weights.
Methods
CreateSkeletonNode(MaterialCore, string, float)
Creates the skeleton node.
public BoneSkinMeshNode CreateSkeletonNode(MaterialCore material, string effectName, float scale = 0.1)
Parameters
materialMaterialCoreThe material.
effectNamestringName of the effect.
scalefloatThe scale.
Returns
CreateSkeletonNode(BoneSkinMeshNode, MaterialCore, string, float)
Creates the skeleton node.
public static BoneSkinMeshNode CreateSkeletonNode(BoneSkinMeshNode node, MaterialCore material, string effectName, float scale)
Parameters
nodeBoneSkinMeshNodeThe node.
materialMaterialCoreThe material.
effectNamestringName of the effect.
scalefloatThe scale.
Returns
InitializeMorphTargets(MorphTargetVertex[], int)
public bool InitializeMorphTargets(MorphTargetVertex[] mtv, int pitch)
Parameters
mtvMorphTargetVertex[]pitchint
Returns
InvalidateBoneMatrices()
public void InvalidateBoneMatrices()
InvalidateMorphTargetWeights()
public void InvalidateMorphTargetWeights()
OnCreateBufferModel(Guid, Geometry3D?)
Called when [create buffer model].
protected override IAttachableBufferModel OnCreateBufferModel(Guid modelGuid, Geometry3D? geometry)
Parameters
modelGuidGuidgeometryGeometry3D
Returns
OnCreateRenderCore()
Called when [create render core].
protected override RenderCore OnCreateRenderCore()
Returns
OnHitTest(HitTestContext?, Matrix4x4, ref List<HitTestResult>)
Called when [hit test].
protected override bool OnHitTest(HitTestContext? context, Matrix4x4 totalModelMatrix, ref List<HitTestResult> hits)
Parameters
contextHitTestContextThe context.
totalModelMatrixMatrix4x4The total model matrix.
hitsList<HitTestResult>The hits.
Returns
PreHitTestOnBounds(HitTestContext?)
Pre hit test on BoundsWithTransform and BoundsSphereWithTransform. If return false, OnHitTest(HitTestContext?, Matrix4x4, ref List<HitTestResult>) will not be called.
protected override bool PreHitTestOnBounds(HitTestContext? context)
Parameters
contextHitTestContext
Returns
SetWeight(int, float)
Make sure to use SetWeight so that the mutation of elements can be seen
public void SetWeight(int i, float w)
Parameters
SetupIdentitySkeleton()
public void SetupIdentitySkeleton()
TestViewFrustum(ref BoundingFrustum)
Views the frustum test.
public override bool TestViewFrustum(ref BoundingFrustum viewFrustum)
Parameters
viewFrustumBoundingFrustumThe view frustum.
Returns
TryGetSkinnedVertices(IEffectsManager)
Try to get skinned vertices. Skinned vertices are copied from GPU.
public Vector3[]? TryGetSkinnedVertices(IEffectsManager manager)
Parameters
managerIEffectsManager
Returns
- Vector3[]
New array with vertex positions
TryGetSkinnedVertices(IEffectsManager, Vector3[])
Try to get skinned vertices. Skinned vertices are copied from GPU.
public int TryGetSkinnedVertices(IEffectsManager manager, Vector3[] array)
Parameters
managerIEffectsManagerarrayVector3[]Vertex positions will be copied into this array
Returns
TryGetSkinnedVerticesCache()
Get the skinned vertices cache used for hit test. This cache will only be updated after each hit test. To get latest skinned vertices, please use TryGetSkinnedVertices(IEffectsManager).
public Vector3[] TryGetSkinnedVerticesCache()
Returns
- Vector3[]
UpdateBoneMatrices()
public void UpdateBoneMatrices()
WeightUpdated()
Tells the render core to update it's morph target weight buffer
public void WeightUpdated()