![]() |
ImFusion SDK 4.3
|
#include <ImFusion/US/MotionTrajectoryModel.h>
A motion model that extends rigid motion with possible waypoint parametrization. More...
Inheritance diagram for ParametricMotionModel:A motion model that extends rigid motion with possible waypoint parametrization.
This class extends the functionality of SimpleMotionModel in RigidPose mode by combining it with a spline-based MotionModel. The base rigid motion is defined by the first 6 parameters and handled by SimpleMotionModel. The remaining parameters are used to define waypoints.
k blocks of 6 values.MotionModel.numberOfControlPoints()) does not necessarily match the number of blocks. The motion will be calculated based on these waypoints, and for each control point, the pose matrix will be interpolated.setParameters(std::vector<double>) is not overridden. Parameters are exposed as-is:pars[0..5]: Rigid motion parameters.pars[6..]: k blocks of 6 parameters (position + Euler angles).Public Member Functions | |
| ParametricMotionModel (int size) | |
| std::string | name () const override |
| Returns the name of the current motion model. | |
| void | configure (const Properties *p) override |
| Extends MotionTrajectoryModel::configure(const Properties *) | |
| void | configuration (Properties *p) const override |
| Saves the current model settings into the provided Properties object, including the "numCtrlPoints" property if set. | |
| std::vector< mat4 > | defineMotion () const override |
| Computes a set of m_size matrices describing the intended motion trajectory. | |
| mat4 | fitMatrices (const std::vector< mat4 > &mat) override |
| Sets the parameters based on the given motion sequence. | |
| void | setNumberOfControlPoints (int p, bool opt=false) |
| Function defining the number of control points and optimization flag. | |
| int | numberOfControlPoints () const |
| bool | optimizeControlPoints () const |
Public Member Functions inherited from MotionTrajectoryModel | |
| MotionTrajectoryModel (int size) | |
| void | setRelativeShiftMatrix (const mat4 &relShiftBefore) |
| Sets the relative shift matrix applied before the motion. | |
| virtual int | numberOfParameters () const |
| virtual std::vector< double > | parameters () const |
| virtual void | setParameters (const std::vector< double > &pars) |
Public Member Functions inherited from Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Protected Attributes | |
| int | m_numCtrlPoints = 1 |
| Control points of underlying MotionModel; Should not exceed the size of a model. | |
| bool | m_modelOpt = false |
| Optimize motion control points. | |
Protected Attributes inherited from MotionTrajectoryModel | |
| const int | m_size |
| Size of the model, regularly the number of frames. | |
| std::vector< double > | m_pars |
| Full motion parameter vector - not necessarily the exposed ones. | |
| mat4 | m_relShift |
| Generic helper matrix to incorporate optional shifts. Considered by rigidMotion(). | |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
Additional Inherited Members | |
Public Types inherited from MotionTrajectoryModel | |
| typedef std::function< MotionTrajectoryModel *(int)> | createModelFunc |
| Function signature for creating a motion model with a given size. | |
Static Public Member Functions inherited from MotionTrajectoryModel | |
| static std::vector< std::pair< std::string, createModelFunc > > & | supportedModels () |
| Returns a list of supported motion models. | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Protected Member Functions inherited from MotionTrajectoryModel | |
| std::vector< mat4 > | rigidMotion (const mat4 &m0, const mat4 &m1, int startFrame=0, int endFrame=-1) const |
| Helper method to interpolate a rigid motion between m0 and m1. | |
|
explicit |
| size | The number of frames in the motion sequence. |
|
inlineoverridevirtual |
Returns the name of the current motion model.
Implements MotionTrajectoryModel.
|
overridevirtual |
Extends MotionTrajectoryModel::configure(const Properties *)
Supports additional properties specific to this model:
Reimplemented from MotionTrajectoryModel.
|
overridevirtual |
Saves the current model settings into the provided Properties object, including the "numCtrlPoints" property if set.
Reimplemented from MotionTrajectoryModel.
|
overridevirtual |
Computes a set of m_size matrices describing the intended motion trajectory.
Implements MotionTrajectoryModel.
|
overridevirtual |
Sets the parameters based on the given motion sequence.
mat.size() > m_size, the behavior is undefined. Ensure the input sequence does not exceed the model size. Implements MotionTrajectoryModel.
| void setNumberOfControlPoints | ( | int | p, |
| bool | opt = false ) |
Function defining the number of control points and optimization flag.
opt == false: Control points are distributed uniformly over the normalized time interval (0, 1), excluding the start and end frames.opt == true: Control points are distributed non-uniformly based on the Manhattan norm of each parameter block.| p | Number of control points to use (must be 0 < p < m_size). |
| opt | Whether to optimize the distribution of control points based on waypoint motion. |