fr.cnes.sirius.patrius.fieldsofview
Class RectangleField

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

public class RectangleField
extends Object
implements IFieldOfView

This class describes a field of view defined by a rectangle cone, to be used in "instruments" part properties. It implements the IFieldOfView interface and so provides the associated services.

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

Constructor Summary
RectangleField(String name, Vector3D mainDirection, Vector3D approximativeU, double angularApertureU, double angularApertureV)
          Constructor for a field of view defined by a rectangle cone.
 
Method Summary
 double getAngularDistance(Vector3D direction)
          Computes the angular distance between a vector and the border of the field.
 String getName()
          
 Vector3D getU()
          Get the U axis
 Vector3D getV()
          Get the V axis
 Vector3D getW()
          Get the W axis.
 boolean isInTheField(Vector3D direction)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RectangleField

public RectangleField(String name,
                      Vector3D mainDirection,
                      Vector3D approximativeU,
                      double angularApertureU,
                      double angularApertureV)
Constructor for a field of view defined by a rectangle cone.

Parameters:
name - the name of the field
mainDirection - the main direction of the rectangle cone
approximativeU - : defines the U vector of the local frame of the rectangle cone (will be corrected to be orthogonal to the main direction vector). Can't be parallel to the main direction vector.
angularApertureU - the angular aperture in U direction : must be strictly between 0 and PI
angularApertureV - the angular aperture in V direction : must be strictly between 0 and PI
Method Detail

getU

public Vector3D getU()
Get the U axis

Returns:
U axis

getV

public Vector3D getV()
Get the V axis

Returns:
V axis

getW

public Vector3D getW()
Get the W axis. This represents the direction of the cone

Returns:
W axis

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.