Allink  v0.1
Public Member Functions | Public Attributes | List of all members
Vettore Class Reference

Geometrical operations on vectors. More...

#include <MatematicaVect.h>

Public Member Functions

 Vettore (int N)
 Allocates.
 
 Vettore ()
 Allocates.
 
 ~Vettore ()
 Frees.
 
 Vettore (double *Pos, int N)
 Allocates and assigns.
 
 Vettore (double x, double y, double z)
 Three dim vector.
 
 Vettore (double x, double y)
 Two dim vector.
 
double Abs ()
 Return the absolute value.
 
double Norm ()
 Return the norm of a Vettore.
 
double Normalize ()
 Normlizes a Vettore.
 
void Normal (const Vettore *u, const Vettore *v)
 Computes the normal with respect to the Vettore u and v.
 
void NormalSurf (const Vettore *u, const Vettore *v, const Vettore *w)
 Computes the normal to the plane described by u,v,w.
 
double ProjOnSurf (Vettore *S1, Vettore *S2, Vettore *S3, Vettore *P)
 Project a point P on the point PS perpendicular to the surface described by the points S1, S2 and S3.
 
void Mult (double Fact)
 multiply by a scalar
 
void Subs (const Vettore *u, const Vettore *v)
 substruct two Vettore
 
double ScalS (const Vettore *u, const Vettore *v)
 Multiplies the components of a Vettore for a scalar.
 
double CosAngle (Vettore *u)
 Computes the cosine with respect to. More...
 
double CosAngle (Vettore *u, Vettore *v)
 Computes the cosine between two Vettore.
 
double SinAngle (Vettore *u, Vettore *v)
 Computes the sine between two Vettore.
 
double SinAngle (Vettore *u)
 Computes the sine with respect to. More...
 
double Angle (Vettore *u, Vettore *v)
 Computes the angle between two Vetttore.
 
double Angle (Vettore *u)
 Computes the angle between two Vetttore.
 
double Col (int N)
 Value of the N column.
 
double Val (int N)
 Value of the N column.
 
void Set (double Val, int Col)
 Set the N column.
 
void Axis (Vettore *u, Vettore *v)
 Calculates the axis formed by two Vettore.
 
void ScalV (const Vettore *u, const Vettore *v)
 Scalar product between two Vettore.
 
double VetV (const Vettore *u, const Vettore *v)
 Vectorial product between two Vettore returns the area.
 
double VetV3 (const Vettore *u, const Vettore *v)
 Vectorial product between two Vettore in three dimension (faster) returns the area.
 
double VetV (const Vettore *u)
 Vectorial product between two Vettore returns the area.
 
double ProjOnAxis (Vettore *a)
 Projects along the axis.
 
double ProjOnAxis (Vettore *Pos, Vettore *Axis)
 The length of Pos on Axis.
 
void ApplyOn (Vettore *o)
 Apply on a origin.
 
void Copy (Vettore *o)
 Copy the vector.
 
void Export (double *x)
 Export.
 
void PerpTo (Vettore *o)
 The vector perpendicolar.
 
double PerpTo (Vettore *Pos, Vettore *Axis)
 The vector perpendicolar.
 
double PerpTo3 (Vettore *Pos, Vettore *Axis)
 The vector perpendicolar in three dimension (faster)
 
void Print ()
 Prints the components.
 
void Rescale (double NewLength)
 Rescale the total length of the vector.
 
Vettore operator+ (const Vettore &Vet)
 Sum component by component.
 
Vettore operator+ (const Vettore &Vet) const
 Sum component by component.
 
Vettoreoperator+= (const Vettore &Vet)
 Sum component by component.
 
Vettore operator- (const Vettore &Vet)
 Difference component by component.
 
Vettore operator- (const Vettore &Vet) const
 Difference component by component.
 
Vettoreoperator-= (const Vettore &Vet)
 Difference component by component.
 
Vettore operator* (const Vettore &Vet)
 Moltiplication component by component.
 
Vettoreoperator*= (const Vettore &vec)
 Scalar product.
 
Vettore operator* (const double Fact)
 Moltiplication component by a scalar.
 
Vettoreoperator*= (const double f)
 Moltiplication component by a scalar.
 
double operator% (const Vettore &Vet)
 Scalar product.
 
double & operator%= (const Vettore &Vet)
 Scalar product.
 
Vettore operator^ (const Vettore &vec)
 Vectorial product.
 
Vettoreoperator^= (const Vettore &vec)
 Vectorial product.
 
Vettore operator/ (const Vettore &vec)
 Division component by component.
 
Vettoreoperator/= (const Vettore &vec)
 Division component by component.
 
Vettore operator= (const Vettore &Vet)
 Assigns the entries of the rhs Vettore to the lhs.
 
double * getPtr ()
 Returns a entry.
 
const double * getPtr () const
 Returns a entry.
 
double & operator[] (int col)
 Returns a entry.
 
double operator[] (int col) const
 Returns a entry.
 

Public Attributes

int NDim
 Dimension allocated.
 
double * x
 Where the data are stored.
 

Detailed Description

Geometrical operations on vectors.

Definition at line 9 of file MatematicaVect.h.

Member Function Documentation

double CosAngle ( Vettore u)

Computes the cosine with respect to.

Parameters
u

Definition at line 229 of file MatematicaVect.cpp.

References NDim, Norm(), and x.

Referenced by Angle(), Forces::CalcBending(), and ProjOnAxis().

double SinAngle ( Vettore u)

Computes the sine with respect to.

Parameters
u

Definition at line 247 of file MatematicaVect.cpp.

References NDim, Norm(), and x.


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