Converts a cartesian earth-centered earth-fixed coordinate into an WGS84 LLA position
@param x coordinate in meters
@param y coordinate in meters
@param z coordinate in meters
@return a position object representing the WGS84 position
544657
public static Position fromECEF (double x, double y, double z) {

		double p = sqrt(x*x + y*y);
		double th = atan2(a * z, b * p);
		double lon = atan2(y, x);
		double lat = atan2(
				(z + (a*a - b*b) / (b*b) * b * pow(sin(th), 3)),
				p - e2 * a * pow(cos(th), 3));
		double N = a / sqrt(1 - pow(sqrt(e2) * sin(lat), 2));
		double alt = p / cos(lat) - N;

		// correct for numerical instability in altitude near exact poles:
		// after this correction, error is about 2 millimeters, which is about
		// the same as the numerical precision of the overall function
		if (abs(x) < 1 & abs(y) < 1)
			alt = abs(z) - b;

		return new Position(toDegrees(lon), toDegrees(lat), tools.meters2Feet(alt));
	}
592911
public void moveTo(double x, double y, double z) {
		if (this.numTypesProperty.get()>0 && this.types[this.numTypesProperty.get()-1]==PathElementType.MOVE_TO) {
			this.coordsProperty[this.numCoordsProperty.get()-3].set(x);
			this.coordsProperty[this.numCoordsProperty.get()-2].set(y);
			this.coordsProperty[this.numCoordsProperty.get()-1].set(z);
		}
		else {
			ensureSlots(false, 3);
			this.types[this.numTypesProperty.get()] = PathElementType.MOVE_TO;
			this.numTypesProperty.set(this.numTypesProperty.get()+1);

			this.coordsProperty[this.numCoordsProperty.get()].set(x);
			this.numCoordsProperty.set(this.numCoordsProperty.get()+1);

			this.coordsProperty[this.numCoordsProperty.get()].set(y);
			this.numCoordsProperty.set(this.numCoordsProperty.get()+1);

			this.coordsProperty[this.numCoordsProperty.get()].set(z);
			this.numCoordsProperty.set(this.numCoordsProperty.get()+1);
		}
		this.graphicalBounds = null;
		this.logicalBounds = null;
	}
173359
public void lineTo(double x, double y, double z) {
		ensureSlots(true, 3);
		this.types[this.numTypesProperty.get()] = PathElementType.LINE_TO;
		this.numTypesProperty.set(this.numTypesProperty.get()+1);

		this.coordsProperty[this.numCoordsProperty.get()].set(x);
		this.numCoordsProperty.set(this.numCoordsProperty.get()+1);

		this.coordsProperty[this.numCoordsProperty.get()].set(y);
		this.numCoordsProperty.set(this.numCoordsProperty.get()+1);

		this.coordsProperty[this.numCoordsProperty.get()].set(z);
		this.numCoordsProperty.set(this.numCoordsProperty.get()+1);

		this.isEmptyProperty = null;
		this.graphicalBounds = null;
		this.logicalBounds = null;
	}
254435
public void setPosition (float x, float y, float z)
    {
        if (_source != null) {
            _source.setPosition(x, y, z);
        }
        _px = x;
        _py = y;
        _pz = z;
    }
1103894
public void lineTo(double x, double y, double z) {
		ensureSlots(true, 3);
		this.types[this.numTypes++] = PathElementType.LINE_TO;
		this.coords[this.numCoords++] = x;
		this.coords[this.numCoords++] = y;
		this.coords[this.numCoords++] = z;
		this.isEmpty = null;
		this.graphicalBounds = null;
		this.logicalBounds = null;
	}
1073828
public Matrix3 setToReflection (float x, float y, float z) {
        float x2 = -2f*x, y2 = -2f*y, z2 = -2f*z;
        float xy2 = x2*y, xz2 = x2*z, yz2 = y2*z;
        return set(1f + x2*x, xy2, xz2,
                   xy2, 1f + y2*y, yz2,
                   xz2, yz2, 1f + z2*z);
    }
142033
public Quaternion set (double x, double y, double z, double w) {
        this.x = x;
        this.y = y;
        this.z = z;
        this.w = w;
        return this;
    }
167644
public Map geoCoord(String name, String x, String y) {
        this.geoCoord().put(name, x, y);
        return this;
    }
360376
@Pure
	public static GeodesicPosition L3_WSG84(double x, double y) {
		final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
				LAMBERT_3_N,
				LAMBERT_3_C,
				LAMBERT_3_XS,
				LAMBERT_3_YS);
		return NTFLambdaPhi_WSG84(ntfLambdaPhi.getX(), ntfLambdaPhi.getY());
	}
1102824
public Matrix4 setTranslation (double x, double y, double z) {
        m30 = x;
        m31 = y;
        m32 = z;
        return this;
    }
921662
public double intersectZ(double z)
	{
		if (direction.z == 0)
			return Double.NaN;
		return (z - origin.z) / direction.z;
	}
498268
public Translation to(float x, float y, float z)
	{
		toX = x;
		toY = y;
		toZ = z;
		return this;
	}
297942
public static double lengthSquared(double x, double y, double z) {
        return x * x + y * y + z * z;
    }
206884
public Coordinate viewToWorld(Coordinate coordinate) {
		if (coordinate != null) {
			Vector2D position = new Vector2D(coordinate);
			double inverseScale = 1 / mapView.getCurrentScale();
			position.scale(inverseScale, -inverseScale);

			Bbox bounds = mapView.getBounds();
			// -cam: center X axis around cam. +bbox.w/2: to place the origin in the center of the screen
			double translateX = -mapView.getViewState().getX() + (bounds.getWidth() / 2);
			double translateY = -mapView.getViewState().getY() - (bounds.getHeight() / 2); // Inverted Y-axis here...
			position.translate(-translateX, -translateY);
			// TODO: implement rotation support.
			return new Coordinate(position.getX(), position.getY());
		}
		return null;
	}
130022
@Override
	public void setCenter(double x, double y, double z) {
		this.cx = x;
		this.cy = y;
		this.cz = z;
	}
572863
def from_xyz(cls, x, y, z):
        
        bb = xy_bounds(x, y, z)
        return cls.from_bounds(xmin=bb.left, ymin=bb.bottom,
                               xmax=bb.right, ymax=bb.top,
                               crs=WEB_MERCATOR_CRS)
1365794
public void setPosition(float x, float y, float z) {
        if (isActive()) {
            mIODevice.setPosition(x, y, z);
        }
    }