Changeset 565 in Sophya for trunk/SophyaLib/Samba/unitvector.cc


Ignore:
Timestamp:
Nov 10, 1999, 3:01:46 PM (26 years ago)
Author:
ansari
Message:

ajout doc GLM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Samba/unitvector.cc

    r262 r565  
    11#include <math.h>
    22#include "unitvector.h"
    3 
     3//*****************************************************************************
     4//++
     5// Class        UnitVector
     6//
     7// include      unitvector.h vector3d.h math.h
     8//--
     9//++
     10//
     11// Links        Parents
     12//
     13//    Vector3d
     14//   
     15//--
     16//++
     17// Titre        Constructors
     18//--
     19//++
    420UnitVector::UnitVector() : Vector3d(1.,0.,0.)
     21//
     22//--
    523{
    624}
    7 
     25//++
    826UnitVector::UnitVector(double x, double y, double z) : Vector3d(x,y,z)
     27//
     28//--
    929{
    1030  this->Normalize();
    1131}
    12 
     32//++
    1333UnitVector::UnitVector(double theta, double phi) : Vector3d(theta,phi)
     34//
     35//--
    1436{
    1537  this->Normalize();
    1638}
    17 
     39//++
    1840UnitVector::UnitVector(const Vector3d& v) : Vector3d(v)
     41//
     42//--
    1943{
    2044  this->Normalize();
    2145}
     46//++
     47// Titre        Public Method
     48//--
     49//++
     50void UnitVector::Print(ostream& os) const
     51//
     52//--
     53{
     54  os << "UnitVector : (X,Y,Z)= (" << _x << ", " << _y << ", " << _z
     55     << ") Theta,Phi= " << _theta << ", " << _phi << "\n"
     56     << "norme =" << this->Norm() << endl;
     57}
     58//++
     59// Titre        Operators
     60//--
     61//++
     62Vector3d& UnitVector::operator = (const Vector3d& v)
     63//
     64//--
    2265
    23 Vector3d& UnitVector::operator=(const Vector3d& v)
    2466{
    2567  Setxyz(v.X(),v.Y(),v.Z());
     
    2769  return *this;
    2870}
    29 
    30 Vector3d& UnitVector::operator+=(const Vector3d& v)
     71//++
     72Vector3d& UnitVector::operator += (const Vector3d& v)
     73//
     74//--
    3175{
    3276  Setxyz(_x+v.X(),_y+v.Y(),_z+v.Z());
     
    3478  return *this;
    3579}
    36 
    37 Vector3d& UnitVector::operator-=(const Vector3d& v)
     80//++
     81Vector3d& UnitVector::operator -= (const Vector3d& v)
     82//
     83//--
    3884{
    3985  Setxyz(_x-v.X(),_y-v.Y(),_z-v.Z());
     
    4187  return *this;
    4288}
    43 
    44 Vector3d UnitVector::operator+(const Vector3d& v) const
     89//++
     90Vector3d UnitVector::operator + (const Vector3d& v) const
     91//
     92//--
    4593{
    4694  return UnitVector(_x+v.X(),_y+v.Y(),_z+v.Z());
    4795}
    48 
    49 Vector3d UnitVector::operator-(const Vector3d& v) const
     96//++
     97Vector3d UnitVector::operator - (const Vector3d& v) const
     98//
     99//--
    50100{
    51101  return UnitVector(_x-v.X(),_y-v.Y(),_z-v.Z());
    52102}
    53 
    54 void UnitVector::Print(ostream& os) const
    55 {
    56   os << "UnitVector : (X,Y,Z)= (" << _x << ", " << _y << ", " << _z
    57      << ") Theta,Phi= " << _theta << ", " << _phi << "\n"
    58      << "norme =" << this->Norm() << endl;
    59 }
Note: See TracChangeset for help on using the changeset viewer.