## Developer documentation | Axl-2.5.1

axlPoint Class Reference

Class axlPoint defines 3D points. More...

`#include <axlPoint.h>`

Inheritance diagram for axlPoint: ## Public Member Functions

axlPoint (QObject *parent=0)
Constructs an axel point of zero coordinates with parent parent of QObject type. More...

axlPoint (double x, double y, double z=0, QObject *parent=0)
Constructs a axel point of coordinates (x, y, z) with parent parent of QObject type. More...

axlPoint (const axlPoint &other)
Constructs a copy of other. More...

axlPoint (const axlPoint *other)
Constructs a copy of other. More...

axlPoint (double *p, QObject *parent=0)

~axlPoint (void)
Destroys the axel point. More...

virtual QString description (void) const

virtual QString identifier (void) const

double x (void) const
Returns x-coordinate of this point. More...

double y (void) const
Returns y-coordinate of this point. More...

double z (void) const
Returns z-coordinate of this point. More...

double operator[] (int i) const
Returns i-th coordinate of this point. More...

double & x (void)
Returns x-coordinate of this point. More...

double & y (void)
Returns y-coordinate of this point. More...

double & z (void)
Returns z-coordinate of this point. More...

double & operator[] (int i)
Returns i-th coordinate of this point. More...

double * coordinates (void) const
Returns coordinates of this point. More...

double norm (void) const

void setCoordinates (double x, double y, double z)
Change coordinates of this point. More...

void touchX (double x)
Change coordinates of this point. More...

void touchY (double y)

void touchZ (double z)

void normalize (void)

axlPointnormalized (void)

bool isEqualTo (axlPoint *point)
Check if the point we apply the method on is equal to point. More...

axlPointoperator= (const axlPoint &other)
Assigns other to this point and returns a reference to this point. More...

axlPointoperator+= (const axlPoint &other)
Adds the coordinates of the other point to this point and returns a reference to this point. More...

axlPointoperator-= (const axlPoint &other)
Substracts the coordinates of the other point to this point and returns a reference to this point. More...

double operator* (const axlPoint &other) const
Compute the inner product of the two vectors. More...

axlPointoperator*= (double scalar)
Multiplies the coordinates of this point by a scalar value and returns a reference to this point. More...

axlPointoperator/= (double scalar)
Divides the coordinates of this point by a scalar value and returns a reference to this point. More...

axlPoint operator+ (const axlPoint &other) const
Returns a point that results from the addition of this point and the other point. More...

axlPoint operator- (const axlPoint &other) const
Returns a point that results from the substraction of this point and the other point. More...

axlPoint operator* (double scalar) const
Returns a point that results from the multiplication of the scalar with this point. More...

axlPoint operator/ (double scalar) const
Returns a point that results from the division of the scalar with this point. More...

void transformAsPoint (double matrix)
Multiplication by 3x3 left block (rotation part) and addition with 3x1 right block (translation part) More...

void transformAsVector (double matrix)
Multiplication by 3x3 left block (rotation part) and addition with 3x1 right block (translation part) More...

bool operator< (const axlPoint &other) const
order on axlPoints. Compare the coordinates (x,y,z) by lexicographic order. More...

bool operator== (const axlPoint &point2) const

bool operator!= (const axlPoint &point2) const

QVariantList convertDataToQVariant (void) const
Convert an axlAbstractData into a QVariantList that specifies all properties of the axlAbstractData. More...

int convertQVariantToData (const QVariantList &data)
Modify properties and geometry variables of the axlAbstractData. Return 1 if the modification was sucessfully made. Otherwise return 0. More... Public Member Functions inherited from axlAbstractData
axlAbstractData (axlAbstractData *parent=NULL)

axlAbstractData (const axlAbstractData &data)

virtual ~axlAbstractData (void)

const QColor & color (void) const

const double & opacity (void) const

const double & size (void) const

const QString & shader (void) const

const bool & editable (void)

const bool & updateView (void)

void setColor (double r, double g, double b)

Add a field to the field list of the object. More...

bool updateFieldList (QString nameField)
Check if a field with the same name is already applied on the object. More...

QString changeFieldName (QString fieldName)

axlMeshmesh (void)
Return the mesh of that object is computed. More...

void setMesh (axlMesh *mesh)
Set a corresponding mesh for that object. More...

void setUpdateView (bool updateView)

QList< axlAbstractField * > fields (void)

## Static Public Member Functions

static double distance (const axlPoint &lhs, const axlPoint &rhs)
Returns the distance between lhs point and rhs point. More...

static double distance (axlPoint *lhs, axlPoint *rhs)
Returns the distance between lhs point and rhs point. More...

static axlPoint crossProduct (const axlPoint &lhs, const axlPoint &rhs)
Returns the cross product between lhs (coords) and rhs (coords). More...

static axlPointcrossProduct (axlPoint *lhs, axlPoint *rhs)
Returns the cross product between lhs (coords) and rhs (coords). More...

static double dotProduct (const axlPoint &lhs, const axlPoint &rhs)

static double dotProduct (axlPoint *lhs, axlPoint *rhs)

## Properties

double x

double y

double z Properties inherited from axlAbstractData
QColor color

double opacity

double size

## Friends

QDebug operator<< (QDebug dbg, axlPoint point)

QDebug operator<< (QDebug dbg, axlPoint &point)

QDebug operator<< (QDebug dbg, axlPoint *point) Public Slots inherited from axlAbstractData
void touchGeometry (void)

void touchProperty (void)

void touchStructure (void)

virtual void touchField (void)

void setColor (const QColor &color)

void setOpacity (const double &opacity)

void setSize (const double &size)

void setEditable (bool edit) Signals inherited from axlAbstractData
void modifiedGeometry (void)

void modifiedStructure (void)

void modifiedField (void)

void modifiedProperty (void)

## Detailed Description

Class axlPoint defines 3D points.

This class enables to represent and manipulate 3D points.

Example:

axlPoint *A = new axlPoint(0.0, 0.0, 0.0);
axlPoint *B = new axlPoint(1.0, 0.0, 0.0);
double length = axlPoint::distance(A, B);
axlPoint middle = *(A);
middle += *(B);
middle /= 2.;

Definition at line 34 of file axlPoint.h.

## Constructor & Destructor Documentation

 axlPoint::axlPoint ( QObject * parent = `0` )

Constructs an axel point of zero coordinates with parent parent of QObject type.

The parent of an object may be viewed as the object's owner. The destructor of a parent object destroys all child objects. Setting parent to 0 constructs a axel point with no parent.

Definition at line 45 of file axlPoint.cpp.

 axlPoint::axlPoint ( double x, double y, double z = `0`, QObject * parent = `0` )

Constructs a axel point of coordinates (x, y, z) with parent parent of QObject type.

The parent of an object may be viewed as the object's owner. The destructor of a parent object destroys all child objects. Setting parent to 0 constructs a axel point with no parent.

Definition at line 59 of file axlPoint.cpp.

 axlPoint::axlPoint ( const axlPoint & other )

Constructs a copy of other.

Definition at line 71 of file axlPoint.cpp.

 axlPoint::axlPoint ( const axlPoint * other )

Constructs a copy of other.

Definition at line 84 of file axlPoint.cpp.

 axlPoint::axlPoint ( double * p, QObject * parent = `0` )

Definition at line 94 of file axlPoint.cpp.

 axlPoint::~axlPoint ( void )

Destroys the axel point.

Definition at line 107 of file axlPoint.cpp.

## Member Function Documentation

 QVariantList axlPoint::convertDataToQVariant ( void ) const
virtual

Convert an axlAbstractData into a QVariantList that specifies all properties of the axlAbstractData.

Reimplemented from axlAbstractData.

Definition at line 571 of file axlPoint.cpp.

 int axlPoint::convertQVariantToData ( const QVariantList & data )
virtual

Modify properties and geometry variables of the axlAbstractData. Return 1 if the modification was sucessfully made. Otherwise return 0.

Reimplemented from axlAbstractData.

Definition at line 588 of file axlPoint.cpp.

 double * axlPoint::coordinates ( void ) const

Returns coordinates of this point.

Definition at line 445 of file axlPoint.cpp.

 axlPoint axlPoint::crossProduct ( const axlPoint & lhs, const axlPoint & rhs )
static

Returns the cross product between lhs (coords) and rhs (coords).

Definition at line 485 of file axlPoint.cpp.

 axlPoint * axlPoint::crossProduct ( axlPoint * lhs, axlPoint * rhs )
static

Returns the cross product between lhs (coords) and rhs (coords).

Definition at line 498 of file axlPoint.cpp.

 QString axlPoint::description ( void ) const
virtual

Definition at line 542 of file axlPoint.cpp.

 double axlPoint::distance ( const axlPoint & lhs, const axlPoint & rhs )
static

Returns the distance between lhs point and rhs point.

The distance is always positive.

Definition at line 459 of file axlPoint.cpp.

 double axlPoint::distance ( axlPoint * lhs, axlPoint * rhs )
static

Returns the distance between lhs point and rhs point.

The distance is always positive.

Definition at line 472 of file axlPoint.cpp.

 double axlPoint::dotProduct ( const axlPoint & lhs, const axlPoint & rhs )
static

Definition at line 508 of file axlPoint.cpp.

 double axlPoint::dotProduct ( axlPoint * lhs, axlPoint * rhs )
static

Definition at line 512 of file axlPoint.cpp.

 QString axlPoint::identifier ( void ) const
virtual

Definition at line 549 of file axlPoint.cpp.

 bool axlPoint::isEqualTo ( axlPoint * point )

Check if the point we apply the method on is equal to point.

Definition at line 437 of file axlPoint.cpp.

 double axlPoint::norm ( void ) const

Definition at line 450 of file axlPoint.cpp.

 void axlPoint::normalize ( void )

Definition at line 410 of file axlPoint.cpp.

 axlPoint & axlPoint::normalized ( void )

Definition at line 421 of file axlPoint.cpp.

 bool axlPoint::operator!= ( const axlPoint & point2 ) const

Definition at line 287 of file axlPoint.cpp.

 double axlPoint::operator* ( const axlPoint & other ) const

Compute the inner product of the two vectors.

Definition at line 226 of file axlPoint.cpp.

 axlPoint axlPoint::operator* ( double scalar ) const

Returns a point that results from the multiplication of the scalar with this point.

Definition at line 214 of file axlPoint.cpp.

 axlPoint & axlPoint::operator*= ( double scalar )

Multiplies the coordinates of this point by a scalar value and returns a reference to this point.

Definition at line 157 of file axlPoint.cpp.

 axlPoint axlPoint::operator+ ( const axlPoint & other ) const

Returns a point that results from the addition of this point and the other point.

Definition at line 190 of file axlPoint.cpp.

 axlPoint & axlPoint::operator+= ( const axlPoint & other )

Adds the coordinates of the other point to this point and returns a reference to this point.

Definition at line 131 of file axlPoint.cpp.

 axlPoint axlPoint::operator- ( const axlPoint & other ) const

Returns a point that results from the substraction of this point and the other point.

Definition at line 202 of file axlPoint.cpp.

 axlPoint & axlPoint::operator-= ( const axlPoint & other )

Substracts the coordinates of the other point to this point and returns a reference to this point.

Definition at line 144 of file axlPoint.cpp.

 axlPoint axlPoint::operator/ ( double scalar ) const

Returns a point that results from the division of the scalar with this point.

If the scalar value is zero, it returns a default point.

Definition at line 248 of file axlPoint.cpp.

 axlPoint & axlPoint::operator/= ( double scalar )

Divides the coordinates of this point by a scalar value and returns a reference to this point.

If the scalar value is zero, the point remains unchanged.

Definition at line 170 of file axlPoint.cpp.

 bool axlPoint::operator< ( const axlPoint & other ) const

order on axlPoints. Compare the coordinates (x,y,z) by lexicographic order.

Definition at line 236 of file axlPoint.cpp.

 axlPoint & axlPoint::operator= ( const axlPoint & other )

Assigns other to this point and returns a reference to this point.

Definition at line 118 of file axlPoint.cpp.

 bool axlPoint::operator== ( const axlPoint & point2 ) const

Definition at line 281 of file axlPoint.cpp.

 double axlPoint::operator[] ( int i ) const

Returns i-th coordinate of this point.

Definition at line 323 of file axlPoint.cpp.

 double & axlPoint::operator[] ( int i )

Returns i-th coordinate of this point.

Definition at line 360 of file axlPoint.cpp.

 void axlPoint::setCoordinates ( double x, double y, double z )

Change coordinates of this point.

Definition at line 370 of file axlPoint.cpp.

 void axlPoint::touchX ( double x )

Change coordinates of this point.

Definition at line 389 of file axlPoint.cpp.

 void axlPoint::touchY ( double y )

Definition at line 396 of file axlPoint.cpp.

 void axlPoint::touchZ ( double z )

Definition at line 403 of file axlPoint.cpp.

 void axlPoint::transformAsPoint ( double matrix )

Multiplication by 3x3 left block (rotation part) and addition with 3x1 right block (translation part)

Definition at line 263 of file axlPoint.cpp.

 void axlPoint::transformAsVector ( double matrix )

Multiplication by 3x3 left block (rotation part) and addition with 3x1 right block (translation part)

Definition at line 272 of file axlPoint.cpp.

 double axlPoint::x ( void ) const

Returns x-coordinate of this point.

Definition at line 296 of file axlPoint.cpp.

 double & axlPoint::x ( void )

Returns x-coordinate of this point.

Definition at line 333 of file axlPoint.cpp.

 double axlPoint::y ( void ) const

Returns y-coordinate of this point.

Definition at line 305 of file axlPoint.cpp.

 double & axlPoint::y ( void )

Returns y-coordinate of this point.

Definition at line 342 of file axlPoint.cpp.

 double axlPoint::z ( void ) const

Returns z-coordinate of this point.

Definition at line 314 of file axlPoint.cpp.

 double & axlPoint::z ( void )

Returns z-coordinate of this point.

Definition at line 351 of file axlPoint.cpp.

## Friends And Related Function Documentation

 QDebug operator<< ( QDebug dbg, axlPoint point )
friend

Definition at line 521 of file axlPoint.cpp.

 QDebug operator<< ( QDebug dbg, axlPoint & point )
friend

Definition at line 528 of file axlPoint.cpp.

 QDebug operator<< ( QDebug dbg, axlPoint * point )
friend

Definition at line 535 of file axlPoint.cpp.

## Property Documentation

 double axlPoint::x

Definition at line 37 of file axlPoint.h.

 double axlPoint::y