001// Copyright (c) FIRST and other WPILib contributors. 002// Open Source Software; you can modify and/or share it under the terms of 003// the WPILib BSD license file in the root directory of this project. 004 005package edu.wpi.first.math.jni; 006 007/** Pose3d JNI. */ 008public final class Pose3dJNI extends WPIMathJNI { 009 /** 010 * Obtain a Pose3d from a (constant curvature) velocity. 011 * 012 * <p>The double array returned is of the form [dx, dy, dz, qx, qy, qz]. 013 * 014 * @param poseX The pose's translational X component. 015 * @param poseY The pose's translational Y component. 016 * @param poseZ The pose's translational Z component. 017 * @param poseQw The pose quaternion's W component. 018 * @param poseQx The pose quaternion's X component. 019 * @param poseQy The pose quaternion's Y component. 020 * @param poseQz The pose quaternion's Z component. 021 * @param twistDx The twist's dx value. 022 * @param twistDy The twist's dy value. 023 * @param twistDz The twist's dz value. 024 * @param twistRx The twist's rx value. 025 * @param twistRy The twist's ry value. 026 * @param twistRz The twist's rz value. 027 * @return The new pose as a double array. 028 */ 029 public static native double[] exp( 030 double poseX, 031 double poseY, 032 double poseZ, 033 double poseQw, 034 double poseQx, 035 double poseQy, 036 double poseQz, 037 double twistDx, 038 double twistDy, 039 double twistDz, 040 double twistRx, 041 double twistRy, 042 double twistRz); 043 044 /** 045 * Returns a Twist3d that maps the starting pose to the end pose. 046 * 047 * <p>The double array returned is of the form [dx, dy, dz, rx, ry, rz]. 048 * 049 * @param startX The starting pose's translational X component. 050 * @param startY The starting pose's translational Y component. 051 * @param startZ The starting pose's translational Z component. 052 * @param startQw The starting pose quaternion's W component. 053 * @param startQx The starting pose quaternion's X component. 054 * @param startQy The starting pose quaternion's Y component. 055 * @param startQz The starting pose quaternion's Z component. 056 * @param endX The ending pose's translational X component. 057 * @param endY The ending pose's translational Y component. 058 * @param endZ The ending pose's translational Z component. 059 * @param endQw The ending pose quaternion's W component. 060 * @param endQx The ending pose quaternion's X component. 061 * @param endQy The ending pose quaternion's Y component. 062 * @param endQz The ending pose quaternion's Z component. 063 * @return The twist that maps start to end as a double array. 064 */ 065 public static native double[] log( 066 double startX, 067 double startY, 068 double startZ, 069 double startQw, 070 double startQx, 071 double startQy, 072 double startQz, 073 double endX, 074 double endY, 075 double endZ, 076 double endQw, 077 double endQx, 078 double endQy, 079 double endQz); 080 081 /** Utility class. */ 082 private Pose3dJNI() {} 083}