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

Vector3DH Class Reference

#include <Vector3D.hpp>

List of all members.

Public Methods

 Vector3DH ()
 Vector3DH (const Sommet3DH &a1, const Sommet3DH &b1)
 Vector3DH (const Vector3DH &v)
Vector3DH & operator= (const Vector3DH &v)
realtype angle_ver ()
void cos_sinangle_ver (realtype &cos_Theta, realtype &sin_Theta)
realtype cosangle_ver ()
realtype sinangle_ver ()
realtype angle_hor ()
void cos_sinangle_hor (realtype &cos_Phi, realtype &sin_Phi)
realtype cosangle_hor ()
realtype sinangle_hor ()
realtype norme ()
realtype compox ()
realtype compoy ()
realtype compoz ()
void normalisation ()
realtype produit_scalaire (Vector3DH &v)
void vecteur_normal (Vector3DH &v, Sommet3DH &result)
void vecteur_normal (Vector3DH &v, Vector3DH &result)

Public Attributes

Sommet3DH a
Sommet3DH b


Constructor & Destructor Documentation

Vector3DH::Vector3DH   [inline]
 

Definition at line 8 of file Vector3D.hpp.

00008 { }

Vector3DH::Vector3DH const Sommet3DH   a1,
const Sommet3DH   b1
[inline]
 

Definition at line 10 of file Vector3D.hpp.

00010 : a( a1 ), b( b1 ) { }

Vector3DH::Vector3DH const Vector3DH &    v [inline]
 

Definition at line 12 of file Vector3D.hpp.

00012 : a( v.a ), b( v.b ) { }


Member Function Documentation

realtype Vector3DH::angle_hor  
 

Definition at line 60 of file Vector3D.cpp.

00060                               {
00061   return (realtype)atan2( compoy(), compox() );
00062 }

realtype Vector3DH::angle_ver   [inline]
 

Definition at line 18 of file Vector3D.cpp.

00018                                      {
00019   realtype n = norme();
00020   if ( n == 0 ) return 0;
00021   return (realtype)asin( compoz() / n );
00022 }

realtype Vector3DH::compox   [inline]
 

Definition at line 127 of file Vector3D.cpp.

Referenced by angle_hor(), cos_sinangle_hor(), cos_sinangle_ver(), cosangle_hor(), cosangle_ver(), normalisation(), norme(), and sinangle_hor().

00127                                   {
00128   return ( b.x - a.x );
00129 }

realtype Vector3DH::compoy   [inline]
 

Definition at line 132 of file Vector3D.cpp.

Referenced by angle_hor(), cos_sinangle_hor(), cos_sinangle_ver(), cosangle_hor(), cosangle_ver(), normalisation(), norme(), and sinangle_hor().

00132                                   {
00133   return ( b.y - a.y );
00134 }

realtype Vector3DH::compoz   [inline]
 

Definition at line 137 of file Vector3D.cpp.

Referenced by angle_ver(), cos_sinangle_ver(), normalisation(), norme(), and sinangle_ver().

00137                                   {
00138   return ( b.z - a.z );
00139 }

void Vector3DH::cos_sinangle_hor realtype &    cos_Phi,
realtype &    sin_Phi
 

Definition at line 69 of file Vector3D.cpp.

00070 {
00071   realtype n   = norme(),
00072            dx  = compox(),
00073            dy  = compoy(),
00074            nxy = (realtype)sqrt( dy*dy + dx*dx );
00075 
00076   if ( n == 0 ) {
00077     cos_Phi = sin_Phi = 0;
00078     return;
00079   }
00080 
00081   if ( nxy == 0 ) {
00082     cos_Phi = 1;
00083     sin_Phi = 0;
00084     return;
00085   }
00086 
00087   cos_Phi = dx / nxy;
00088   sin_Phi = dy / nxy;
00089 }

void Vector3DH::cos_sinangle_ver realtype &    cos_Theta,
realtype &    sin_Theta
 

Definition at line 25 of file Vector3D.cpp.

00026 {
00027  realtype n   = norme(),
00028           dx  = compox(),
00029           dy  = compoy(),
00030           nxy = (realtype) sqrt( dy*dy + dx*dx );
00031 
00032   if ( n == 0 ) {
00033     cos_Theta = sin_Theta = 0;
00034 
00035   } else {
00036    cos_Theta = nxy / n;
00037    sin_Theta = compoz() / n;
00038 
00039   }
00040 }

realtype Vector3DH::cosangle_hor  
 

Definition at line 92 of file Vector3D.cpp.

00092                                  {
00093   realtype n   = norme(),
00094            dx  = compox(),
00095            dy  = compoy(),
00096            nxy = (realtype)sqrt( dy*dy + dx*dx );
00097 
00098   if ( n == 0 ) return 0;
00099 
00100   if ( nxy == 0 ) return 1;
00101 
00102   return dx / nxy;
00103 }

realtype Vector3DH::cosangle_ver  
 

Definition at line 43 of file Vector3D.cpp.

00043                                  {
00044   realtype n   = norme(),
00045            dx  = compox(),
00046            dy  = compoy(),
00047            nxy = (realtype)sqrt( dy*dy + dx*dx );
00048 
00049   return ( (n == 0) ? 0 : (nxy / n) );
00050 }

void Vector3DH::normalisation  
 

Definition at line 142 of file Vector3D.cpp.

00142                               {
00143   realtype n  = norme(),
00144            dx = compox() / n,
00145            dy = compoy() / n,
00146            dz = compoz() / n;
00147 
00148   b.x = a.x + dx;
00149   b.y = a.y + dy;
00150   b.z = a.z + dz;
00151 }

realtype Vector3DH::norme  
 

Definition at line 118 of file Vector3D.cpp.

Referenced by CapteurVisuel3D::CalculPerspective(), angle_ver(), cos_sinangle_hor(), cos_sinangle_ver(), cosangle_hor(), cosangle_ver(), normalisation(), sinangle_hor(), and sinangle_ver().

00118                           {
00119   realtype dx = compox(),
00120            dy = compoy(),
00121            dz = compoz();
00122 
00123   return (realtype) sqrt( dx*dx + dy*dy + dz*dz );
00124 }

const Vector3DH & Vector3DH::operator= const Vector3DH &    v [inline]
 

Definition at line 11 of file Vector3D.cpp.

00011                                                                  {
00012   a = v.a;
00013   b = v.b;
00014   return *this;
00015 }

realtype Vector3DH::produit_scalaire Vector3DH &    v
 

realtype Vector3DH::sinangle_hor  
 

Definition at line 106 of file Vector3D.cpp.

00106                                  {
00107   realtype n   = norme(),
00108            dx  = compox(),
00109            dy  = compoy(),
00110            nxy = (realtype)sqrt( dy*dy + dx*dx );
00111 
00112   if ( n == 0  ||  nxy == 0 ) return 0;
00113 
00114   return dy / nxy;
00115 }

realtype Vector3DH::sinangle_ver   [inline]
 

Definition at line 53 of file Vector3D.cpp.

00053                                         {
00054   realtype n = norme();
00055   return ( (n == 0) ? 0 : (compoz() / n) );
00056 }

void Vector3DH::vecteur_normal Vector3DH &    v,
Vector3DH &    result
 

void Vector3DH::vecteur_normal Vector3DH &    v,
Sommet3DH   result
 

Referenced by normalisation().


Member Data Documentation

Sommet3DH Vector3DH::a
 

Definition at line 69 of file Vector3D.hpp.

Referenced by CapteurVisuel3D::CalculPerspective(), normalisation(), operator<<(), operator=(), and operator>>().

Sommet3DH Vector3DH::b
 

Definition at line 69 of file Vector3D.hpp.

Referenced by CapteurVisuel3D::CalculPerspective(), normalisation(), operator<<(), operator=(), and operator>>().


The documentation for this class was generated from the following files:
Generated on Sun Oct 14 18:50:26 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001