#include <PPDSphereRadius.h>
Public Member Functions | |
PPDSphereRadius (std::string prevBodyName, unsigned int shapeIdx=0, unsigned int shapeIdxPrevBody=0) | |
virtual | ~PPDSphereRadius () |
virtual void | setValues (PropertySource *inValues) |
![]() | |
PPDSingleVar (std::string name, int modifiedFlag, VariableAccessor variableAccessor) | |
virtual | ~PPDSingleVar ()=default |
virtual void | getValues (PropertySink *outValues) |
![]() | |
PhysicsParameterDescriptor () | |
virtual | ~PhysicsParameterDescriptor () |
Protected Member Functions | |
virtual void | init (BodyParamInfo *bodyParamInfo) |
Private Attributes | |
std::string | prevBodyName |
unsigned int | shapeIdx |
unsigned int | shapeIdxPrevBody |
Additional Inherited Members | |
![]() | |
typedef std::function< double &(BodyParamInfo &)> | VariableAccessor |
![]() | |
BodyParamInfo * | bodyParamInfo |
Descriptor for the radius of a sphere-shaped body.
The sphere must be the first shape of the body for this to work. This is specific to the ball-on-plate task since it also has to adjust the ball's position to prevent it from clipping through the plate.
Note that this does not update the inertia based on the shape changes, for that, add PPDMassProperties after this descriptor.
Exposes:
Definition at line 54 of file PPDSphereRadius.h.
Rcs::PPDSphereRadius::PPDSphereRadius | ( | std::string | prevBodyName, |
unsigned int | shapeIdx = 0 , |
||
unsigned int | shapeIdxPrevBody = 0 |
||
) |
Constructor
shapeIdx | The spheres's index within given the body. This is given by the order of the shapes in the config xml-file. |
prevBodyName | Name of the previous body if the graph to which the sphere is placed relative to, Use "" if the sphere is defined in world coordinates |
Definition at line 39 of file PPDSphereRadius.cpp.
|
virtualdefault |
|
protectedvirtual |
Setup descriptor to work on the given body reference. Override for more custom initialization.
Reimplemented from Rcs::PPDSingleVar< double >.
Definition at line 98 of file PPDSphereRadius.cpp.
|
virtual |
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.
Reimplemented from Rcs::PPDSingleVar< double >.
Definition at line 46 of file PPDSphereRadius.cpp.
|
private |
Name of the previous body if the graph to which the sphere is placed relative to.
Definition at line 76 of file PPDSphereRadius.h.
|
private |
The spheres's index within given the body. This is given by the order of the shapes in the config xml-file.
Definition at line 79 of file PPDSphereRadius.h.
|
private |
The spheres's index within the previous body. This is given by the order of the shapes in the config xml-file.
Definition at line 81 of file PPDSphereRadius.h.