public class Wrench extends Object
Constructor and Description |
---|
Wrench(double[] data)
Constructor from an array.
|
Wrench(Vector3D origin,
Vector3D force,
Vector3D torque)
Create a wrench with given force and torque.
|
Modifier and Type | Method and Description |
---|---|
Wrench |
add(Wrench wrench)
Sum of two wrenches.
|
Wrench |
displace(Vector3D newOrigin)
Displace current wrench.
|
static Wrench |
displace(Wrench wrench,
Vector3D newOrigin)
Displace current wrench.
|
Vector3D |
getForce() |
Vector3D |
getOrigin() |
Vector3D |
getTorque() |
Vector3D |
getTorque(Vector3D origin)
Get the torque expressed in another point.
|
double[] |
getWrench()
Get a double[] representation of this wrench.
|
static Wrench |
sum(Wrench wrench1,
Wrench wrench2)
Sum of two wrenches.
|
String |
toString()
Get a String representation for this Wrench.
|
public static final Wrench ZERO
public Wrench(Vector3D origin, Vector3D force, Vector3D torque)
origin
- originforce
- forcetorque
- torquepublic Wrench(double[] data) throws PatriusException
Constructor from an array.
data = {ox, oy, oz, fx, fy, fz, tx, ty, tz}where o is the origin, f the force and t the torque.
data
- array with origin, force and torquePatriusException
- if input data array has an incorrect lengthpublic Vector3D getOrigin()
public Vector3D getForce()
public Vector3D getTorque()
public Vector3D getTorque(Vector3D origin)
origin
- new origin for torque expressionpublic Wrench add(Wrench wrench)
wrench
- wrench to addpublic static Wrench sum(Wrench wrench1, Wrench wrench2)
wrench1
- first wrenchwrench2
- second wrenchpublic Wrench displace(Vector3D newOrigin)
newOrigin
- new originpublic static Wrench displace(Wrench wrench, Vector3D newOrigin)
wrench
- the wrench to displacenewOrigin
- new originpublic double[] getWrench()
data = wrench.getWrench(); data = {ox, oy, oz, fx, fy, fz, tx, ty, tz}where o is the origin, f the force and t the torque.
Copyright © 2023 CNES. All rights reserved.