Example usage for org.apache.commons.math3.geometry.spherical.twod Circle toSubSpace

List of usage examples for org.apache.commons.math3.geometry.spherical.twod Circle toSubSpace

Introduction

In this page you can find the example usage for org.apache.commons.math3.geometry.spherical.twod Circle toSubSpace.

Prototype

public S1Point toSubSpace(final Point<Sphere2D> point) 

Source Link

Usage

From source file:org.orekit.models.earth.tessellation.EllipsoidTessellator.java

/** Check if an arc meets the inside of a zone.
 * @param s1 first point/*w w w . j av  a  2s . c  om*/
 * @param s2 second point
 * @param zone zone to check arc against
 * @return true if the arc meets the inside of the zone
 */
private boolean meetInside(final S2Point s1, final S2Point s2, final SphericalPolygonsSet zone) {
    final Circle circle = new Circle(s1, s2, zone.getTolerance());
    final double alpha1 = circle.toSubSpace(s1).getAlpha();
    final double alpha2 = MathUtils.normalizeAngle(circle.toSubSpace(s2).getAlpha(), alpha1 + FastMath.PI);
    final SubCircle sub = new SubCircle(circle, new ArcsSet(alpha1, alpha2, zone.getTolerance()));
    return recurseMeetInside(zone.getTree(false), sub);

}