public static Affine convertRigidBodyTransformToAffine(RigidBodyTransform rigidBodyTransform) { Affine ret = new Affine(); convertRigidBodyTransformToAffine(rigidBodyTransform, ret); return ret; }
public void renderLidarScanMessage(LidarScanMessage lidarScanMessage) { if (!enabled.get() || lidarScanMessage == null || newMessageToRender.get() != null) return; newMessageToRender.set(lidarScanMessage); Quat4f orientation = lidarScanMessage.getLidarOrientation(); Point3f position = lidarScanMessage.getLidarPosition(); lastAffine.set(JavaFXTools.createAffineFromQuaternionAndTuple(orientation, position)); executor.execute(this::computeScanMesh); }
/** * Update the camera translation after applying a translation offset in the world frame. * @param dx the translation offset along the world x-axis. * @param dy the translation offset along the world y-axis. * @param dz the translation offset along the world z-axis. */ public void updateWorldTranslation(double dx, double dy, double dz) { Vector3D shift = new Vector3D(dx, dy, dz); JavaFXTools.addEquals(translation, shift); }
JavaFXTools.applyTranform(cameraOrientation.get(), shift); JavaFXTools.addEquals(translation, shift);
public static void convertAxisAngleToAffine(AxisAngle axisAngle, Affine affineToPack) { RotationMatrix intermediateMatrix = new RotationMatrix(); intermediateMatrix.set(axisAngle); convertRotationMatrixToAffine(intermediateMatrix, affineToPack); }
public static Affine createAffineFromAxisAngle(AxisAngle4d axisAngle) { Affine affine = new Affine(); convertAxisAngleToAffine(axisAngle, affine); return affine; }
JavaFXTools.applyTranform(camera.getLocalToSceneTransform(), cameraPosition);
public void update() { ObservableList<Transform> transforms = this.getTransforms(); transforms.clear(); Affine javaFxAffineTransform = new Affine(); AffineTransform euclidAffineTransform = graphicsNode.getTransform(); JavaFXTools.convertEuclidAffineToJavaFXAffine(euclidAffineTransform, javaFxAffineTransform); transforms.add(javaFxAffineTransform); for (int i = 0; i < updatables.size(); i++) { updatables.get(i).update(); } }
JavaFXTools.applyTranform(cameraOrientation.get(), shift); JavaFXTools.addEquals(translation, shift);
public static void convertAxisAngleToAffine(AxisAngle4d axisAngle, Affine affineToPack) { Matrix3d intermediateMatrix = new Matrix3d(); intermediateMatrix.set(axisAngle); convertRotationMatrixToAffine(intermediateMatrix, affineToPack); }
public static Affine createAffineFromAxisAngle(AxisAngle axisAngle) { Affine affine = new Affine(); convertAxisAngleToAffine(axisAngle, affine); return affine; }
JavaFXTools.applyTranform(camera.getLocalToSceneTransform(), cameraPosition);
JavaFXTools.convertEuclidAffineToJavaFXAffine(affineTransform, javaFxAffineToPack); MeshDataHolder meshDataHolder = meshDataHolders[i]; MeshView meshView = new MeshView();
public static Affine convertRigidBodyTransformToAffine(RigidBodyTransform rigidBodyTransform) { Affine ret = new Affine(); convertRigidBodyTransformToAffine(rigidBodyTransform, ret); return ret; }
public void renderLidarScanMessage(LidarScanMessage lidarScanMessage) { if (!enabled.get() || lidarScanMessage == null || newMessageToRender.get() != null) return; newMessageToRender.set(lidarScanMessage); Quaternion orientation = lidarScanMessage.getLidarOrientation(); Point3D position = lidarScanMessage.getLidarPosition(); lastAffine.set(JavaFXTools.createAffineFromQuaternionAndTuple(orientation, position)); executor.execute(this::computeScanMesh); }
private void computeOffset() { Vector3D cameraZAxis = new Vector3D(forward); Vector3D cameraYAxis = new Vector3D(down); Vector3D cameraXAxis = new Vector3D(); cameraXAxis.cross(cameraYAxis, cameraZAxis); RotationMatrix rotationOffset = new RotationMatrix(); rotationOffset.setColumns(cameraXAxis, cameraYAxis, cameraZAxis); JavaFXTools.convertRotationMatrixToAffine(rotationOffset, offset); }
/** * Update the camera translation after applying a translation offset in the world frame. * @param dx the translation offset along the world x-axis. * @param dy the translation offset along the world y-axis. * @param dz the translation offset along the world z-axis. */ public void updateWorldTranslation(double dx, double dy, double dz) { Vector3d shift = new Vector3d(dx, dy, dz); JavaFXTools.addEquals(translation, shift); }
public static void transformNode(Node nodeToTransform, RigidBodyTransform transform) { nodeToTransform.getTransforms().add(JavaFXTools.convertRigidBodyTransformToAffine(transform)); }
private void handleMessage(LidarScanMessage lidarScanMessage) { if (lidarScanMessage == null) return; Quaternion orientation = lidarScanMessage.getLidarOrientation(); Point3D position = lidarScanMessage.getLidarPosition(); lastAffine.set(JavaFXTools.createAffineFromQuaternionAndTuple(orientation, position)); }
private void computeOffset() { Vector3d cameraZAxis = new Vector3d(forward); Vector3d cameraYAxis = new Vector3d(down); Vector3d cameraXAxis = new Vector3d(); cameraXAxis.cross(cameraYAxis, cameraZAxis); Matrix3d rotationOffset = new Matrix3d(); rotationOffset.setColumn(0, cameraXAxis); rotationOffset.setColumn(1, cameraYAxis); rotationOffset.setColumn(2, cameraZAxis); JavaFXTools.convertRotationMatrixToAffine(rotationOffset, offset); }