KeyframeVector

A compiled vector with a scalar Keyframe for each component.


var vector = KeyframeVector.of(Keyframe.of(2F), Keyframe.ZERO, Keyframe.ZERO);
var position = vector.eval();

Since

3.7.0

Parameters

x

the X keyframe

y

the Y keyframe

z

the Z keyframe

Constructors

Link copied to clipboard
constructor()

Companion properties

Link copied to clipboard
The shared vector of three zero keyframes.

Companion functions

Link copied to clipboard
@NotNull
open fun of(@NotNull x: @NotNull Keyframe, @NotNull y: @NotNull Keyframe, @NotNull z: @NotNull Keyframe): @NotNull KeyframeVector
Creates a compiled vector from its scalar components.
Link copied to clipboard
@NotNull
open fun operate(@NotNull p0: @NotNull KeyframeVector, @NotNull p1: @NotNull KeyframeVector, @NotNull operator: Keyframe.Operator2): @NotNull KeyframeVector
Combines two vectors by applying the same binary operation to each pair of components.
@NotNull
open fun operate(@NotNull p0: @NotNull KeyframeVector, @NotNull p1: @NotNull KeyframeVector, @NotNull xOperator: Keyframe.Operator2, @NotNull yOperator: Keyframe.Operator2, @NotNull zOperator: Keyframe.Operator2): @NotNull KeyframeVector
Combines two vectors using a separate binary operation for each axis.
@NotNull
open fun operate(@NotNull p0: @NotNull KeyframeVector, @NotNull p1: @NotNull KeyframeVector, @NotNull p2: @NotNull KeyframeVector, @NotNull p3: @NotNull KeyframeVector, @NotNull operator: Keyframe.Operator4): @NotNull KeyframeVector
Combines four vectors by applying the same operation to the four values on each axis.

Functions

Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
@NotNull
open fun eval(): @NotNull Vector3f
Evaluates this vector with the shared empty runtime context.
@NotNull
open fun eval(@NotNull context: @NotNull KeyframeRuntimeContext): @NotNull Vector3f
Evaluates this vector with the supplied runtime context.
@NotNull
open fun eval(@NotNull context: @NotNull KeyframeRuntimeContext, @NotNull dest: @NotNull Vector3f, @NotNull operator: @NotNull KeyframeOperator): @NotNull Vector3f
Evaluates each component and passes the results to a destination operation.
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
open fun isConstant(): Boolean
Checks whether all components are constant.
Link copied to clipboard
open fun isZero(): Boolean
Checks whether this vector is the shared ZERO instance.
Link copied to clipboard
@NotNull
open fun map(@NotNull function: @NotNull Float2FloatFunction): @NotNull KeyframeVector
Applies the same scalar transformation to each component.
Link copied to clipboard
abstract fun toString(): String
Link copied to clipboard
@NotNull
open fun weight(@NotNull keyframe: @NotNull Keyframe): @NotNull KeyframeVector
Multiplies each component by the supplied scalar weight.
Link copied to clipboard
@NotNull
open fun withAxis(@NotNull axis: @NotNull KeyframeAxis): @NotNull KeyframeVector
Transforms each component with the corresponding axis mapping.