class mp2p_icp::ParameterSource

Overview

Users of derived classes must declare an instance of this type, then attach instances of derived classes to it, then optionally update variables via updateVariable(), then call realize() for the changes to take effect.

#include <Parameterizable.h>

class ParameterSource
{
public:
    // fields

    LocalVelocityBuffer localVelocityBuffer;

    // methods

    void attach(Parameterizable& obj);
    void updateVariable(const std::string& variable, double value);
    void updateVariables(const std::vector<std::pair<std::string, double>>& nameValuePairs);
    void realize();
    std::string printVariableValues() const;
    auto getVariableValues() const;
};

Fields

LocalVelocityBuffer localVelocityBuffer

Local velocity buffer for this parameter source

Methods

void updateVariable(const std::string& variable, double value)

Updates a variable value. Remember to call realize() after updating all variables for the changes to take effect

void updateVariables(const std::vector<std::pair<std::string, double>>& nameValuePairs)

Like updateVariable(), accepting several pairs of names-values

void realize()

Must be called after updating all variables so changes take effect.

auto getVariableValues() const

Returns a copy of the current variable values