hmi.math
Class SpatialArticulatedBodyInertiaTensor

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

public final class SpatialArticulatedBodyInertiaTensor
extends Object

Efficient implementation of the 6x6 spatial articulated body inertia tensor As defined in Rigid Body Dynamics Algorithms Roy Featherstone 2007 SpatialArticulatedBodyInertiaTensor are stored using a 27-element float array Could be even more storage efficient if we use lower triangles of I and M

Author:
Herwin van Welbergen

Field Summary
static int H
           
static int I
           
static int M
           
 
Constructor Summary
private SpatialArticulatedBodyInertiaTensor()
           
 
Method Summary
 void add(float[] destTensor, float[] tensor1, float[] tensor2)
          Idst = I1 + I2
 void add(float[] destTensor, int dstIndex, float[] tensor1, int index1, float[] tensor2, int index2)
          Idst = I1 + I2
 void addSpatialInertia(float[] destTensor, float[] tensor1, float[] tensor2)
          Idst = I1 + I2, I2 is spatial inertia tensor (13 elements)
 void addSpatialInertia(float[] destTensor, int dstIndex, float[] tensor1, int index2, float[] tensor2, int index1)
          Idst = I1 + I2, I2 is spatial inertia tensor (13 elements)
static boolean epsilonEquals(float[] tensor1, float[] tensor2, float epsilon)
          Tests for equality of vector components within epsilon.
static float[] getSpatialArticulatedBodyInertiaTensor()
          Returns a new float[27] array with zero components
static void setFromSpatialInertiaTensor(float[] destTensor, float[] spatialTensor)
           
static String toString(float[] tensor)
          String representation
static void transformSpatialVec(float[] vdest, float[] tensor, float[] v)
          vdest = I*v
static void transformSpatialVec(float[] vdest, int dstIndex, float[] tensor, int iIndex, float[] v, int vIndex)
          vdest = I*v
static void xstarIXinv(float[] destTensor, float[] tensor, float[] srcTensor)
          destTensor = tensor* srcTensor tensor^-1
 
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

SpatialArticulatedBodyInertiaTensor

private SpatialArticulatedBodyInertiaTensor()
Method Detail

getSpatialArticulatedBodyInertiaTensor

public static float[] getSpatialArticulatedBodyInertiaTensor()
Returns a new float[27] array with zero components


add

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


add

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


addSpatialInertia

public void addSpatialInertia(float[] destTensor,
                              float[] tensor1,
                              float[] tensor2)
Idst = I1 + I2, I2 is spatial inertia tensor (13 elements)


addSpatialInertia

public void addSpatialInertia(float[] destTensor,
                              int dstIndex,
                              float[] tensor1,
                              int index2,
                              float[] tensor2,
                              int index1)
Idst = I1 + I2, I2 is spatial inertia tensor (13 elements)


transformSpatialVec

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


transformSpatialVec

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


xstarIXinv

public static void xstarIXinv(float[] destTensor,
                              float[] tensor,
                              float[] srcTensor)
destTensor = tensor* srcTensor tensor^-1


setFromSpatialInertiaTensor

public static void setFromSpatialInertiaTensor(float[] destTensor,
                                               float[] spatialTensor)

epsilonEquals

public static boolean epsilonEquals(float[] tensor1,
                                    float[] tensor2,
                                    float epsilon)
Tests for equality of vector components within epsilon.


toString

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