Package cds.healpix.common.sphgeom
Class Cone
- java.lang.Object
-
- cds.healpix.common.sphgeom.CooXYZ
-
- cds.healpix.common.sphgeom.Cone
-
public final class Cone extends CooXYZ
Defines a cone on the unit sphere.- Author:
- F.-X. Pineau
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(CooXYZ coo)Returnstrueif the given point is inside the cone.doubleradiusRad()Returns the angle of the cone (the distance between its center and the its edge), in radians.java.lang.StringtoString()-
Methods inherited from class cds.healpix.common.sphgeom.CooXYZ
arcCenter, arcCenter, boundingCone, circumCenter, circumCenter, circumRadiusSphe, circumRadiusSphe, crossProd, euclDist, havDist, lat, lon, mec, mec, mec, normalizedSum, scalarProd, scalarProd, spheDist, toEquaCooXYZ, x, y, z
-
-
-
-
Constructor Detail
-
Cone
public Cone(CooXYZ center, double radiusRad)
Creator.- Parameters:
center- cetner of the coneradiusRad- 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 radianslatRad- latitude of the center of the cone, in radiansradiusRad- 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 coney- second Cartesian coordinate of the center of the conez- third Cartesian coordinate of the center of the coneradiusRad- 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)
Returnstrueif the given point is inside the cone.- Parameters:
coo- position to be tested- Returns:
trueif the given point is inside the cone.
-
-