Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Beta/3D/Vector3D.hpp

Go to the documentation of this file.
00001 #ifndef __J2K__Vector3D_HPP__
00002 #define __J2K__Vector3D_HPP__
00003 
00004 #include <j2k/Fred/3d/Sommet.hpp>
00005 
00006 class Vector3DH {
00007 public:
00008  Vector3DH() { }
00009 
00010  Vector3DH( const Sommet3DH& a1, const Sommet3DH& b1 ) : a( a1 ), b( b1 ) { }
00011 
00012  Vector3DH( const Vector3DH& v ): a( v.a ), b( v.b ) { }
00013 
00014  // Assignment
00015  Vector3DH& operator=( const Vector3DH& v );
00016 
00017  // Theta vertical angle of the Vector to the XoY plan (in Radians).
00018  realtype angle_ver();
00019 
00020  // cos & sin of the Theta vertical angle of the Vector.
00021  void cos_sinangle_ver( realtype& cos_Theta, realtype& sin_Theta );
00022  realtype cosangle_ver();
00023  realtype sinangle_ver();
00024 
00025  // Phi horizontal angle of the vector (in Radians)
00026  // on the XoY plan from the X axes
00027  // in the trigonometric direction for a direct repere.
00028  realtype angle_hor();
00029 
00030  // cos & sin of the Phi horizontal angle of the vector
00031 
00032  // Special case:
00033  // =============
00034  // When the vector is vertical the projection on the XoY plan is a dot.
00035  // In that case, there is no calculation to be done,
00036  // so we suppose that phi = 0.
00037 
00038  void cos_sinangle_hor( realtype& cos_Phi, realtype& sin_Phi );
00039  realtype cosangle_hor();
00040  realtype sinangle_hor();
00041 
00042  // Norme of vector.
00043  realtype norme();
00044 
00045  // Composante X of vector.
00046  realtype compox();
00047 
00048  // Composante Y of vector.
00049  realtype compoy();
00050 
00051  // Composante Z of vector.
00052  realtype compoz();
00053 
00054  // Normalisation of vector.
00055  void normalisation();
00056 
00057  // Scalar product of a vector by another.
00058  realtype produit_scalaire( Vector3DH& v );
00059 
00060  // Vectorial product of a vector by another.
00061  // Application a l'obtention du vecteur normal 1.
00062  void vecteur_normal( Vector3DH& v, Sommet3DH& result );
00063 
00064  // Vectorial product of a vector by another.
00065  // Application a l'obtention of vector normal 2.
00066  void vecteur_normal( Vector3DH& v, Vector3DH& result );
00067 
00068 public:
00069  Sommet3DH a, b;
00070 };
00071 
00072 // Read from a formated stream
00073 istream& operator>>( istream& in,  const Vector3DH& v );
00074 
00075 // Write to a formated stream
00076 ostream& operator<<( ostream& out, const Vector3DH& v );
00077 
00078 #endif 

Generated on Sun Oct 14 18:46:09 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001