fr.cnes.sirius.patrius.fieldsofview
Class PyramidalField

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

public final class PyramidalField
extends Object
implements IFieldOfView

This class describes a pyramidal field of view defined a list of vectors (its edges) cone, to be used in "instruments" part properties. It implements the IFieldOfView interface and so provides the associated services.

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

Constructor Summary
PyramidalField(String name, Vector3D[] directions)
          Constructor for a pyramidal 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

PyramidalField

public PyramidalField(String name,
                      Vector3D[] directions)
Constructor for a pyramidal field of view.

Parameters:
name - the name of the field
directions - the directions defining the border of the field. They must be given in the right order : from the vector i to the vector i + 1, the inside of the field is on the side of the positive cross vector v(i) * v(i+1)
Method Detail

getAngularDistance

public double getAngularDistance(Vector3D direction)
Description copied from interface: IFieldOfView
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.