#include <AxisVals.h>
Public Member Functions | |
AxisVals ()=default | |
Default ctor leaves junk in values. | |
AxisVals (const fdk::TimeValue &time, bool _parent_enable) | |
Assigns standard default values to all vars. | |
bool | operator< (const AxisVals &b) const |
Compares time value. Used by the sort routine. | |
void | print (const char *prefix, std::ostream &o) const |
Print values out. | |
fdk::Mat4d | parentTransform () const |
fdk::Mat4d | localTransform () const |
fdk::Vec3d | totalScaling () const |
Get the total scaling factor as a Vec3 (scaling * uniform_scale.) | |
void | setToDefault (const fdk::TimeValue &_time=fdk::defaultTimeValue()) |
Assigns standard default values to all params. | |
void | setLocalXformValsToDefault () |
Assigns standard default values to transform params (rotate, scale, etc.) | |
void | setParentXformValsToDefault () |
bool | isLocalXformValsDefault () const |
Return true if xform vals are at default settings. | |
bool | isParentXformValsDefault () const |
void | enableParentXformVals (bool enable=true) |
Enable the parent knobs so that they are stored and sampled. | |
bool | extractFromMatrix (const fdk::Mat4d &m, bool T_enable, bool R_enable, bool S_enable, fdk::RotateOrder decompose_rot_order, bool apply_to_parent=false) |
Static Public Member Functions | |
static void | applyEulerFilter (fdk::RotateOrder target_rot_order, AxisValsArray &vals, bool sort=false) |
Encapsulates all the parameters in an Axis_Knob so they can be considered as a set and processed as arrays of coherent values.
Mat4d AxisVals::parentTransform | ( | ) | const |
Build a matrix from the current parent TRS values. Transform order is always SRT and rotation order is always XYZ.
References parent_enable, parentR, parentS, and parentT.
Mat4d AxisVals::localTransform | ( | ) | const |
Build a matrix from the current local TRS values - unless use_matrix is true, then the matrix var is returned. xform_order and rot_order control the composition sequence.
References matrix, pivotR, pivotT, rot_order, rotate, skew, totalScaling(), translate, use_matrix, and xform_order.
bool AxisVals::extractFromMatrix | ( | const fdk::Mat4d & | m, |
bool | T_enable, | ||
bool | R_enable, | ||
bool | S_enable, | ||
fdk::RotateOrder | decompose_rot_order, | ||
bool | apply_to_parent = false |
||
) |
Decompose the matrix into TRS values, targeting either the local or parent TRS params. If a TRS enable is false the respective param is set to its default value. Targeting the parent TRS will also turn on parent_enable.
References enableParentXformVals(), parentR, parentS, parentT, rotate, scaling, setLocalXformValsToDefault(), skew, and translate.
Referenced by DD::Image::AxisOp::importScenePrim().
|
static |
Apply an euler filter to the local and parent rotations in the array of AxisVals. This is typically needed after matrix decomposition of a series of animated matrix keyframes.
target_rot_order specifies the preferred rotation order for the filter to use on the entire series, usually taken from rot_order of the first AxisVal.
If sort is true the vals array is first sorted by time, then filtered.
References parent_enable.
Referenced by DD::Image::AxisOp::importScenePrim().
©2024 The Foundry Visionmongers, Ltd. All Rights Reserved. |