#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. | |
| bool | operator< (const fdk::TimeValue &t) const |
| void | print (const char *prefix, std::ostream &o) const |
| Print values out. | |
| fdk::Mat4d | parentTransform () const |
| fdk::Mat4d | localTransform () const |
| fdk::Mat4d | transform () const |
| Build the transform matrix from parentTransform() * localTransform(). | |
| 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) |
| static float | GetAxisValsAtTime (const AxisValsSet &valsSet, const fdk::TimeValue &time, AxisValsSet::const_iterator &vals0, AxisValsSet::const_iterator &vals1) |
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.
Referenced by transform().
| 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.
Referenced by transform().
| 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::SceneOpI::extractSceneXformData().
|
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 of the -local- rotations for the filter to use on the entire series, usually taken from rot_order of the first AxisVal. Parent rotations are always filtered with XYZ rotation order.
If sort is true the vals array is first sorted by time, then filtered.
References parent_enable.
Referenced by DD::Image::SceneOpI::extractSceneXformData().
|
inlinestatic |
Retrieve iterators to the AxisVals in valsSet which times match time. If time falls exactly on an AxisVals or is before the first or after the then both iterators will be set to the same AxisVals. If a\ time falls between two AxisVals then the two iterators will be of the AxisVals before and after time and the interpolation factor 't' (0..1) will be returned.
References time.
Referenced by DD::Image::SceneOpI::getXformDataAt().
| ©2026 The Foundry Visionmongers, Ltd. All Rights Reserved. |