public Matrix4 cartesianToLocalTransform(double x, double y, double z, Matrix4 result) { if (result == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "cartesianToLocalTransform", "missingResult")); } return this.projection.cartesianToLocalTransform(this, x, y, z, result); }
public Vec3 geographicToCartesianNormal(double latitude, double longitude, Vec3 result) { if (result == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "geographicToCartesianNormal", "missingResult")); } return this.projection.geographicToCartesianNormal(this, latitude, longitude, result); }
public Matrix4 geographicToCartesianTransform(double latitude, double longitude, double altitude, Matrix4 result) { if (result == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "geographicToCartesianTransform", "missingResult")); } return this.projection.geographicToCartesianTransform(this, latitude, longitude, altitude, result); }
/** * Converts a geographic position to Cartesian coordinates. This globe's projection specifies the Cartesian * coordinate system. * * @param latitude the position's latitude in degrees * @param longitude the position's longitude in degrees * @param altitude the position's altitude in meters * @param result a pre-allocated {@link Vec3} in which to store the computed X, Y and Z Cartesian coordinates * * @return the result argument, set to the computed Cartesian coordinates * * @throws IllegalArgumentException if the result is null */ public Vec3 geographicToCartesian(double latitude, double longitude, double altitude, Vec3 result) { if (result == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "geographicToCartesian", "missingResult")); } return this.projection.geographicToCartesian(this, latitude, longitude, altitude, result); }
/** * Converts a Cartesian point to a geographic position. This globe's projection specifies the Cartesian coordinate * system. * * @param x the Cartesian point's X component * @param y the Cartesian point's Y component * @param z the Cartesian point's Z component * @param result a pre-allocated {@link Position} in which to store the computed geographic position * * @return the result argument, set to the computed geographic position * * @throws IllegalArgumentException if the result is null */ public Position cartesianToGeographic(double x, double y, double z, Position result) { if (result == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "cartesianToGeographic", "missingResult")); } return this.projection.cartesianToGeographic(this, x, y, z, result); }
public float[] geographicToCartesianBorder(Sector sector, int numLat, int numLon, float height, Vec3 origin, float[] result) { if (sector == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "geographicToCartesianBorder", "missingSector")); } if (numLat < 1 || numLon < 1) { throw new IllegalArgumentException(Logger.logMessage(Logger.ERROR, "Globe", "geographicToCartesianBorder", "Number of latitude or longitude locations is less than one")); } if (result == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "geographicToCartesianBorder", "missingResult")); } return this.projection.geographicToCartesianBorder(this, sector, numLat, numLon, height, origin, result); }
/** * Computes the first intersection of this globe with a specified line. The line is interpreted as a ray; * intersection points behind the line's origin are ignored. * * @param line the line to intersect with this globe * @param result a pre-allocated {@link Vec3} in which to return the computed point * * @return true if the ray intersects the globe, otherwise false * * @throws IllegalArgumentException If either argument is null */ public boolean intersect(Line line, Vec3 result) { if (line == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "intersect", "missingLine")); } if (result == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "intersect", "missingResult")); } return this.projection.intersect(this, line, result); } }
public float[] geographicToCartesianGrid(Sector sector, int numLat, int numLon, float[] height, float verticalExaggeration, Vec3 origin, float[] result, int offset, int rowStride) { if (sector == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "geographicToCartesianGrid", "missingSector")); } if (numLat < 1 || numLon < 1) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "geographicToCartesianGrid", "Number of latitude or longitude locations is less than one")); } int numPoints = numLat * numLon; if (height != null && height.length < numPoints) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "geographicToCartesianGrid", "missingArray")); } if (result == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "geographicToCartesianGrid", "missingResult")); } return this.projection.geographicToCartesianGrid(this, sector, numLat, numLon, height, verticalExaggeration, origin, result, offset, rowStride); }