MeshTransform
The MeshTransform class provides functionality for defining and manipulating transformations applied to a 3D mesh over time. It supports transformations such as translation, rotation, scale, and morphing, allowing each transformation to be set and retrieved for specific time intervals. The class includes methods for managing keyframes for each type of transformation, enabling smooth animation and interpolation of transformations between time points.
#include <format/TellusimMesh.h>
Constructors
MeshTransform()
Methods
Clear transform.
void clear()
Time range.
float64_t getMinTime() const
float64_t getMaxTime() const
Set transform.
void setTransform(float64_t time, Matrix4x3d transform, float32_t threshold = 1e-6f)
void setTranslate(float64_t time, Vector3d translate, float32_t threshold = 1e-6f)
void setRotate(float64_t time, Quaternionf rotate, float32_t threshold = 1e-6f)
void setScale(float64_t time, Vector3f scale, float32_t threshold = 1e-6f)
void setMorph(float64_t time, Vector4f morph, float32_t threshold = 1e-6f)
Get transform.
Matrix4x3d getTransform(float64_t time) const
Vector3d getTranslate(float64_t time) const
Quaternionf getRotate(float64_t time) const
Vector3f getScale(float64_t time) const
Vector4f getMorph(float64_t time) const
Transform keys.
bool hasTransformKeys() const
Translation keys.
void setTranslateKeys(const TranslateKeys &keys, float64_t scale = 1.0)
TranslateKeys getTranslateKeys() const
bool hasTranslateKeys() const
Rotation keys.
void setRotateKeys(const RotateKeys &keys)
RotateKeys getRotateKeys() const
bool hasRotateKeys() const
Scaling keys.
void setScaleKeys(const ScaleKeys &keys)
ScaleKeys getScaleKeys() const
bool hasScaleKeys() const
Morphing keys.
void setMorphKeys(const MorphKeys &keys)
MorphKeys getMorphKeys() const
bool hasMorphKeys() const
Apply transform.
void setTransform(Vector3d scale)
void setTransform(Matrix4x3d transform)
Memory usage.
size_t getMemory() const
Types
using TranslateKeys = Array<KeyData<Vector3d>>
using RotateKeys = Array<KeyData<Quaternionf>>
using ScaleKeys = Array<KeyData<Vector3f>>
using MorphKeys = Array<KeyData<Vector4f>>
Structs
KeyData
Transform data.
Variables
Type | Name |
---|---|
float64_t | time |
Type | data |