Class Cone


  • public final class Cone
    extends CooXYZ
    Defines a cone on the unit sphere.
    Author:
    F.-X. Pineau
    • Constructor Detail

      • Cone

        public Cone​(CooXYZ center,
                    double radiusRad)
        Creator.
        Parameters:
        center - cetner of the cone
        radiusRad - radius of the cone, in radians
      • Cone

        public Cone​(double lonRad,
                    double latRad,
                    double radiusRad)
        Creator.
        Parameters:
        lonRad - longitude of the center of the cone, in radians
        latRad - latitude of the center of the cone, in radians
        radiusRad - radius of the cone, in radians
      • Cone

        public Cone​(double x,
                    double y,
                    double z,
                    double radiusRad)
        Creator.
        Parameters:
        x - first Cartesian coordinate of the center of the cone
        y - second Cartesian coordinate of the center of the cone
        z - third Cartesian coordinate of the center of the cone
        radiusRad - radius of the cone, in radians
    • Method Detail

      • radiusRad

        public double radiusRad()
        Returns the angle of the cone (the distance between its center and the its edge), in radians.
        Returns:
        the angle of the cone (the distance between its center and the its edge), in radians.
      • contains

        public boolean contains​(CooXYZ coo)
        Returns true if the given point is inside the cone.
        Parameters:
        coo - position to be tested
        Returns:
        true if the given point is inside the cone.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class CooXYZ