fr.cnes.sirius.patrius.fieldsofview
Class SectorField

java.lang.Object
  extended by fr.cnes.sirius.patrius.fieldsofview.SectorField
All Implemented Interfaces:
IFieldOfView

public class SectorField
extends Object
implements IFieldOfView

This class defines a "sector" field of view. This field is a min/max longitude and min/max latitude aperture on the unit sphere. It is defined by three vectors : the local "north pole" vector for this sphere, the min latitude - min longitude point vector (V1) and the max latitude - max longitude point vector (V2).

Since:
1.2
Version:
$Id: SectorField.java 17586 2017-05-10 13:29:16Z bignon $
Author:
Thomas Trapier
See Also:
IFieldOfView
Concurrency :
immutable

Constructor Summary
SectorField(String name, Vector3D vectorPole, Vector3D vectorV1, Vector3D vectorV2)
          Constructor for the "sector" field of view.
 
Method Summary
 double getAngularDistance(Vector3D direction)
          Computes the angular distance between a vector and the border of the field.
 String getName()
          
 boolean isInTheField(Vector3D direction)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SectorField

public SectorField(String name,
                   Vector3D vectorPole,
                   Vector3D vectorV1,
                   Vector3D vectorV2)
Constructor for the "sector" field of view. The latitude of the V2 point must be greater than the latitude of the V1 point (the angle from the pole vector to V1 must be greater than the angle from the pole vector to V2). None of them can aligned with or opposite to the "pole" vector.

Parameters:
name - the name of the field
vectorPole - the local "north pole" direction on the unit sphere (will be normalized)
vectorV1 - the min latitude - min longitude point vector on the unit sphere (will be normalized)
vectorV2 - the max latitude - max longitude point vector on the unit sphere (will be normalized)
Method Detail

getAngularDistance

public double getAngularDistance(Vector3D direction)
Computes the angular distance between a vector and the border of the field. The result is positive if the direction is in the field, negative otherwise. For some of the fields (ComplexField), that value can be approximative : see particular javadoc of each class.

Specified by:
getAngularDistance in interface IFieldOfView
Parameters:
direction - the direction vector
Returns:
the angular distance

isInTheField

public boolean isInTheField(Vector3D direction)

Specified by:
isInTheField in interface IFieldOfView
Parameters:
direction - a direction vector
Returns:
true if the direction is in the field

getName

public String getName()

Specified by:
getName in interface IFieldOfView
Returns:
the name of the field


Copyright © 2017 CNES. All Rights Reserved.