public class MotorManager
extends java.lang.Object
Constructor and Description |
---|
MotorManager(IAgentModel agentModel,
java.lang.String jointName,
IFunction motorFunction)
Constructor
|
MotorManager(MotorManager source)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
changePointCoordinates(int index,
double x,
double y)
Changes the coordinates of a support point.
|
IHingeJoint |
getHingeJoint() |
PiecewiseLinearFunction |
getLogFunction() |
IFunction |
getMotorFunction() |
java.lang.String |
getName() |
boolean |
hasSupportPointInArea(double left,
double right)
Checks if the function has a support point in the specified area
|
void |
resetSoftLog()
Resets previously recorded motor log
|
void |
setLogPoint(float x,
float y)
Adds a log point to the function
|
void |
setMotorFunction(IFunction motorFunction) |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
shiftPointCoordinates(int index,
double deltaX)
Changes the coordinates of a support point.
|
java.lang.String |
toCSVString()
Serialize the internal state into a CSV-format string
|
java.lang.String |
toString() |
public MotorManager(IAgentModel agentModel, java.lang.String jointName, IFunction motorFunction)
joint
- Hinge jointmotorFunction
- Motor movement functionpublic MotorManager(MotorManager source)
source
- Source object to copy state frompublic IHingeJoint getHingeJoint()
public java.lang.String getName()
public IFunction getMotorFunction()
public void setMotorFunction(IFunction motorFunction)
motorFunction
- the motorFunction to setpublic java.lang.String toCSVString()
public void setLogPoint(float x, float y)
point
- the point to addpublic PiecewiseLinearFunction getLogFunction()
public void resetSoftLog()
public org.apache.commons.math3.geometry.euclidean.twod.Vector2D changePointCoordinates(int index, double x, double y)
index
- the index of the point to change.x
- the new x coordinatey
- the new y coordinatepublic org.apache.commons.math3.geometry.euclidean.twod.Vector2D shiftPointCoordinates(int index, double deltaX)
index
- The index of the point to change.deltaX
- The change as a deltapublic boolean hasSupportPointInArea(double left, double right)
right
- border (joint coordinates)left
- border (joint coordinates)public java.lang.String toString()
toString
in class java.lang.Object