maillage
Class Vect

java.lang.Object
  extended by maillage.Vect

public class Vect
extends java.lang.Object

Class representing a vector (geometric)


Constructor Summary
Vect(Point P, Point Q)
          Constructor of a vector PQ defined by 2 points
 
Method Summary
 Vect diff(Vect V)
          Returns the difference of 2 vectors
 Point getCoordinates()
          Returns the cartesian coordinates of the vector
 Point getP1()
          Returns the #1 point of the vector
 Point getP2()
          Returns the #2 point of the vector
 double norm()
          Returns the norm of the vector
 void printCoordinates()
          Displays the cartesian coordinates of the vector
 double produitMixte(Vect a, Vect c)
          Retourne (A^B).
 double scalar(Vect V)
          Returns the scalar product with another vecetor
 Vect sum(Vect V)
          Returns the sum of 2 vectors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Vect

public Vect(Point P,
            Point Q)
Constructor of a vector PQ defined by 2 points

Parameters:
P - Point #1
Q - Point #2
Method Detail

getP1

public Point getP1()
Returns the #1 point of the vector

Returns:
P1

getP2

public Point getP2()
Returns the #2 point of the vector

Returns:
P2

getCoordinates

public Point getCoordinates()
Returns the cartesian coordinates of the vector

Returns:
Vector (X,Y

norm

public double norm()
Returns the norm of the vector

Returns:
Norm of the vector

sum

public Vect sum(Vect V)
Returns the sum of 2 vectors

Parameters:
V - Vector to add
Returns:
Sum of the 2 vectors

diff

public Vect diff(Vect V)
Returns the difference of 2 vectors

Parameters:
V2 - Vector from which the vector is substracted
Returns:
Substracted vector

scalar

public double scalar(Vect V)
Returns the scalar product with another vecetor

Returns:
Scalar product

produitMixte

public double produitMixte(Vect a,
                           Vect c)
Retourne (A^B).(B^C)

Returns:
Retourne (A^B).(B^C)

printCoordinates

public void printCoordinates()
Displays the cartesian coordinates of the vector