public void closestIntersectionAndNormalAt(
      double x, double y, double z, Point3d intersection, Vector3d normal) {
    intersection.setX(x); // Go Straight Up for now...
    intersection.setY(y);
    intersection.setZ(heightAt(x, y, z));

    surfaceNormalAt(x, y, z, normal);
  }
  public boolean checkIfInside(
      double x, double y, double z, Point3d intersectionToPack, Vector3d normalToPack) {
    intersectionToPack.setX(x); // Go Straight Up for now...
    intersectionToPack.setY(y);
    intersectionToPack.setZ(heightAt(x, y, z));

    surfaceNormalAt(x, y, z, normalToPack);

    return (z < intersectionToPack.getZ());
  }
 public void getDollyPosition(Point3d dollyPositionToPack) {
   if (dolly_x_var != null) {
     dollyPositionToPack.setX(dolly_x_var.getDoubleValue());
   }
   if (dolly_y_var != null) {
     dollyPositionToPack.setY(dolly_y_var.getDoubleValue());
   }
   if (dolly_z_var != null) {
     dollyPositionToPack.setZ(dolly_z_var.getDoubleValue());
   }
 }
 public void getTrackingPosition(Point3d trackPositionToPack) {
   if (track_x_var != null) {
     trackPositionToPack.setX(track_x_var.getDoubleValue());
   }
   if (track_y_var != null) {
     trackPositionToPack.setY(track_y_var.getDoubleValue());
   }
   if (track_z_var != null) {
     trackPositionToPack.setZ(track_z_var.getDoubleValue());
   }
 }
示例#5
0
  public void updateStateFromString(String upperLine) {
    lineNumber++;
    // add all variables
    // addVarsFromLine(upperLine);
    // strip comments to avoid confusion when a comment exists at the end of
    // a non-comment line
    stripComments(upperLine);
    // get machine states
    recordState(upperLine);

    double xValue = getDoubleFromChar(upperLine, 'X');
    double yValue = getDoubleFromChar(upperLine, 'Y');
    double zValue = getDoubleFromChar(upperLine, 'Z');
    if (!Double.isNaN(xValue)) currentCoords.setX(xValue);
    if (!Double.isNaN(yValue)) currentCoords.setY(yValue);
    if (!Double.isNaN(zValue)) currentCoords.setZ(zValue);
  }
 public void closestIntersectionTo(double x, double y, double z, Point3d intersection) {
   intersection.setX(x);
   intersection.setY(y);
   intersection.setZ(heightAt(x, y, z));
 }