Struct FrameBone ​
Namespace: ValveResourceFormat.ResourceTypes.ModelAnimation
Assembly: ValveResourceFormat.dll
Represents the transform of a bone in a single animation frame.
public record struct FrameBone : IEquatable<FrameBone>Implements ​
Constructors ​
FrameBone(Vector3, float, Quaternion) ​
Initializes with a position, scale, and rotation.
public FrameBone(Vector3 position, float scale, Quaternion rotation)Parameters ​
position Vector3
scale float
rotation Quaternion
FrameBone(Vector4, Quaternion) ​
Initializes with a combined position+scale, and rotation.
public FrameBone(Vector4 positionScale, Quaternion rotation)Parameters ​
positionScale Vector4
rotation Quaternion
Properties ​
Angle ​
Gets or sets the rotation of the bone.
public Quaternion Angle { readonly get; set; }Property Value ​
Identity ​
The identity bone transform.
public static FrameBone Identity { get; }Property Value ​
Position ​
Gets or sets the position of the bone.
public Vector3 Position { readonly get; set; }Property Value ​
PositionScale ​
Gets the position and scale of this bone combined into a Vector4 .
public readonly Vector4 PositionScale { get; }Property Value ​
Scale ​
Gets or sets the scale of the bone.
public float Scale { readonly get; set; }Property Value ​
float
ScaleVector ​
Gets the scale of this bone as a Vector3 .
public readonly Vector3 ScaleVector { get; }Property Value ​
Methods ​
Blend(FrameBone, float) ​
Blends to the target transform normally.
public readonly FrameBone Blend(FrameBone target, float t)Parameters ​
target FrameBone
t float
Returns ​
BlendAdd(FrameBone, float) ​
Blends to the target transform additively.
public readonly FrameBone BlendAdd(FrameBone other, float t)Parameters ​
other FrameBone
t float
Returns ​
Concat(FrameBone) ​
Composes a transform expressed in this one's space onto it, flipping the local rotation's sign to our hemisphere.
public readonly FrameBone Concat(FrameBone local)Parameters ​
local FrameBone
Returns ​
FromMatrix(in Matrix4x4) ​
Reads a transform with uniform scale from a matrix.
public static FrameBone FromMatrix(in Matrix4x4 matrix)Parameters ​
matrix Matrix4x4
Returns ​
Inverse() ​
Gets the inverse transform.
public readonly FrameBone Inverse()Returns ​
Multiply(FrameBone, FrameBone) ​
Combines two transforms.
public static FrameBone Multiply(FrameBone left, FrameBone right)Parameters ​
left FrameBone
right FrameBone
Returns ​
ToMatrix() ​
Converts to a matrix.
public readonly Matrix4x4 ToMatrix()Returns ​
TransformPoint(Vector3) ​
Transforms a point by this transform.
public readonly Vector3 TransformPoint(Vector3 point)Parameters ​
point Vector3
Returns ​
Operators ​
operator *(FrameBone, FrameBone) ​
Combines two transforms, applying lhs first and then rhs, as the product of their matrices does.
public static FrameBone operator *(FrameBone lhs, FrameBone rhs)Parameters ​
lhs FrameBone
rhs FrameBone

