#include <PPDSingleVar.h>
Public Types | |
typedef std::function< T &(BodyParamInfo &)> | VariableAccessor |
Public Member Functions | |
PPDSingleVar (std::string name, int modifiedFlag, VariableAccessor variableAccessor) | |
virtual | ~PPDSingleVar ()=default |
virtual void | getValues (PropertySink *outValues) |
virtual void | setValues (PropertySource *inValues) |
![]() | |
PhysicsParameterDescriptor () | |
virtual | ~PhysicsParameterDescriptor () |
Protected Member Functions | |
virtual void | init (BodyParamInfo *bodyParamInfo) |
Private Attributes | |
std::string | name |
int | modifiedFlag |
VariableAccessor | variableAccessor |
Additional Inherited Members | |
![]() | |
BodyParamInfo * | bodyParamInfo |
Descriptor for a single scalar variable of type T. The actual parameter name is built to be [lower case body name]_[param name].
Definition at line 46 of file PPDSingleVar.h.
typedef std::function<T & (BodyParamInfo & )> Rcs::PPDSingleVar< T >::VariableAccessor |
Returns a reference to the variable whihc this descriptor uses.
Definition at line 52 of file PPDSingleVar.h.
|
inline |
Constructor.
name | unprefixed name for the parameter |
modifiedFlag | modified flag value to set for BodyParamInfo |
variableAccessor | variable accessor function. Returns a reference to be readable and writable. |
Definition at line 60 of file PPDSingleVar.h.
|
virtualdefault |
|
inlinevirtual |
Read values from graph and put them into the given dict.
Implements Rcs::PhysicsParameterDescriptor.
Definition at line 65 of file PPDSingleVar.h.
|
inlineprotectedvirtual |
Setup descriptor to work on the given body reference. Override for more custom initialization.
Reimplemented from Rcs::PhysicsParameterDescriptor.
Reimplemented in Rcs::PPDSphereRadius.
Definition at line 85 of file PPDSingleVar.h.
|
inlinevirtual |
Read values from the given dict and apply them to the graph. The parameter names need to be the same as in Rcs, e.g. rolling_friction_coefficient.
Implements Rcs::PhysicsParameterDescriptor.
Reimplemented in Rcs::PPDSphereRadius.
Definition at line 70 of file PPDSingleVar.h.
|
private |
Value to or to BodyParamInfo::modifiedFlag when modified.
Definition at line 96 of file PPDSingleVar.h.
|
private |
Parameter name/key which the init() method will add a body prefix to this.
Definition at line 93 of file PPDSingleVar.h.
|
private |
Variable accessor function.
Definition at line 99 of file PPDSingleVar.h.