- Object
-
- Torque
-
public class Torque extends Object
Represents a torque about the z-axis.- Since:
- 1.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getTorque()
Returns the torque value.boolean
isComplete(double elapsedTime)
Returns true if this torque should be removed.void
set(double torque)
Sets thisTorque
to the given torque value.void
set(Torque torque)
String
toString()
-
-
-
Constructor Detail
-
Torque
public Torque()
Default constructor.- Since:
- 1.0.2
-
Torque
public Torque(double torque)
Creates aTorque
using specified torque value.- Parameters:
torque
- the torque
-
Torque
public Torque(Torque torque)
Copy constructor.- Parameters:
torque
- theTorque
to copy- Throws:
NullPointerException
- if torque is null
-
-
Method Detail
-
set
public void set(double torque)
Sets thisTorque
to the given torque value.- Parameters:
torque
- the torque
-
set
public void set(Torque torque)
- Parameters:
torque
- theTorque
to copy- Throws:
NullPointerException
- if torque is null
-
isComplete
public boolean isComplete(double elapsedTime)
Returns true if this torque should be removed.Implement this method to create
Torque
objects that are not cleared during the accumulation step.The default implementation always returns true.
- Parameters:
elapsedTime
- the elapsed time since the last call to this method- Returns:
- boolean true if this torque should be removed
- Since:
- 3.1.0
-
getTorque
public double getTorque()
Returns the torque value.- Returns:
- double
-
-