fr.cnes.sirius.patrius.fieldsofview
Class FieldAngularFace

java.lang.Object
  extended by fr.cnes.sirius.patrius.fieldsofview.FieldAngularFace

public final class FieldAngularFace
extends Object

This class represent a face of a pyramidal field of view. It can compute the minimal angle between it and a given direction.

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

Constructor Summary
FieldAngularFace(Vector3D firstVector, Vector3D secondVector)
          Constructor.
 
Method Summary
 double computeMinAngle(Vector3D direction)
          Computes the minimal angle between this and a given direction.
 boolean isCloseToVend()
           
 boolean isCloseToVstart()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldAngularFace

public FieldAngularFace(Vector3D firstVector,
                        Vector3D secondVector)
Constructor. Vectors must not have a zero norm.

Parameters:
firstVector - the first direction of the face
secondVector - the second direction of the face
Method Detail

computeMinAngle

public double computeMinAngle(Vector3D direction)
Computes the minimal angle between this and a given direction. If the direction's dot product to the normal vector to the face (cross product v1*v2), the angle is positive, and negative otherwise.

Parameters:
direction - the direction vector
Returns:
the signed minimal angular distance to the facet

isCloseToVstart

public boolean isCloseToVstart()
Returns:
true if the direction vector is closest to V1 once the min angle has been computed.

isCloseToVend

public boolean isCloseToVend()
Returns:
true if the direction vector is closest to V2 once the min angle has been computed.


Copyright © 2017 CNES. All Rights Reserved.