PlanesOperations Class Reference

#include <PlanesOperations.h>

Inheritance diagram for PlanesOperations:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 PlanesOperations ()
 ~PlanesOperations ()
double * getCrossProduct (double *vect0, double *vect1)
double getPodoubleProduct (double *vect0, double *vect1)
double * getNormal (double *vect)
double getMagnitud (double *vect)
double * makeVector (double podouble0[3], double podouble1[3])


Detailed Description

Definition at line 8 of file PlanesOperations.h.


Constructor & Destructor Documentation

PlanesOperations::PlanesOperations (  ) 

Definition at line 8 of file PlanesOperations.cxx.

00008                                   {     
00009 }

PlanesOperations::~PlanesOperations (  ) 

Definition at line 12 of file PlanesOperations.cxx.

00012                                    {
00013 
00014 }


Member Function Documentation

double * PlanesOperations::getCrossProduct ( double *  vect0,
double *  vect1 
)

Definition at line 17 of file PlanesOperations.cxx.

Referenced by PlaneDirectionManagerData::UpdateActor().

00017                                                                     {
00018         double* vectCross;
00019         vectCross = new double[3];
00020         vectCross[0] = vect0[1]*vect1[2]-(vect0[2]*vect1[1]);
00021         vectCross[1] = -(vect0[0]*vect1[2]-(vect0[2]*vect1[0]));
00022         vectCross[2] = vect0[0]*vect1[1]-(vect0[1]*vect1[0]);
00023 
00024         return vectCross;
00025 }

Here is the caller graph for this function:

double PlanesOperations::getPodoubleProduct ( double *  vect0,
double *  vect1 
)

double * PlanesOperations::getNormal ( double *  vect  ) 

returns the unitary vector of the given vector u = 1/|vect| . vect

Definition at line 44 of file PlanesOperations.cxx.

References getMagnitud().

Referenced by PlaneDirectionManagerData::UpdateActor().

00044                                                {
00045 
00046         double* vectnorm;
00047         double mag = getMagnitud(vect);
00048 
00049         vectnorm = new double[3];
00050         
00051 
00052         if(mag!=0){
00053                 vectnorm[0] = vect[0]/mag;
00054                 vectnorm[1] = vect[1]/mag;
00055                 vectnorm[2] = vect[2]/mag;
00056         }else{
00057                 vectnorm[0] = 0;
00058                 vectnorm[1] = 0;
00059                 vectnorm[2] = 0;
00060         }
00061 
00062         return vectnorm;
00063 
00064 
00065 }

Here is the call graph for this function:

Here is the caller graph for this function:

double PlanesOperations::getMagnitud ( double *  vect  ) 

Returns the magnitud of the given vector

Definition at line 29 of file PlanesOperations.cxx.

Referenced by getNormal().

00029                                                 {
00030 
00031         double mag;
00032 
00033         mag = sqrt(pow(vect[0],2) + pow(vect[1],2) + pow(vect[2],2));
00034 
00035         std::cout<<"mag "<<mag <<std::endl;
00036 
00037         return mag;
00038 
00039 }

Here is the caller graph for this function:

double * PlanesOperations::makeVector ( double  podouble0[3],
double  podouble1[3] 
)

Definition at line 67 of file PlanesOperations.cxx.

Referenced by PlaneDirectionManagerData::UpdateActor().

00067                                                                             {
00068         double *vect;
00069         vect = new double[3];
00070 
00071         vect[0]= podouble1[0]-podouble0[0];
00072         vect[1]= podouble1[1]-podouble0[1];
00073         vect[2]= podouble1[2]-podouble0[2];
00074 
00075         return vect;
00076 
00077 }

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Jul 29 16:36:06 2009 for creaMaracasVisu_lib by  doxygen 1.5.3