Geom Software - C++ Programming and Geometry Libraries
FADEPLACEHOLDER Documentation pages v1.03
GEOM_WOF::Vector3 Class Reference

3D Vector

#include <Vector3.h>

Public Member Functions

 Vector3 (const double x_, const double y_, const double z_)
 Vector3 ()
 Default constructor. More...
 Vector3 (const Vector3 &v_)
 Copy constructor. More...
Vector3 orthogonalVector () const
 Get an orthogonal vector (CCW direction) More...
bool isDegenerate () const
 isDegenerate More...
void xyz (double &x_, double &y_, double &z_) const
double x () const
 Get the x-value.
double y () const
 Get the y-value.
double z () const
 Get the z-value.
void set (const double x_, const double y_, const double z_)
 Set the values.
void add (const Vector3 &other)
void sub (const Vector3 &other)
void div (double div)
void mul (double mul)
double sqLength () const
 Get the squared length of the vector.
int getMaxAbsIndex () const
 Get max index. More...
double getMaxComponent () const
 Get max component. More...
double getMaxAbsComponent () const
 Get max absolute component. More...
double getCartesian (int i) const
 Get component i. More...
double length () const
 Get the length of the vector.
double operator* (const Vector3 &other) const
 Scalar product.
Vector3 operator* (double val) const
 Multiply by a scalar value.
Vector3 operator/ (double val) const
 Divide by a scalar value.
Vector3operator= (const Vector3 &other)

Protected Attributes

double valX
double valY
double valZ

Constructor & Destructor Documentation

◆ Vector3() [1/2]

GEOM_WOF::Vector3::Vector3 ( )

The vector is initialized to (0,0,0)

◆ Vector3() [2/2]

GEOM_WOF::Vector3::Vector3 ( const Vector3 v_)

Create a copy of vector v_

Member Function Documentation

◆ getCartesian()

double GEOM_WOF::Vector3::getCartesian ( int  i) const

◆ getMaxAbsComponent()

double GEOM_WOF::Vector3::getMaxAbsComponent ( ) const

◆ getMaxAbsIndex()

int GEOM_WOF::Vector3::getMaxAbsIndex ( ) const
the index of the largest absolute component (0,1 or 2)

◆ getMaxComponent()

double GEOM_WOF::Vector3::getMaxComponent ( ) const

◆ isDegenerate()

bool GEOM_WOF::Vector3::isDegenerate ( ) const
true if the vector length is 0, false otherwise.

◆ orthogonalVector()

Vector3 GEOM_WOF::Vector3::orthogonalVector ( ) const
: Only (x,y) coordinates are computed, z=0

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