Class NodeAnimationChannel
Describes the animation of a single node. The name specifies the bone/node which is affected by this animation chanenl. The keyframes are given in three separate seties of values, one for each position, rotation, and scaling. The transformation matrix is computed from these values and replaces the node's original transformation matrix at a specific time.
This means all keys are absolute and not relative to the bone default pose. The order which the transformations are to be applied is scaling, rotation, and translation (SRT).
Keys are in chronological order and duplicate keys do not pass the validation step. There most likely will be no negative time values, but they are not forbidden.
Implements
Inherited Members
Namespace: SharpAssimp
Assembly: SharpAssimp.dll
Syntax
public sealed class NodeAnimationChannel : IMarshalable<NodeAnimationChannel, AiNodeAnim>
Constructors
| Edit this page View SourceNodeAnimationChannel()
Constructs a new instance of the NodeAnimationChannel class.
Declaration
public NodeAnimationChannel()
Properties
| Edit this page View SourceHasPositionKeys
Gets if this animation channel contains position keys.
Declaration
public bool HasPositionKeys { get; }
Property Value
Type | Description |
---|---|
bool |
HasRotationKeys
Gets if the animation channel contains rotation keys.
Declaration
public bool HasRotationKeys { get; }
Property Value
Type | Description |
---|---|
bool |
HasScalingKeys
Gets if the animation channel contains scaling keys.
Declaration
public bool HasScalingKeys { get; }
Property Value
Type | Description |
---|---|
bool |
NodeName
Gets or sets the name of the node affected by this animation. It must exist
and it must
be unique.
Declaration
public string NodeName { get; set; }
Property Value
Type | Description |
---|---|
string |
PositionKeyCount
Gets the number of position keys in the animation channel.
Declaration
public int PositionKeyCount { get; }
Property Value
Type | Description |
---|---|
int |
PositionKeys
Gets the position keys of this animation channel. Positions are specified as a 3D vector. If there are position keys, there should also be -at least- one scaling and one rotation key.
Declaration
public List<VectorKey> PositionKeys { get; }
Property Value
Type | Description |
---|---|
List<VectorKey> |
PostState
Gets or sets how the animation behaves after the last key was processed. By default the original transformation matrix of the affected node is taken.
Declaration
public AnimationBehaviour PostState { get; set; }
Property Value
Type | Description |
---|---|
AnimationBehaviour |
PreState
Gets or sets how the animation behaves before the first key is encountered. By default the original transformation matrix of the affected node is used.
Declaration
public AnimationBehaviour PreState { get; set; }
Property Value
Type | Description |
---|---|
AnimationBehaviour |
RotationKeyCount
Gets the number of rotation keys in the animation channel.
Declaration
public int RotationKeyCount { get; }
Property Value
Type | Description |
---|---|
int |
RotationKeys
Gets the rotation keys of this animation channel. Rotations are given as quaternions. If this exists, there should be -at least- one scaling and one position key.
Declaration
public List<QuaternionKey> RotationKeys { get; }
Property Value
Type | Description |
---|---|
List<QuaternionKey> |
ScalingKeyCount
Gets the number of scaling keys in the animation channel.
Declaration
public int ScalingKeyCount { get; }
Property Value
Type | Description |
---|---|
int |
ScalingKeys
Gets the scaling keys of this animation channel. Scalings are specified in a 3D vector. If there are scaling keys, there should also be -at least- one position and one rotation key.
Declaration
public List<VectorKey> ScalingKeys { get; }
Property Value
Type | Description |
---|---|
List<VectorKey> |
Methods
| Edit this page View SourceFreeNative(nint, bool)
Frees unmanaged memory created by ToNative(nint, out Native).
Declaration
public static void FreeNative(nint nativeValue, bool freeNative)
Parameters
Type | Name | Description |
---|---|---|
nint | nativeValue | Native value to free |
bool | freeNative | True if the unmanaged memory should be freed, false otherwise. |