Vixen
02b45cc4
csharp
public struct BoneTransform

Where one joint is, relative to its parent: translation, rotation and scale, and never a matrix.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Animation is interpolation, and a matrix is the one representation that cannot be interpolated. Blending two matrices component by component gives a transform that is neither of them and is not rigid — the classic collapsing-elbow artefact — while blending a translation, a quaternion and a scale independently gives exactly the pose halfway between the two. Every clip, every blend tree and every layer in this assembly works on these; the matrix is produced once, at the end, by ComputeSkinningMatrices.

Non-uniform scale is carried because exporters emit it and dropping it silently would make a scaled prop detach from the hand holding it. It is not composed correctly through a rotated parent — nothing that decomposes to TRS can be, since the product of a rotation and a non-uniform scale is a shear — so a rig that scales non-uniformly under a rotation gets the same answer every other engine gives, which is the approximation and not the shear.

The fields are public and mutable on purpose; see the note in .editorconfig. A pose is a span this module writes in place.

Fields and properties (4)

  • public Vector3 Translation

    Offset from the parent joint.

  • public Quaternion Rotation

    Rotation relative to the parent joint.

  • public Vector3 Scale

    Scale relative to the parent joint.

  • public static BoneTransform Identity

    The transform that changes nothing.

Methods (8)

Used by (118, showing 40)

  • CharacterAnimationThirdPersonShooter
  • SamplingBenchmarksVixen.Benchmarks.Animation
  • AccumulatorVixen.Animation
  • AnimationClipVixen.Animation
  • AnimationClipContentVixen.Animation
  • AnimationClipTestsVixen.Animation.Tests
  • AnimationLayerVixen.Animation
  • AnimationSystemVixen.Animation
  • AnimatorVixen.Animation
  • AnimatorTestsVixen.Animation.Tests
  • AttachmentFrameVixen.Animation
  • AttachmentSocketVixen.Animation
  • AuthoringTestsVixen.Animation.Tests
  • BlendEvaluatorVixen.Animation
  • BlendTree1DVixen.Animation
  • BlendTree2DVixen.Animation
  • BlendTreeTestsVixen.Animation.Tests
  • BodyVariationVixen.Animation
  • BoneTransformTestsVixen.Animation.Tests
  • CameraConstraintsVixen.Animation
  • CameraSubjectVixen.Animation
  • CameraViewVixen.Animation
  • ClipMotionVixen.Animation
  • CompressionTestsVixen.Animation.Tests
  • ComputedTestBindingVixen.Animation.Tests
  • ConstraintBindingsVixen.Animation
  • ConstraintContextVixen.Animation
  • ConstraintFrameRecordVixen.Animation
  • ConstraintGizmoSystemVixen.Animation
  • ConstraintGizmosVixen.Animation
  • ConstraintProposalsVixen.Animation
  • ConstraintSolveContextVixen.Animation
  • ConstraintStackVixen.Animation
  • ConstraintTestsVixen.Animation.Tests
  • DefaultChainSolverVixen.Animation
  • DefaultConstraintArbiterVixen.Animation
  • EcsIntegrationTestsVixen.Animation.Tests
  • EntityFrameVixen.Animation
  • FootPlacementVixen.Animation
  • FootPlacementPresetVixen.Animation