posemath



rcs.posemath
Class Posemath

java.lang.Object
  extended by rcs.posemath.Posemath

public class Posemath
   
   
    
    extends java.lang.Object
   
   
 


Field Summary
static doubleCART_FUZZ            
static doubleDBL_MAX            
static booleandebug_on            
static doubleDOUBLE_FUZZ            
static doubleDOUBLECP_FUZZ            
static doubleE_EPSILON            
static doublePI            
static doublePI_2            
static doublePI_4            
static doublePM_2_PI            
static intPM_DIV_ERR            
static intPM_ERR            
static intPM_IMPL_ERR            
static intPM_NORM_ERR            
static doublePM_PI            
static doublePM_PI_2            
static doublePM_PI_4            
static booleanPM_PRINT_ERROR            
static intPM_X            
static intPM_Y            
static intPM_Z            
static intpmErrno            
static doubleQ_FUZZ            
static doubleQS_FUZZ            
static doubleQSIN_FUZZ            
static doubleRPY_P_FUZZ            
static doubleRS_FUZZ            
static doubleSINGULAR_EPSILON            
static doubleSQRT_FUZZ            
static doubleUNIT_QUAT_FUZZ            
static doubleUNIT_SC_FUZZ            
static doubleUNIT_VEC_FUZZ            
static doubleV_FUZZ            
static doubleZYX_Y_FUZZ            
static doubleZYZ_Y_FUZZ            
 
Constructor Summary
Posemath()            
 
Method Summary
static PM_CARTESIANadd(PM_CARTESIAN v1, PM_CARTESIAN v2)            
static PmCartesianadd(PmCartesian v1, PmCartesian v2)            
static double[]computeLineFitErrors(PM_LINE line, java.util.List<? extends PmCartesian> l)           Compute an array of errors or the distance between each point in list l to line line.
static PM_CARTESIANcross(PM_CARTESIAN v1, PM_CARTESIAN v2)            
static PM_CYLINDRICALcross(PM_CYLINDRICAL v1, PM_CYLINDRICAL v2)            
static doubledisp(PM_CARTESIAN v1, PM_CARTESIAN v2)            
static PM_CARTESIANdivide(PM_CARTESIAN v, double d)            
static PM_CYLINDRICALdivide(PM_CYLINDRICAL c, double d)            
static PM_QUATERNIONdivide(PM_QUATERNION q, double s)            
static PM_ROTATION_VECTORdivide(PM_ROTATION_VECTOR r, double s)            
static doubledot(PM_CARTESIAN v1, PM_CARTESIAN v2)            
static doubledot(PM_CYLINDRICAL v1, PM_CYLINDRICAL v2)            
static doubledot(PmCartesian v1, PmCartesian v2)            
static PM_CIRCLEfitCircle2D_XY(java.util.List<? extends PmCartesian> l)           Ignores the z value in each element of the list and returns a circle fit with least-squares error to x,y points
static PM_LINEfitLine(java.util.List<? extends PmCartesian> l)           Ignores the z value in each element of the list and returns a line fit with least-squares error to x,y points
static PM_CARTESIANintersection(PM_LINE l1, PM_LINE l2)            
static PM_CARTESIANinv(PM_CARTESIAN v)            
static PM_CYLINDRICALinv(PM_CYLINDRICAL v)            
static PM_HOMOGENEOUSinv(PM_HOMOGENEOUS h)            
static PM_POSEinv(PM_POSE p)            
static PM_QUATERNIONinv(PM_QUATERNION q1)            
static PM_XYAinv(PM_XYA p)            
static booleanIS_FUZZ(double a, double fuzz)            
static booleanisNorm(PM_CARTESIAN v)            
static booleanisNorm(PM_CYLINDRICAL v)            
static booleanisNorm(PM_QUATERNION q1)            
static booleanisNorm(PM_ROTATION_MATRIX m)            
static booleanisNorm(PM_ROTATION_VECTOR r)            
static doublemag(PM_CARTESIAN v)            
static doublemag(PM_CYLINDRICAL v1)            
static doublemag(PM_QUATERNION q)            
static doublemag(PmCartesian v)            
static voidmain(java.lang.String[] args)            
static PM_CARTESIANmultiply(double d, PM_CARTESIAN v)            
static PM_CYLINDRICALmultiply(double d, PM_CYLINDRICAL c)            
static PM_QUATERNIONmultiply(double s, PM_QUATERNION q)            
static PmRotationVectormultiply(double s, PM_ROTATION_VECTOR r)            
static PmCartesianmultiply(double d, PmCartesian v)            
static PM_CARTESIANmultiply(PM_CARTESIAN v, double d)            
static PM_CYLINDRICALmultiply(PM_CYLINDRICAL c, double d)            
static PM_CARTESIANmultiply(PM_POSE p1, PM_CARTESIAN v2)            
static PM_POSEmultiply(PM_POSE p1, PM_POSE p2)            
static PM_QUATERNIONmultiply(PM_QUATERNION q, double s)            
static PM_CARTESIANmultiply(PM_QUATERNION q1, PM_CARTESIAN v2)            
static PM_QUATERNIONmultiply(PM_QUATERNION q1, PM_QUATERNION q2)            
static PM_CARTESIANmultiply(PM_ROTATION_MATRIX m, PM_CARTESIAN v)            
static PM_ROTATION_MATRIXmultiply(PM_ROTATION_MATRIX m1, PM_ROTATION_MATRIX m2)            
static PM_ROTATION_VECTORmultiply(PM_ROTATION_VECTOR r, double s)            
static PM_XYAmultiply(PM_XYA p1, PM_XYA p2)            
static PmCartesianmultiply(PmCartesian v, double d)            
static PM_CARTESIANneg(PM_CARTESIAN v)            
static PM_CYLINDRICALneg(PM_CYLINDRICAL v)            
static PM_CARTESIANnorm(PM_CARTESIAN v)            
static PM_CYLINDRICALnorm(PM_CYLINDRICAL v)            
static PM_QUATERNIONnorm(PM_QUATERNION q1)            
static PM_ROTATION_VECTORnorm(PM_ROTATION_VECTOR r)            
static intpmAxisAngleQuatConvert(int axis, double a, PmQuaternion q)           Store a quaternion based on a single rotation about an axis
static intpmCartCartAdd(PmCartesian v1, PmCartesian v2, PmCartesian vout)            
static booleanpmCartCartCompare(PmCartesian v1, PmCartesian v2)            
static intpmCartCartCross(PmCartesian v1, PmCartesian v2, PmCartesian vout)            
static doublepmCartCartDisp(PmCartesian v1, PmCartesian v2)            
static doublepmCartCartDot(PmCartesian v1, PmCartesian v2)            
static intpmCartCartProj(PmCartesian v1, PmCartesian v2, PmCartesian vout)            
static intpmCartCartSub(PmCartesian v1, PmCartesian v2, PmCartesian vout)            
static intpmCartCylConvert(PmCartesian v, PmCylindrical c)            
static intpmCartInv(PmCartesian v1, PmCartesian vout)            
static booleanpmCartIsNorm(PmCartesian v)            
static doublepmCartMag(PmCartesian v)            
static intpmCartNeg(PmCartesian v1, PmCartesian vout)            
static intpmCartNorm(PmCartesian v, PmCartesian vout)            
static intpmCartPlaneProj(PmCartesian v, PmCartesian normal, PmCartesian vout)            
static intpmCartScalDiv(PmCartesian v1, double d, PmCartesian vout)            
static intpmCartScalMult(PmCartesian v1, double d, PmCartesian vout)            
static intpmCartSphConvert(PmCartesian v, PmSpherical s)           Convert a PmCartesian to PmSpherical
static intpmCircleInit(PmCircle circle, PmPose start, PmPose end, PmCartesian center, PmCartesian normal, int turn)            
static intpmCirclePoint(PmCircle circle, double angle, PmPose point)            
static booleanpmClose(double a, double b, double eps)           Determine if a within eps of b.
static intpmCylCartConvert(PmCylindrical c, PmCartesian v)           Convert cylindrical to cartesian.
static intpmCylCylAdd(PmCylindrical c1, PmCylindrical c2, PmCylindrical cout)            
static booleanpmCylCylCompare(PmCylindrical v1, PmCylindrical v2)            
static intpmCylCylCross(PmCylindrical c1, PmCylindrical c2, PmCylindrical cout)            
static doublepmCylCylDot(PmCylindrical c1, PmCylindrical c2)            
static intpmCylCylSub(PmCylindrical c1, PmCylindrical c2, PmCylindrical cout)            
static intpmCylInv(PmCylindrical c, PmCylindrical cout)            
static booleanpmCylIsNorm(PmCylindrical v)            
static doublepmCylMag(PmCylindrical c)            
static intpmCylNeg(PmCylindrical v1, PmCylindrical vout)            
static intpmCylNorm(PmCylindrical v, PmCylindrical vout)            
static intpmCylScalDiv(PmCylindrical v1, double d, PmCylindrical vout)            
static intpmCylScalMult(PmCylindrical v1, double d, PmCylindrical vout)            
static intpmCylSphConvert(PmCylindrical c, PmSpherical s)           Convert a cylindrical to a spherical
static intpmHomInv(PmHomogeneous h1, PmHomogeneous h2)            
static intpmHomPoseConvert(PmHomogeneous h, PmPose p)            
static intpmLineInit(PmLine line, PmPose start, PmPose end)            
static intpmLinePoint(PmLine line, double len, PmPose point)            
static intpmMatCartMult(PmRotationMatrix m, PmCartesian v, PmCartesian vout)            
static intpmMatInv(PmRotationMatrix m, PmRotationMatrix mout)            
static booleanpmMatIsNorm(PmRotationMatrix m)            
static intpmMatMatMult(PmRotationMatrix m1, PmRotationMatrix m2, PmRotationMatrix mout)            
static intpmMatNorm(PmRotationMatrix m, PmRotationMatrix mout)            
static intpmMatQuatConvert(PmRotationMatrix m, PmQuaternion q)            
static intpmMatRotConvert(PmRotationMatrix m, PmRotationVector r)            
static intpmMatRpyConvert(PmRotationMatrix m, PmRpy rpy)            
static intpmMatZyxConvert(PmRotationMatrix m, PmEulerZyx zyx)            
static intpmMatZyzConvert(PmRotationMatrix m, PmEulerZyz zyz)            
static intpmPoseCartMult(PmPose p1, PmCartesian v2, PmCartesian vout)            
static intpmPoseHomConvert(PmPose p, PmHomogeneous h)            
static intpmPoseInv(PmPose p1, PmPose p2)            
static booleanpmPosePoseCompare(PmPose p1, PmPose p2)            
static intpmPosePoseMult(PmPose p1, PmPose p2, PmPose pout)            
static PmQuaternionpmQuatAxisAngleMult(PmQuaternion q, int axis, double angle)            
static intpmQuatAxisAngleMult(PmQuaternion q, int axis, double angle, PmQuaternion pq)            
static intpmQuatCartMult(PmQuaternion q1, PmCartesian v2, PmCartesian vout)            
static intpmQuatInv(PmQuaternion q1, PmQuaternion qout)            
static booleanpmQuatIsNorm(PmQuaternion q1)            
static doublepmQuatMag(PmQuaternion q)            
static intpmQuatMatConvert(PmQuaternion q, PmRotationMatrix m)            
static intpmQuatNorm(PmQuaternion q1, PmQuaternion qout)            
static booleanpmQuatQuatCompare(PmQuaternion q1, PmQuaternion q2)            
static intpmQuatQuatMult(PmQuaternion q1, PmQuaternion q2, PmQuaternion qout)            
static intpmQuatRotConvert(PmQuaternion q, PmRotationVector r)           Convert a quaternion to a rotation vector
static intpmQuatRpyConvert(PmQuaternion q, PmRpy rpy)            
static intpmQuatScalDiv(PmQuaternion q, double s, PmQuaternion qout)            
static intpmQuatScalMult(PmQuaternion q, double s, PmQuaternion qout)            
static intpmQuatZyxConvert(PmQuaternion q, PmEulerZyx zyx)            
static intpmQuatZyzConvert(PmQuaternion q, PmEulerZyz zyz)            
static booleanpmRotIsNorm(PmRotationVector r)            
static intpmRotMatConvert(PmRotationVector r, PmRotationMatrix m)           Convert a rotation vector to a rotation matrix.
static intpmRotNorm(PmRotationVector r, PmRotationVector rout)            
static intpmRotQuatConvert(PmRotationVector r, PmQuaternion q)           Convert a rotation vector to a quaternion
static intpmRotScalDiv(PmRotationVector r, double s, PmRotationVector rout)            
static intpmRotScalMult(PmRotationVector r, double s, PmRotationVector rout)            
static intpmRpyMatConvert(PmRpy rpy, PmRotationMatrix m)            
static intpmRpyQuatConvert(PmRpy rpy, PmQuaternion q)            
static intpmRpyRotConvert(PmRpy rpy, PmRotationVector r)            
static intpmRpyZyxConvert(PmRpy rpy, PmEulerZyx zyx)            
static intpmRpyZyzConvert(PmRpy rpy, PmEulerZyz zyz)            
static intpmSphCartConvert(PmSpherical s, PmCartesian v)           Convert PmSherical to PmCartesian
static intpmSphCylConvert(PmSpherical s, PmCylindrical c)           Convert a spherical to cylindrical
static doublepmSq(double x)           Square of x or x*x.
static doublepmSqrt(double x)           Square root function that adds some extra checks similiar to the C++ pmSqrt() primarily only exists for converting C++ apps.
static intpmZyxMatConvert(PmEulerZyx zyx, PmRotationMatrix m)            
static intpmZyxQuatConvert(PmEulerZyx zyx, PmQuaternion q)            
static intpmZyxRotConvert(PmEulerZyx zyx, PmRotationVector r)            
static intpmZyxRpyConvert(PmEulerZyx zyx, PmRpy rpy)            
static intpmZyxZyzConvert(PmEulerZyx zyx, PmEulerZyz zyz)            
static intpmZyzMatConvert(PmEulerZyz zyz, PmRotationMatrix m)            
static intpmZyzQuatConvert(PmEulerZyz zyz, PmQuaternion q)            
static intpmZyzRotConvert(PmEulerZyz zyz, PmRotationVector r)            
static intpmZyzRpyConvert(PmEulerZyz zyz, PmRpy rpy)            
static PM_CARTESIANpoint_on_line_segment(PM_CARTESIAN s, PM_CARTESIAN e, PM_CARTESIAN p)            
static PM_CARTESIANpoint_on_line(PM_CARTESIAN s, PM_CARTESIAN u, PM_CARTESIAN p)            
static PM_CARTESIANpoint_on_line(PM_LINE line, PM_CARTESIAN p)            
static PmCartesianpoint_on_line(PM_LINE line, PmCartesian p)            
static PM_CARTESIANproj(PM_CARTESIAN v1, PM_CARTESIAN v2)            
static PM_CARTESIANsubtract(PM_CARTESIAN v1, PM_CARTESIAN v2)            
static PmCartesiansubtract(PmCartesian v1, PmCartesian v2)            
static PM_CARTESIANtoCart(PM_CYLINDRICAL v)           Convert a cylindrical to a cartesian
static PM_CARTESIANtoCart(PM_SPHERICAL v)           Convert PM_SPHERICAL to PM_CARTESIAN
static PM_CYLINDRICALtoCyl(PM_SPHERICAL s)           Convert a spherical to cylindrical
static PM_HOMOGENEOUStoHom(PM_POSE p)            
static PM_ROTATION_MATRIXtoMat(PM_QUATERNION v)           Convert a quaternion to a rotation matrix.
static PM_ROTATION_MATRIXtoMat(PM_ROTATION_VECTOR v)           Convert rotation vector to rotation matrix
static PM_QUATERNIONtoQuat(PM_EULER_ZYX v)            
static PM_QUATERNIONtoQuat(PM_EULER_ZYZ v)            
static PM_QUATERNIONtoQuat(PM_ROTATION_MATRIX m)            
static PM_QUATERNIONtoQuat(PM_ROTATION_VECTOR v)           Convert a rotation vector to a quaternion
static PM_QUATERNIONtoQuat(PM_RPY v)            
static PM_ROTATION_VECTORtoRot(PM_QUATERNION v)           Convert quaternion to a rotation vector
static PM_RPYtoRpy(PM_QUATERNION v)            
static PM_SPHERICALtoSph(PM_CARTESIAN v)           Convert a PM_CARTESIAN to PM_SPHERICAL
static PM_SPHERICALtoSph(PM_CYLINDRICAL c)           Convert a cylindrical to a spherical
static PM_CARTESIANweightedAvg(PM_CARTESIAN c1, double s1, PM_CARTESIAN c2, double s2)           Adds two PM_CARTESIANS and returns a weightedAvg ie.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pmErrno

public static int pmErrno

PM_PRINT_ERROR

public static boolean PM_PRINT_ERROR

debug_on

public static boolean debug_on

CART_FUZZ

public static final double CART_FUZZ
See Also:
Constant Field Values

DOUBLECP_FUZZ

public static final double DOUBLECP_FUZZ
See Also:
Constant Field Values

DOUBLE_FUZZ

public static final double DOUBLE_FUZZ
See Also:
Constant Field Values

E_EPSILON

public static final double E_EPSILON
See Also:
Constant Field Values

PM_2_PI

public static final double PM_2_PI
See Also:
Constant Field Values

PM_DIV_ERR

public static final int PM_DIV_ERR
See Also:
Constant Field Values

PM_ERR

public static final int PM_ERR
See Also:
Constant Field Values

PM_IMPL_ERR

public static final int PM_IMPL_ERR
See Also:
Constant Field Values

PM_NORM_ERR

public static final int PM_NORM_ERR
See Also:
Constant Field Values

PM_PI

public static final double PM_PI
See Also:
Constant Field Values

PM_PI_2

public static final double PM_PI_2
See Also:
Constant Field Values

PM_PI_4

public static final double PM_PI_4
See Also:
Constant Field Values

QSIN_FUZZ

public static final double QSIN_FUZZ
See Also:
Constant Field Values

QS_FUZZ

public static final double QS_FUZZ
See Also:
Constant Field Values

Q_FUZZ

public static final double Q_FUZZ
See Also:
Constant Field Values

RPY_P_FUZZ

public static final double RPY_P_FUZZ
See Also:
Constant Field Values

RS_FUZZ

public static final double RS_FUZZ
See Also:
Constant Field Values

SINGULAR_EPSILON

public static final double SINGULAR_EPSILON
See Also:
Constant Field Values

SQRT_FUZZ

public static final double SQRT_FUZZ
See Also:
Constant Field Values

UNIT_QUAT_FUZZ

public static final double UNIT_QUAT_FUZZ
See Also:
Constant Field Values

UNIT_SC_FUZZ

public static final double UNIT_SC_FUZZ
See Also:
Constant Field Values

UNIT_VEC_FUZZ

public static final double UNIT_VEC_FUZZ
See Also:
Constant Field Values

V_FUZZ

public static final double V_FUZZ
See Also:
Constant Field Values

ZYX_Y_FUZZ

public static final double ZYX_Y_FUZZ
See Also:
Constant Field Values

ZYZ_Y_FUZZ

public static final double ZYZ_Y_FUZZ
See Also:
Constant Field Values

DBL_MAX

public static final double DBL_MAX
See Also:
Constant Field Values

PI

public static final double PI
See Also:
Constant Field Values

PI_2

public static final double PI_2
See Also:
Constant Field Values

PI_4

public static final double PI_4
See Also:
Constant Field Values

PM_X

public static final int PM_X
See Also:
Constant Field Values

PM_Y

public static final int PM_Y
See Also:
Constant Field Values

PM_Z

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

Posemath

public Posemath()
Method Detail

fitLine

public static PM_LINE fitLine(java.util.List<? extends PmCartesian> l)
Ignores the z value in each element of the list and returns a line fit with least-squares error to x,y points

Parameters:
l - list of PmCartesian points to fit
Returns:
PM_LINE with start,end and unit vector of the line.

weightedAvg

public static PM_CARTESIAN weightedAvg(PM_CARTESIAN c1,
                                       double s1,
                                       PM_CARTESIAN c2,
                                       double s2)
Adds two PM_CARTESIANS and returns a weightedAvg ie. c1*s1+c2*s2;

Parameters:
c1 - first PM_CARTESIAN to add
s1 - weighting scale factor for c1
c2 - second PM_CARTESIAN to add
s2 - weighting scale factor for c2
Returns:
c1*s1+c2*s2

computeLineFitErrors

public static double[] computeLineFitErrors(PM_LINE line,
                                            java.util.List<? extends PmCartesian> l)
Compute an array of errors or the distance between each point in list l to line line.

Parameters:
line - line points should be near
l - list of points near line
Returns:
array of errors

fitCircle2D_XY

public static PM_CIRCLE fitCircle2D_XY(java.util.List<? extends PmCartesian> l)
Ignores the z value in each element of the list and returns a circle fit with least-squares error to x,y points

Parameters:
l - list of PmCartesian points to fit
Returns:
PM_CIRCLE with center and radius of the fitted circle.

IS_FUZZ

public static boolean IS_FUZZ(double a,
                              double fuzz)
                       throws PmException
Throws:
PmException

pmSqrt

public static double pmSqrt(double x)
                     throws PmException
Square root function that adds some extra checks similiar to the C++ pmSqrt() primarily only exists for converting C++ apps. Otherwise use Math.sqrt().

Parameters:
x - number to take square root of
Returns:
square root of x
Throws:
PmException

pmSq

public static double pmSq(double x)
Square of x or x*x.

Parameters:
x - number to square
Returns:
square of x

pmClose

public static boolean pmClose(double a,
                              double b,
                              double eps)
Determine if a within eps of b.

Parameters:
a -
b -
eps -
Returns:
(Math.abs(a - b) < eps)

pmCartCylConvert

public static int pmCartCylConvert(PmCartesian v,
                                   PmCylindrical c)

toSph

public static PM_SPHERICAL toSph(PM_CARTESIAN v)
Convert a PM_CARTESIAN to PM_SPHERICAL

Parameters:
v - cartesian to convert
Returns:
v in spherical coords

pmCartSphConvert

public static int pmCartSphConvert(PmCartesian v,
                                   PmSpherical s)
Convert a PmCartesian to PmSpherical

Parameters:
v - cartesian to convert
s - spherical to store converted results in
Returns:
0

toCart

public static PM_CARTESIAN toCart(PM_SPHERICAL v)
Convert PM_SPHERICAL to PM_CARTESIAN

Parameters:
v - cartesian to convert
Returns:
v in spherical coords

pmSphCartConvert

public static int pmSphCartConvert(PmSpherical s,
                                   PmCartesian v)
Convert PmSherical to PmCartesian

Parameters:
s - spherical to convert
v - cartesian to store converted result
Returns:
0

toCyl

public static PM_CYLINDRICAL toCyl(PM_SPHERICAL s)
Convert a spherical to cylindrical

Parameters:
s - spherical to convert
Returns:
s in cylindrical coordinates.

pmSphCylConvert

public static int pmSphCylConvert(PmSpherical s,
                                  PmCylindrical c)
Convert a spherical to cylindrical

Parameters:
s - spherical to convert
c - cylindrical to store converted value
Returns:
0

toCart

public static PM_CARTESIAN toCart(PM_CYLINDRICAL v)
Convert a cylindrical to a cartesian

Parameters:
v - cylindrical to convert
Returns:
v in cartesian coords

pmCylCartConvert

public static int pmCylCartConvert(PmCylindrical c,
                                   PmCartesian v)
Convert cylindrical to cartesian.

Parameters:
c - cylindrical to convert
v - cartesian to store result
Returns:
0

toSph

public static PM_SPHERICAL toSph(PM_CYLINDRICAL c)
Convert a cylindrical to a spherical

Parameters:
c - cylindrical to convert
Returns:
c in spherical coordinates

pmCylSphConvert

public static int pmCylSphConvert(PmCylindrical c,
                                  PmSpherical s)
Convert a cylindrical to a spherical

Parameters:
c - cylindrical to convert
s - spherical to store result
Returns:
0

pmAxisAngleQuatConvert

public static int pmAxisAngleQuatConvert(int axis,
                                         double a,
                                         PmQuaternion q)
                                  throws PmException
Store a quaternion based on a single rotation about an axis

Parameters:
axis - either PM_X,PM_Y, or PM_Z
a - angle in radians for rotation
q - quaternion to store result
Returns:
0
Throws:
PmException

toQuat

public static PM_QUATERNION toQuat(PM_ROTATION_VECTOR v)
                            throws PmException
Convert a rotation vector to a quaternion

Parameters:
v - rotation vector to convert
Returns:
v as a quaternion
Throws:
PmException

pmRotQuatConvert

public static int pmRotQuatConvert(PmRotationVector r,
                                   PmQuaternion q)
                            throws PmException
Convert a rotation vector to a quaternion

Parameters:
r - rotation vector to convert
q - quaternion to store result
Returns:
0
Throws:
PmException

toMat

public static PM_ROTATION_MATRIX toMat(PM_ROTATION_VECTOR v)
                                throws PmException
Convert rotation vector to rotation matrix

Parameters:
v - rotation vector to convert (must be normalized)
Returns:
v as a rotation matrix
Throws:
PmException

pmRotMatConvert

public static int pmRotMatConvert(PmRotationVector r,
                                  PmRotationMatrix m)
                           throws PmException
Convert a rotation vector to a rotation matrix.

Parameters:
r - rotation vector to convert
m - rotation matrix to store result
Returns:
0
Throws:
PmException

toRot

public static PM_ROTATION_VECTOR toRot(PM_QUATERNION v)
                                throws PmException
Convert quaternion to a rotation vector

Parameters:
v - quaternion to convert (must be normalized)
Returns:
v as a rotation vector
Throws:
PmException

pmQuatRotConvert

public static int pmQuatRotConvert(PmQuaternion q,
                                   PmRotationVector r)
                            throws PmException
Convert a quaternion to a rotation vector

Parameters:
q - quaternion to convert
r - rotation vector to store result
Returns:
0
Throws:
PmException

toMat

public static PM_ROTATION_MATRIX toMat(PM_QUATERNION v)
                                throws PmException
Convert a quaternion to a rotation matrix.

Parameters:
v - quaternion to convert (must be normalized)
Returns:
v as a rotation matrix
Throws:
PmException

pmQuatMatConvert

public static int pmQuatMatConvert(PmQuaternion q,
                                   PmRotationMatrix m)
                            throws PmException
Throws:
PmException

pmQuatZyzConvert

public static int pmQuatZyzConvert(PmQuaternion q,
                                   PmEulerZyz zyz)
                            throws PmException
Throws:
PmException

pmQuatZyxConvert

public static int pmQuatZyxConvert(PmQuaternion q,
                                   PmEulerZyx zyx)
                            throws PmException
Throws:
PmException

toRpy

public static PM_RPY toRpy(PM_QUATERNION v)
                    throws PmException
Throws:
PmException

pmQuatRpyConvert

public static int pmQuatRpyConvert(PmQuaternion q,
                                   PmRpy rpy)
                            throws PmException
Throws:
PmException

pmMatRotConvert

public static int pmMatRotConvert(PmRotationMatrix m,
                                  PmRotationVector r)
                           throws PmException
Throws:
PmException

toQuat

public static PM_QUATERNION toQuat(PM_ROTATION_MATRIX m)
                            throws PmException
Throws:
PmException

pmMatQuatConvert

public static int pmMatQuatConvert(PmRotationMatrix m,
                                   PmQuaternion q)
                            throws PmException
Throws:
PmException

pmMatZyzConvert

public static int pmMatZyzConvert(PmRotationMatrix m,
                                  PmEulerZyz zyz)
                           throws PmException
Throws:
PmException

pmMatZyxConvert

public static int pmMatZyxConvert(PmRotationMatrix m,
                                  PmEulerZyx zyx)
                           throws PmException
Throws:
PmException

pmMatRpyConvert

public static int pmMatRpyConvert(PmRotationMatrix m,
                                  PmRpy rpy)
                           throws PmException
Throws:
PmException

pmZyzRotConvert

public static int pmZyzRotConvert(PmEulerZyz zyz,
                                  PmRotationVector r)
                           throws PmException
Throws:
PmException

toQuat

public static PM_QUATERNION toQuat(PM_EULER_ZYZ v)
                            throws PmException
Throws:
PmException

pmZyzQuatConvert

public static int pmZyzQuatConvert(PmEulerZyz zyz,
                                   PmQuaternion q)
                            throws PmException
Throws:
PmException

pmZyzMatConvert

public static int pmZyzMatConvert(PmEulerZyz zyz,
                                  PmRotationMatrix m)
                           throws PmException
Throws:
PmException

pmZyzRpyConvert

public static int pmZyzRpyConvert(PmEulerZyz zyz,
                                  PmRpy rpy)
                           throws PmException
Throws:
PmException

pmZyxRotConvert

public static int pmZyxRotConvert(PmEulerZyx zyx,
                                  PmRotationVector r)
                           throws PmException
Throws:
PmException

toQuat

public static PM_QUATERNION toQuat(PM_EULER_ZYX v)
                            throws PmException
Throws:
PmException

pmZyxQuatConvert

public static int pmZyxQuatConvert(PmEulerZyx zyx,
                                   PmQuaternion q)
                            throws PmException
Throws:
PmException

pmZyxMatConvert

public static int pmZyxMatConvert(PmEulerZyx zyx,
                                  PmRotationMatrix m)
                           throws PmException
Throws:
PmException

pmZyxZyzConvert

public static int pmZyxZyzConvert(PmEulerZyx zyx,
                                  PmEulerZyz zyz)
                           throws PmException
Throws:
PmException

pmZyxRpyConvert

public static int pmZyxRpyConvert(PmEulerZyx zyx,
                                  PmRpy rpy)
                           throws PmException
Throws:
PmException

pmRpyRotConvert

public static int pmRpyRotConvert(PmRpy rpy,
                                  PmRotationVector r)
                           throws PmException
Throws:
PmException

toQuat

public static PM_QUATERNION toQuat(PM_RPY v)
                            throws PmException
Throws:
PmException

pmRpyQuatConvert

public static int pmRpyQuatConvert(PmRpy rpy,
                                   PmQuaternion q)
                            throws PmException
Throws:
PmException

pmRpyMatConvert

public static int pmRpyMatConvert(PmRpy rpy,
                                  PmRotationMatrix m)
                           throws PmException
Throws:
PmException

pmRpyZyzConvert

public static int pmRpyZyzConvert(PmRpy rpy,
                                  PmEulerZyz zyz)
                           throws PmException
Throws:
PmException

pmRpyZyxConvert

public static int pmRpyZyxConvert(PmRpy rpy,
                                  PmEulerZyx zyx)
                           throws PmException
Throws:
PmException

toHom

public static PM_HOMOGENEOUS toHom(PM_POSE p)
                            throws PmException
Throws:
PmException

pmPoseHomConvert

public static int pmPoseHomConvert(PmPose p,
                                   PmHomogeneous h)
                            throws PmException
Throws:
PmException

pmHomPoseConvert

public static int pmHomPoseConvert(PmHomogeneous h,
                                   PmPose p)
                            throws PmException
Throws:
PmException

pmCartCartCompare

public static boolean pmCartCartCompare(PmCartesian v1,
                                        PmCartesian v2)
                                 throws PmException
Throws:
PmException

dot

public static double dot(PmCartesian v1,
                         PmCartesian v2)

dot

public static double dot(PM_CARTESIAN v1,
                         PM_CARTESIAN v2)

pmCartCartDot

public static double pmCartCartDot(PmCartesian v1,
                                   PmCartesian v2)

cross

public static PM_CARTESIAN cross(PM_CARTESIAN v1,
                                 PM_CARTESIAN v2)
                          throws PmException
Throws:
PmException

pmCartCartCross

public static int pmCartCartCross(PmCartesian v1,
                                  PmCartesian v2,
                                  PmCartesian vout)
                           throws PmException
Throws:
PmException

mag

public static double mag(PM_CARTESIAN v)

mag

public static double mag(PmCartesian v)

pmCartMag

public static double pmCartMag(PmCartesian v)

disp

public static double disp(PM_CARTESIAN v1,
                          PM_CARTESIAN v2)
                   throws PmException
Throws:
PmException

pmCartCartDisp

public static double pmCartCartDisp(PmCartesian v1,
                                    PmCartesian v2)
                             throws PmException
Throws:
PmException

add

public static PM_CARTESIAN add(PM_CARTESIAN v1,
                               PM_CARTESIAN v2)

add

public static PmCartesian add(PmCartesian v1,
                              PmCartesian v2)

pmCartCartAdd

public static int pmCartCartAdd(PmCartesian v1,
                                PmCartesian v2,
                                PmCartesian vout)

subtract

public static PM_CARTESIAN subtract(PM_CARTESIAN v1,
                                    PM_CARTESIAN v2)

subtract

public static PmCartesian subtract(PmCartesian v1,
                                   PmCartesian v2)

pmCartCartSub

public static int pmCartCartSub(PmCartesian v1,
                                PmCartesian v2,
                                PmCartesian vout)

multiply

public static PM_CARTESIAN multiply(double d,
                                    PM_CARTESIAN v)

multiply

public static PM_CARTESIAN multiply(PM_CARTESIAN v,
                                    double d)

multiply

public static PmCartesian multiply(double d,
                                   PmCartesian v)

multiply

public static PmCartesian multiply(PmCartesian v,
                                   double d)

pmCartScalMult

public static int pmCartScalMult(PmCartesian v1,
                                 double d,
                                 PmCartesian vout)

divide

public static PM_CARTESIAN divide(PM_CARTESIAN v,
                                  double d)
                           throws PmException
Throws:
PmException

pmCartScalDiv

public static int pmCartScalDiv(PmCartesian v1,
                                double d,
                                PmCartesian vout)
                         throws PmException
Throws:
PmException

neg

public static PM_CARTESIAN neg(PM_CARTESIAN v)
                        throws PmException
Throws:
PmException

pmCartNeg

public static int pmCartNeg(PmCartesian v1,
                            PmCartesian vout)
                     throws PmException
Throws:
PmException

inv

public static PM_CARTESIAN inv(PM_CARTESIAN v)
                        throws PmException
Throws:
PmException

pmCartInv

public static int pmCartInv(PmCartesian v1,
                            PmCartesian vout)
                     throws PmException
Throws:
PmException

norm

public static PM_CARTESIAN norm(PM_CARTESIAN v)
                         throws PmException
Throws:
PmException

pmCartNorm

public static int pmCartNorm(PmCartesian v,
                             PmCartesian vout)
                      throws PmException
Throws:
PmException

isNorm

public static boolean isNorm(PM_CARTESIAN v)
                      throws PmException
Throws:
PmException

pmCartIsNorm

public static boolean pmCartIsNorm(PmCartesian v)
                            throws PmException
Throws:
PmException

proj

public static PM_CARTESIAN proj(PM_CARTESIAN v1,
                                PM_CARTESIAN v2)
                         throws PmException
Throws:
PmException

pmCartCartProj

public static int pmCartCartProj(PmCartesian v1,
                                 PmCartesian v2,
                                 PmCartesian vout)
                          throws PmException
Throws:
PmException

pmCartPlaneProj

public static int pmCartPlaneProj(PmCartesian v,
                                  PmCartesian normal,
                                  PmCartesian vout)
                           throws PmException
Throws:
PmException

pmCylCylAdd

public static int pmCylCylAdd(PmCylindrical c1,
                              PmCylindrical c2,
                              PmCylindrical cout)
                       throws PmException
Throws:
PmException

pmCylCylSub

public static int pmCylCylSub(PmCylindrical c1,
                              PmCylindrical c2,
                              PmCylindrical cout)
                       throws PmException
Throws:
PmException

multiply

public static PM_CYLINDRICAL multiply(double d,
                                      PM_CYLINDRICAL c)
                               throws PmException
Throws:
PmException

multiply

public static PM_CYLINDRICAL multiply(PM_CYLINDRICAL c,
                                      double d)
                               throws PmException
Throws:
PmException

pmCylScalMult

public static int pmCylScalMult(PmCylindrical v1,
                                double d,
                                PmCylindrical vout)
                         throws PmException
Throws:
PmException

divide

public static PM_CYLINDRICAL divide(PM_CYLINDRICAL c,
                                    double d)
                             throws PmException
Throws:
PmException

pmCylScalDiv

public static int pmCylScalDiv(PmCylindrical v1,
                               double d,
                               PmCylindrical vout)
                        throws PmException
Throws:
PmException

pmCylCylCompare

public static boolean pmCylCylCompare(PmCylindrical v1,
                                      PmCylindrical v2)
                               throws PmException
Throws:
PmException

dot

public static double dot(PM_CYLINDRICAL v1,
                         PM_CYLINDRICAL v2)
                  throws PmException
Throws:
PmException

pmCylCylDot

public static double pmCylCylDot(PmCylindrical c1,
                                 PmCylindrical c2)
                          throws PmException
Throws:
PmException

mag

public static double mag(PM_CYLINDRICAL v1)
                  throws PmException
Throws:
PmException

pmCylMag

public static double pmCylMag(PmCylindrical c)
                       throws PmException
Throws:
PmException

cross

public static PM_CYLINDRICAL cross(PM_CYLINDRICAL v1,
                                   PM_CYLINDRICAL v2)
                            throws PmException
Throws:
PmException

pmCylCylCross

public static int pmCylCylCross(PmCylindrical c1,
                                PmCylindrical c2,
                                PmCylindrical cout)
                         throws PmException
Throws:
PmException

neg

public static PM_CYLINDRICAL neg(PM_CYLINDRICAL v)
                          throws PmException
Throws:
PmException

pmCylNeg

public static int pmCylNeg(PmCylindrical v1,
                           PmCylindrical vout)
                    throws PmException
Throws:
PmException

norm

public static PM_CYLINDRICAL norm(PM_CYLINDRICAL v)
                           throws PmException
Throws:
PmException

pmCylNorm

public static int pmCylNorm(PmCylindrical v,
                            PmCylindrical vout)
                     throws PmException
Throws:
PmException

inv

public static PM_CYLINDRICAL inv(PM_CYLINDRICAL v)
                          throws PmException
Throws:
PmException

pmCylInv

public static int pmCylInv(PmCylindrical c,
                           PmCylindrical cout)
                    throws PmException
Throws:
PmException

isNorm

public static boolean isNorm(PM_CYLINDRICAL v)
                      throws PmException
Throws:
PmException

pmCylIsNorm

public static boolean pmCylIsNorm(PmCylindrical v)
                           throws PmException
Throws:
PmException

pmQuatAxisAngleMult

public static PmQuaternion pmQuatAxisAngleMult(PmQuaternion q,
                                               int axis,
                                               double angle)
                                        throws PmException
Throws:
PmException

pmQuatAxisAngleMult

public static int pmQuatAxisAngleMult(PmQuaternion q,
                                      int axis,
                                      double angle,
                                      PmQuaternion pq)
                               throws PmException
Throws:
PmException

multiply

public static PM_ROTATION_VECTOR multiply(PM_ROTATION_VECTOR r,
                                          double s)
                                   throws PmException
Throws:
PmException

multiply

public static PmRotationVector multiply(double s,
                                        PM_ROTATION_VECTOR r)
                                 throws PmException
Throws:
PmException

pmRotScalMult

public static int pmRotScalMult(PmRotationVector r,
                                double s,
                                PmRotationVector rout)
                         throws PmException
Throws:
PmException

divide

public static PM_ROTATION_VECTOR divide(PM_ROTATION_VECTOR r,
                                        double s)
                                 throws PmException
Throws:
PmException

pmRotScalDiv

public static int pmRotScalDiv(PmRotationVector r,
                               double s,
                               PmRotationVector rout)
                        throws PmException
Throws:
PmException

isNorm

public static boolean isNorm(PM_ROTATION_VECTOR r)
                      throws PmException
Throws:
PmException

pmRotIsNorm

public static boolean pmRotIsNorm(PmRotationVector r)
                           throws PmException
Throws:
PmException

norm

public static PM_ROTATION_VECTOR norm(PM_ROTATION_VECTOR r)
                               throws PmException
Throws:
PmException

pmRotNorm

public static int pmRotNorm(PmRotationVector r,
                            PmRotationVector rout)
                     throws PmException
Throws:
PmException

pmMatNorm

public static int pmMatNorm(PmRotationMatrix m,
                            PmRotationMatrix mout)
                     throws PmException
Throws:
PmException

isNorm

public static boolean isNorm(PM_ROTATION_MATRIX m)
                      throws PmException
Throws:
PmException

pmMatIsNorm

public static boolean pmMatIsNorm(PmRotationMatrix m)
                           throws PmException
Throws:
PmException

pmMatInv

public static int pmMatInv(PmRotationMatrix m,
                           PmRotationMatrix mout)
                    throws PmException
Throws:
PmException

multiply

public static PM_CARTESIAN multiply(PM_ROTATION_MATRIX m,
                                    PM_CARTESIAN v)
                             throws PmException
Throws:
PmException

pmMatCartMult

public static int pmMatCartMult(PmRotationMatrix m,
                                PmCartesian v,
                                PmCartesian vout)
                         throws PmException
Throws:
PmException

multiply

public static PM_ROTATION_MATRIX multiply(PM_ROTATION_MATRIX m1,
                                          PM_ROTATION_MATRIX m2)
                                   throws PmException
Throws:
PmException

pmMatMatMult

public static int pmMatMatMult(PmRotationMatrix m1,
                               PmRotationMatrix m2,
                               PmRotationMatrix mout)
                        throws PmException
Throws:
PmException

pmQuatQuatCompare

public static boolean pmQuatQuatCompare(PmQuaternion q1,
                                        PmQuaternion q2)
                                 throws PmException
Throws:
PmException

mag

public static double mag(PM_QUATERNION q)
                  throws PmException
Throws:
PmException

pmQuatMag

public static double pmQuatMag(PmQuaternion q)
                        throws PmException
Throws:
PmException

norm

public static PM_QUATERNION norm(PM_QUATERNION q1)
                          throws PmException
Throws:
PmException

pmQuatNorm

public static int pmQuatNorm(PmQuaternion q1,
                             PmQuaternion qout)
                      throws PmException
Throws:
PmException

inv

public static PM_QUATERNION inv(PM_QUATERNION q1)
                         throws PmException
Throws:
PmException

pmQuatInv

public static int pmQuatInv(PmQuaternion q1,
                            PmQuaternion qout)
                     throws PmException
Throws:
PmException

isNorm

public static boolean isNorm(PM_QUATERNION q1)
                      throws PmException
Throws:
PmException

pmQuatIsNorm

public static boolean pmQuatIsNorm(PmQuaternion q1)
                            throws PmException
Throws:
PmException

multiply

public static PM_QUATERNION multiply(PM_QUATERNION q,
                                     double s)
                              throws PmException
Throws:
PmException

multiply

public static PM_QUATERNION multiply(double s,
                                     PM_QUATERNION q)
                              throws PmException
Throws:
PmException

pmQuatScalMult

public static int pmQuatScalMult(PmQuaternion q,
                                 double s,
                                 PmQuaternion qout)
                          throws PmException
Throws:
PmException

divide

public static PM_QUATERNION divide(PM_QUATERNION q,
                                   double s)
                            throws PmException
Throws:
PmException

pmQuatScalDiv

public static int pmQuatScalDiv(PmQuaternion q,
                                double s,
                                PmQuaternion qout)
                         throws PmException
Throws:
PmException

multiply

public static PM_QUATERNION multiply(PM_QUATERNION q1,
                                     PM_QUATERNION q2)
                              throws PmException
Throws:
PmException

pmQuatQuatMult

public static int pmQuatQuatMult(PmQuaternion q1,
                                 PmQuaternion q2,
                                 PmQuaternion qout)
                          throws PmException
Throws:
PmException

multiply

public static PM_CARTESIAN multiply(PM_QUATERNION q1,
                                    PM_CARTESIAN v2)
                             throws PmException
Throws:
PmException

pmQuatCartMult

public static int pmQuatCartMult(PmQuaternion q1,
                                 PmCartesian v2,
                                 PmCartesian vout)
                          throws PmException
Throws:
PmException

pmPosePoseCompare

public static boolean pmPosePoseCompare(PmPose p1,
                                        PmPose p2)
                                 throws PmException
Throws:
PmException

inv

public static PM_POSE inv(PM_POSE p)
                   throws PmException
Throws:
PmException

inv

public static PM_XYA inv(PM_XYA p)
                  throws PmException
Throws:
PmException

multiply

public static PM_XYA multiply(PM_XYA p1,
                              PM_XYA p2)

pmPoseInv

public static int pmPoseInv(PmPose p1,
                            PmPose p2)
                     throws PmException
Throws:
PmException

multiply

public static PM_CARTESIAN multiply(PM_POSE p1,
                                    PM_CARTESIAN v2)
                             throws PmException
Throws:
PmException

pmPoseCartMult

public static int pmPoseCartMult(PmPose p1,
                                 PmCartesian v2,
                                 PmCartesian vout)
                          throws PmException
Throws:
PmException

multiply

public static PM_POSE multiply(PM_POSE p1,
                               PM_POSE p2)
                        throws PmException
Throws:
PmException

pmPosePoseMult

public static int pmPosePoseMult(PmPose p1,
                                 PmPose p2,
                                 PmPose pout)
                          throws PmException
Throws:
PmException

inv

public static PM_HOMOGENEOUS inv(PM_HOMOGENEOUS h)
                          throws PmException
Throws:
PmException

pmHomInv

public static int pmHomInv(PmHomogeneous h1,
                           PmHomogeneous h2)
                    throws PmException
Throws:
PmException

pmLineInit

public static int pmLineInit(PmLine line,
                             PmPose start,
                             PmPose end)
                      throws PmException
Throws:
PmException

pmLinePoint

public static int pmLinePoint(PmLine line,
                              double len,
                              PmPose point)
                       throws PmException
Throws:
PmException

pmCircleInit

public static int pmCircleInit(PmCircle circle,
                               PmPose start,
                               PmPose end,
                               PmCartesian center,
                               PmCartesian normal,
                               int turn)
                        throws PmException
Throws:
PmException

pmCirclePoint

public static int pmCirclePoint(PmCircle circle,
                                double angle,
                                PmPose point)
                         throws PmException
Throws:
PmException

point_on_line

public static PmCartesian point_on_line(PM_LINE line,
                                        PmCartesian p)

point_on_line

public static PM_CARTESIAN point_on_line(PM_LINE line,
                                         PM_CARTESIAN p)

point_on_line

public static PM_CARTESIAN point_on_line(PM_CARTESIAN s,
                                         PM_CARTESIAN u,
                                         PM_CARTESIAN p)

point_on_line_segment

public static PM_CARTESIAN point_on_line_segment(PM_CARTESIAN s,
                                                 PM_CARTESIAN e,
                                                 PM_CARTESIAN p)

main

public static void main(java.lang.String[] args)

intersection

public static PM_CARTESIAN intersection(PM_LINE l1,
                                        PM_LINE l2)
                                 throws PmException
Throws:
PmException


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值