hmi.math
Class SpatialInertiaTensor

java.lang.Object
  extended by hmi.math.SpatialInertiaTensor

public final class SpatialInertiaTensor
extends Object

Efficient implementation of the 6x6 spatial inertia tensor As defined in Rigid Body Dynamics Algorithms Roy Featherstone 2007 using a 13-element float array

Author:
Herwin van Welbergen

Field Summary
static int H
           
static int I
           
static int M
           
 
Constructor Summary
private SpatialInertiaTensor()
           
 
Method Summary
 void add(float[] destTensor, float[] tensor1, float[] tensor2)
          Idest = I1 + I2
 void add(float[] destTensor, int dstIndex, float[] tensor1, int index1, float[] tensor2, int index2)
          Idest = I1 + I2
static float[] getSpatialInertiaTensor()
          Returns a new float[13] array with zero components
static void set(float[] tensor, float[] rotI, float mass)
          Sets the tensor with the coordinate frame at the center of mass, that is, c = 0 rotI is the rotational inertia tensor at the center of mass
static void set(float[] tensor, float[] rotI, float[] pos, float mass)
          Sets the tensor, rotI is the rotational inertia tensor at the center of mass C pos is the vector OC, with O the origin of the body
static void set(float[] tensor, int iIndex, float[] rotI, float mass)
          Sets the tensor with the coordinate frame at the center of mass, that is, c = 0 rotI is the rotational inertia tensor at the center of mass
static void set(float[] tensor, int iIndex, float[] rotI, float[] pos, float mass)
          Sets the tensor, rotI is the rotational inertia tensor at the center of mass C pos is the vector OC, with O the origin of the body
static String toString(float[] tensor)
          String representation
static void transformSpatialVec(float[] vdest, float[] tensor, float[] a)
          vdest = tensor*a
static void transformSpatialVec(float[] vdest, int dstIndex, float[] tensor, int iIndex, float[] a, int aIndex)
          vdest = I*a
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

I

public static final int I
See Also:
Constant Field Values

H

public static final int H
See Also:
Constant Field Values

M

public static final int M
See Also:
Constant Field Values
Constructor Detail

SpatialInertiaTensor

private SpatialInertiaTensor()
Method Detail

getSpatialInertiaTensor

public static float[] getSpatialInertiaTensor()
Returns a new float[13] array with zero components


set

public static void set(float[] tensor,
                       float[] rotI,
                       float[] pos,
                       float mass)
Sets the tensor, rotI is the rotational inertia tensor at the center of mass C pos is the vector OC, with O the origin of the body


set

public static void set(float[] tensor,
                       int iIndex,
                       float[] rotI,
                       float[] pos,
                       float mass)
Sets the tensor, rotI is the rotational inertia tensor at the center of mass C pos is the vector OC, with O the origin of the body


set

public static void set(float[] tensor,
                       float[] rotI,
                       float mass)
Sets the tensor with the coordinate frame at the center of mass, that is, c = 0 rotI is the rotational inertia tensor at the center of mass


set

public static void set(float[] tensor,
                       int iIndex,
                       float[] rotI,
                       float mass)
Sets the tensor with the coordinate frame at the center of mass, that is, c = 0 rotI is the rotational inertia tensor at the center of mass


transformSpatialVec

public static void transformSpatialVec(float[] vdest,
                                       float[] tensor,
                                       float[] a)
vdest = tensor*a


transformSpatialVec

public static void transformSpatialVec(float[] vdest,
                                       int dstIndex,
                                       float[] tensor,
                                       int iIndex,
                                       float[] a,
                                       int aIndex)
vdest = I*a


add

public void add(float[] destTensor,
                float[] tensor1,
                float[] tensor2)
Idest = I1 + I2


add

public void add(float[] destTensor,
                int dstIndex,
                float[] tensor1,
                int index1,
                float[] tensor2,
                int index2)
Idest = I1 + I2


toString

public static String toString(float[] tensor)
String representation