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.

00009 {       
00010 }

PlanesOperations::~PlanesOperations (  ) 

Definition at line 13 of file PlanesOperations.cxx.

00014 {
00015 
00016 }


Member Function Documentation

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

Definition at line 19 of file PlanesOperations.cxx.

Referenced by PlaneDirectionManagerData::UpdateActor().

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

Here is the caller graph for this function:

double PlanesOperations::getMagnitud ( double *  vect  ) 

Returns the magnitud of the given vector

Definition at line 32 of file PlanesOperations.cxx.

Referenced by getNormal().

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

Here is the caller graph for this function:

double * PlanesOperations::getNormal ( double *  vect  ) 

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

Definition at line 46 of file PlanesOperations.cxx.

References getMagnitud().

Referenced by PlaneDirectionManagerData::UpdateActor().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 66 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 }

Here is the caller graph for this function:


The documentation for this class was generated from the following files:

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1