org.orekit.wrenches
Class Wrench

java.lang.Object
  extended by org.orekit.wrenches.Wrench

public class Wrench
extends Object

This class represents a wrench.

Since:
1.3
Version:
$Id: Wrench.java 9755 2014-01-06 17:06:13Z houdroge $
Author:
Rami Houdroge
Concurrency :
immutable

Field Summary
static Wrench ZERO
          Zero wrench.
 
Constructor Summary
Wrench(double[] data)
           Constructor from an array.
Wrench(Vector3D origin, Vector3D force, Vector3D torque)
          Create a wrench with given force and torque.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO

public static final Wrench ZERO
Zero wrench.

Constructor Detail

Wrench

public Wrench(Vector3D origin,
              Vector3D force,
              Vector3D torque)
Create a wrench with given force and torque.

Parameters:
origin - origin
force - force
torque - torque

Wrench

public Wrench(double[] data)
       throws OrekitException

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.

Parameters:
data - array with origin, force and torque
Throws:
OrekitException - if input data array has an incorrect length
Method Detail

getOrigin

public Vector3D getOrigin()
Returns:
the origin of the torque

getForce

public Vector3D getForce()
Returns:
the force

getTorque

public Vector3D getTorque()
Returns:
the torque

getTorque

public Vector3D getTorque(Vector3D origin)
Get the torque expressed in another point.

Parameters:
origin - new origin for torque expression
Returns:
the torque expressed in another point

add

public Wrench add(Wrench wrench)
Sum of two wrenches.

Parameters:
wrench - wrench to add
Returns:
sum of wrenches

sum

public static Wrench sum(Wrench wrench1,
                         Wrench wrench2)
Sum of two wrenches.

Parameters:
wrench1 - first wrench
wrench2 - second wrench
Returns:
sum of wrenches

displace

public Wrench displace(Vector3D newOrigin)
Displace current wrench.

Parameters:
newOrigin - new origin
Returns:
displaced wrench

displace

public static Wrench displace(Wrench wrench,
                              Vector3D newOrigin)
Displace current wrench.

Parameters:
wrench - the wrench to displace
newOrigin - new origin
Returns:
displaced wrench

getWrench

public double[] getWrench()
Get a double[] representation of this wrench.
 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.

Returns:
wrench as a double[].

toString

public String toString()
Get a String representation for this Wrench.

Overrides:
toString in class Object
Returns:
a representation for this wrench


Copyright © 2016 CNES. All Rights Reserved.