@Override protected void setZ(Point3D data, double z) { data.setZ(z); }
public void setMaxZ(double zMax) { maxCoordinate.setZ(zMax); maxCoordinateDirtyBit = false; maxKeyDirtyBit = true; }
public void setMinZ(double zMin) { minCoordinate.setZ(zMin); minCoordinateDirtyBit = false; minKeyDirtyBit = true; }
/** * Sets the z-coordinate of this point. * * @param z the z-coordinate. */ @Override public void setZ(double z) { point.setZ(z); }
public void setTrackingZ(double cameraTrackingZ) { this.trackingPosition.setZ(cameraTrackingZ); }
public void setPointZ(double z) { this.point.setZ(z); }
public void setDollyZ(double cameraDollyZ) { this.dollyPosition.setZ(cameraDollyZ); }
private Point3D computeInitialPosition(Point3D intersectionPosition, double height) { Point3D ret = new Point3D(intersectionPosition); ret.setZ(height); return ret; }
private static void formStaircaseWithPointsOnAPlane(ArrayList<Point3D> pointsList, double stairSeparation, double oneStairLandingHeight) { for (Point3D point3d : pointsList) { double z = point3d.getZ(); double newZ = Math.floor((z - oneStairLandingHeight) / stairSeparation) * stairSeparation; point3d.setZ(newZ); } }
private static void formStaircaseWithPointsOnAPlane(ArrayList<Point3D> pointsList, double stairSeparation, double oneStairLandingHeight) { for (Point3D point3d : pointsList) { double z = point3d.getZ(); double newZ = Math.floor((z - oneStairLandingHeight) / stairSeparation) * stairSeparation; point3d.setZ(newZ); } }
public void setHeight(double z) { this.footstepData.getLocation().setZ(z);}
/** * add a trajectory point to this message */ public void addTrajectoryPoint(double time, double zHeight, double velocity) { tempPoint.setToZero(); tempPoint.setZ(zHeight); tempVector.setToZero(); tempVector.setZ(velocity); euclideanTrajectory.addTrajectoryPoint(time, tempPoint, tempVector); }
@Override public void adjustFootstepWithoutHeightmap(FootstepDataMessage footstep, double height, Vector3D planeNormal) { Point3D position = footstep.getLocation(); Quaternion orientation = footstep.getOrientation(); RigidBodyTransform solePose = new RigidBodyTransform(); double yaw = orientation.getYaw(); RotationTools.computeQuaternionFromYawAndZNormal(yaw, planeNormal, orientation); position.setZ(height); }
@Override public boolean isPossibleGround(Point3D point, Point3D lidarOrigin) { Point3D footAvg = getMidFootPoint(); double footZ = footAvg.getZ(); footAvg.setZ(point.getZ()); double maxHeight = parameters.quadTreeZAboveFeet + point.distance(footAvg) * parameters.quadTreeZSlope; if (maxHeight > parameters.quadTreeZMax) { maxHeight = parameters.quadTreeZMax; } return (point.getZ() - footZ) < maxHeight; }
/** * Computes the distance of the point to the region projected onto the world xy-plane. * * @param x x-coordinate of the query. * @param y y-coordinate of the query. * @return distance to this region. If 0.0, point is in the region. */ public double distanceToPointByProjectionOntoXYPlane(double x, double y) { localPoint.setX(x); localPoint.setY(y); localPoint.setZ(getPlaneZGivenXY(x, y)); fromWorldToLocalTransform.transform(localPoint); localPoint2D.set(localPoint); return distanceToPoint(localPoint2D); }
@Override public void handle(MouseEvent event) { PickResult pickResult = event.getPickResult(); Node intersectedNode = pickResult.getIntersectedNode(); if (intersectedNode == null || intersectedNode instanceof SubScene) return; javafx.geometry.Point3D localPoint = pickResult.getIntersectedPoint(); javafx.geometry.Point3D scenePoint = intersectedNode.getLocalToSceneTransform().transform(localPoint); Point3D interception = new Point3D(); interception.setX(scenePoint.getX()); interception.setY(scenePoint.getY()); interception.setZ(scenePoint.getZ()); latestInterception.set(interception); } };
@Override public void handle(MouseEvent event) { PickResult pickResult = event.getPickResult(); Node intersectedNode = pickResult.getIntersectedNode(); if (intersectedNode == null || intersectedNode instanceof SubScene) return; javafx.geometry.Point3D localPoint = pickResult.getIntersectedPoint(); javafx.geometry.Point3D scenePoint = intersectedNode.getLocalToSceneTransform().transform(localPoint); Point3D interception = new Point3D(); interception.setX(scenePoint.getX()); interception.setY(scenePoint.getY()); interception.setZ(scenePoint.getZ()); latestInterception.set(interception); } };
/** * Computes if the point is in the region projected onto the world xy-plane. * * @param x x-coordinate of the query. * @param y y-coordinate of the query. * @return true if the point is inside this region, false otherwise. */ public boolean isPointInsideByProjectionOntoXYPlane(double x, double y) { Point3D localPoint = new Point3D(); localPoint.setX(x); localPoint.setY(y); localPoint.setZ(getPlaneZGivenXY(x, y)); fromWorldToLocalTransform.transform(localPoint); return isPointInside(localPoint.getX(), localPoint.getY()); }
private static void packExtrapolatedPoint(Vector3DReadOnly from, Vector3DReadOnly to, double ratio, Point3D toPack) { toPack.setX(ratio * (to.getX() - from.getX()) + from.getX()); toPack.setY(ratio * (to.getY() - from.getY()) + from.getY()); toPack.setZ(ratio * (to.getZ() - from.getZ()) + from.getZ()); }
@Override public void adjustFootstepWithoutHeightmap(Footstep footstep, double height, Vector3D planeNormal) { // can only snap footsteps in world frame footstep.getFootstepPose().checkReferenceFrameMatch(ReferenceFrame.getWorldFrame()); FramePose3D footstepPose = new FramePose3D(); footstep.getPose(footstepPose); Point3D position = new Point3D(footstepPose.getPosition()); double yaw = footstep.getFootstepPose().getYaw(); Quaternion orientation = new Quaternion(); RotationTools.computeQuaternionFromYawAndZNormal(yaw, planeNormal, orientation); position.setZ(height); footstepPose.set(new Point3D(position), orientation); footstep.setPose(footstepPose); }