OpenLexocad  27.0
Geom::XYZ Class Reference

#include <XYZ.h>

Public Member Functions

 XYZ ()
 creates an indefinite XYZ.
More...
 
 XYZ (const double X, const double Y, const double Z)
 modification of the XYZ coordinates
More...
 
void setCoord (const double X, const double Y, const double Z)
 
void setCoord (const int Index, const double Xi)
 
void setX (const double X)
 Assigns the given value to the X coordinate of this number triple.
More...
 
void setY (const double Y)
 Assigns the given value to the Y coordinate of this number triple.
More...
 
void setZ (const double Z)
 Assigns the given value to ther Z coordinate of this number triple.
More...
 
double coord (const int Index) const
 
void coord (double &X, double &Y, double &Z) const
 
double x () const
 Returns the X, Y, or Z coordinate of this number triple.
More...
 
double y () const
 Returns the X, Y, or Z coordinate of this number triple.
More...
 
double z () const
 Returns the X, Y, or Z coordinate of this number triple.
More...
 
double modulus () const
 computes Sqrt (X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this number triple.
More...
 
double squareModulus () const
 Computes X*X + Y*Y + Z*Z where X, Y and Z are the three coordinates of this number triple.
More...
 
bool isEqual (const XYZ &Other, const double Tolerance) const
 
void add (const XYZ &Other)
 
void operator+= (const XYZ &Other)
 
XYZ added (const XYZ &Other) const
 
XYZ operator+ (const XYZ &Other) const
 
void cross (const XYZ &Right)
 
void operator^= (const XYZ &Right)
 
XYZ crossed (const XYZ &Right) const
 
XYZ operator^ (const XYZ &Right) const
 
double crossMagnitude (const XYZ &Right) const
 
double crossSquareMagnitude (const XYZ &Right) const
 
void crossCross (const XYZ &Coord1, const XYZ &Coord2)
 
XYZ crossCrossed (const XYZ &Coord1, const XYZ &Coord2) const
 
void divide (const double Scalar)
 divides <me> by a real.
More...
 
void operator/= (const double Scalar)
 
XYZ divided (const double Scalar) const
 divides <me> by a real.
More...
 
XYZ operator/ (const double Scalar) const
 
double dot (const XYZ &Other) const
 computes the scalar product between <me> and Other
More...
 
double operator * (const XYZ &Other) const
 
double dotCross (const XYZ &Coord1, const XYZ &Coord2) const
 computes the triple scalar product.
More...
 
void multiply (const double Scalar)
 
void operator *= (const double Scalar)
 
void multiply (const XYZ &Other)
 
void operator *= (const XYZ &Other)
 
void multiply (const Geom::Mat &Matrix)
 
void operator *= (const Geom::Mat &Matrix)
 
XYZ multiplied (const double Scalar) const
 <me> = Matrix * <me>
More...
 
XYZ operator * (const double Scalar) const
 
XYZ multiplied (const XYZ &Other) const
 
XYZ multiplied (const Geom::Mat &Matrix) const
 New = Matrix * <me>
More...
 
XYZ operator * (const Geom::Mat &Matrix) const
 
void normalize ()
 
XYZ normalized () const
 
void reverse ()
 
XYZ reversed () const
 
void subtract (const XYZ &Right)
 
void operator-= (const XYZ &Right)
 
XYZ subtracted (const XYZ &Right) const
 
XYZ operator- (const XYZ &Right) const
 
void setLinearForm (const double A1, const XYZ &XYZ1, const double A2, const XYZ &XYZ2, const double A3, const XYZ &XYZ3, const XYZ &XYZ4)
 
void setLinearForm (const double A1, const XYZ &XYZ1, const double A2, const XYZ &XYZ2, const double A3, const XYZ &XYZ3)
 
void setLinearForm (const double A1, const XYZ &XYZ1, const double A2, const XYZ &XYZ2, const XYZ &XYZ3)
 
void setLinearForm (const double A1, const XYZ &XYZ1, const double A2, const XYZ &XYZ2)
 
void setLinearForm (const double A1, const XYZ &XYZ1, const XYZ &XYZ2)
 
void setLinearForm (const XYZ &Left, const XYZ &Right)
 
double & operator[] (int i)
 
const double & operator[] (int i) const
 
bool operator< (const XYZ &rhs) const
 

Detailed Description

This class describes a Cartesian coordinate entity in
3D space {X,Y,Z}. This class is non-persistent. This entity is
used for algebraic calculation. This entity can be transformed
with a "Trsf" or a "GTrsf" from package "gp".
It is used in vectorial computations or for holding this type
of information in data structures.

Constructor & Destructor Documentation

◆ XYZ() [1/2]

Geom::XYZ::XYZ ( )

creates an indefinite XYZ.

◆ XYZ() [2/2]

Geom::XYZ::XYZ ( const double  X,
const double  Y,
const double  Z 
)

modification of the XYZ coordinates

Member Function Documentation

◆ add()

void Geom::XYZ::add ( const XYZ &  Other)

<me>.X() = <me>.X() + Other.X()
<me>.Y() = <me>.Y() + Other.Y()
<me>.Z() = <me>.Z() + Other.Z()

◆ added()

XYZ Geom::XYZ::added ( const XYZ &  Other) const

new.X() = <me>.X() + Other.X()
new.Y() = <me>.Y() + Other.Y()
new.Z() = <me>.Z() + Other.Z()

◆ coord() [1/2]

double Geom::XYZ::coord ( const int  Index) const

returns the coordinate of range Index :
Index = 1 => X is returned
Index = 2 => Y is returned
Index = 3 => Z is returned

Raises OutOfRange if Index != {1, 2, 3}.

◆ coord() [2/2]

void Geom::XYZ::coord ( double &  X,
double &  Y,
double &  Z 
) const

◆ cross()

void Geom::XYZ::cross ( const XYZ &  Right)

<me>.X() = <me>.Y() * Other.Z() - <me>.Z() * Other.Y()
<me>.Y() = <me>.Z() * Other.X() - <me>.X() * Other.Z()
<me>.Z() = <me>.X() * Other.Y() - <me>.Y() * Other.X()

◆ crossCross()

void Geom::XYZ::crossCross ( const XYZ &  Coord1,
const XYZ &  Coord2 
)

Triple vector product
Computes <me> = <me>.Cross(Coord1.Cross(Coord2))

◆ crossCrossed()

XYZ Geom::XYZ::crossCrossed ( const XYZ &  Coord1,
const XYZ &  Coord2 
) const

Triple vector product
computes New = <me>.Cross(Coord1.Cross(Coord2))

◆ crossed()

XYZ Geom::XYZ::crossed ( const XYZ &  Right) const

new.X() = <me>.Y() * Other.Z() - <me>.Z() * Other.Y()
new.Y() = <me>.Z() * Other.X() - <me>.X() * Other.Z()
new.Z() = <me>.X() * Other.Y() - <me>.Y() * Other.X()

◆ crossMagnitude()

double Geom::XYZ::crossMagnitude ( const XYZ &  Right) const

Computes the magnitude of the cross product between <me> and
Right. Returns || <me> ^ Right ||

◆ crossSquareMagnitude()

double Geom::XYZ::crossSquareMagnitude ( const XYZ &  Right) const

Computes the square magnitude of the cross product between <me> and
Right. Returns || <me> ^ Right ||**2

◆ divide()

void Geom::XYZ::divide ( const double  Scalar)

divides <me> by a real.

◆ divided()

XYZ Geom::XYZ::divided ( const double  Scalar) const

divides <me> by a real.

◆ dot()

double Geom::XYZ::dot ( const XYZ &  Other) const

computes the scalar product between <me> and Other

◆ dotCross()

double Geom::XYZ::dotCross ( const XYZ &  Coord1,
const XYZ &  Coord2 
) const

computes the triple scalar product.

◆ isEqual()

bool Geom::XYZ::isEqual ( const XYZ &  Other,
const double  Tolerance 
) const

Returns True if he coordinates of this number triple are
equal to the respective coordinates of the number triple
Other, within the specified tolerance Tolerance. I.e.:
abs(<me>.X() - Other.X()) <= Tolerance and
abs(<me>.Y() - Other.Y()) <= Tolerance and
abs(<me>.Z() - Other.Z()) <= Tolerance.

◆ modulus()

double Geom::XYZ::modulus ( ) const

computes Sqrt (X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this number triple.

◆ multiplied() [1/3]

XYZ Geom::XYZ::multiplied ( const double  Scalar) const

<me> = Matrix * <me>

New.X() = <me>.X() * Scalar;
New.Y() = <me>.Y() * Scalar;
New.Z() = <me>.Z() * Scalar;

◆ multiplied() [2/3]

XYZ Geom::XYZ::multiplied ( const XYZ &  Other) const

new.X() = <me>.X() * Other.X();
new.Y() = <me>.Y() * Other.Y();
new.Z() = <me>.Z() * Other.Z();

◆ multiplied() [3/3]

XYZ Geom::XYZ::multiplied ( const Geom::Mat &  Matrix) const

New = Matrix * <me>

◆ multiply() [1/3]

void Geom::XYZ::multiply ( const double  Scalar)

<me>.X() = <me>.X() * Scalar;
<me>.Y() = <me>.Y() * Scalar;
<me>.Z() = <me>.Z() * Scalar;

◆ multiply() [2/3]

void Geom::XYZ::multiply ( const XYZ &  Other)

<me>.X() = <me>.X() * Other.X();
<me>.Y() = <me>.Y() * Other.Y();
<me>.Z() = <me>.Z() * Other.Z();

◆ multiply() [3/3]

void Geom::XYZ::multiply ( const Geom::Mat &  Matrix)

◆ normalize()

void Geom::XYZ::normalize ( )

<me>.X() = <me>.X()/ <me>.Modulus()
<me>.Y() = <me>.Y()/ <me>.Modulus()
<me>.Z() = <me>.Z()/ <me>.Modulus()
//! Raised if <me>.Modulus() <= Resolution from gp

◆ normalized()

XYZ Geom::XYZ::normalized ( ) const

New.X() = <me>.X()/ <me>.Modulus()
New.Y() = <me>.Y()/ <me>.Modulus()
New.Z() = <me>.Z()/ <me>.Modulus()
//! Raised if <me>.Modulus() <= Resolution from gp

◆ operator *() [1/3]

double Geom::XYZ::operator * ( const XYZ &  Other) const
inline

◆ operator *() [2/3]

XYZ Geom::XYZ::operator * ( const double  Scalar) const
inline

◆ operator *() [3/3]

XYZ Geom::XYZ::operator * ( const Geom::Mat &  Matrix) const
inline

◆ operator *=() [1/3]

void Geom::XYZ::operator *= ( const double  Scalar)
inline

◆ operator *=() [2/3]

void Geom::XYZ::operator *= ( const XYZ &  Other)
inline

◆ operator *=() [3/3]

void Geom::XYZ::operator *= ( const Geom::Mat &  Matrix)
inline

◆ operator+()

XYZ Geom::XYZ::operator+ ( const XYZ &  Other) const
inline

◆ operator+=()

void Geom::XYZ::operator+= ( const XYZ &  Other)
inline

◆ operator-()

XYZ Geom::XYZ::operator- ( const XYZ &  Right) const
inline

◆ operator-=()

void Geom::XYZ::operator-= ( const XYZ &  Right)
inline

◆ operator/()

XYZ Geom::XYZ::operator/ ( const double  Scalar) const
inline

◆ operator/=()

void Geom::XYZ::operator/= ( const double  Scalar)
inline

◆ operator<()

bool Geom::XYZ::operator< ( const XYZ &  rhs) const

◆ operator[]() [1/2]

double& Geom::XYZ::operator[] ( int  i)

◆ operator[]() [2/2]

const double& Geom::XYZ::operator[] ( int  i) const

◆ operator^()

XYZ Geom::XYZ::operator^ ( const XYZ &  Right) const
inline

◆ operator^=()

void Geom::XYZ::operator^= ( const XYZ &  Right)
inline

◆ reverse()

void Geom::XYZ::reverse ( )

<me>.X() = -<me>.X()
<me>.Y() = -<me>.Y()
<me>.Z() = -<me>.Z()

◆ reversed()

XYZ Geom::XYZ::reversed ( ) const

New.X() = -<me>.X()
New.Y() = -<me>.Y()
New.Z() = -<me>.Z()

◆ setCoord() [1/2]

void Geom::XYZ::setCoord ( const double  X,
const double  Y,
const double  Z 
)

For this number triple, assigns
the values X, Y and Z to its three coordinates

◆ setCoord() [2/2]

void Geom::XYZ::setCoord ( const int  Index,
const double  Xi 
)

modifies the coordinate of range Index
Index = 1 => X is modified
Index = 2 => Y is modified
Index = 3 => Z is modified
Raises OutOfRange if Index != {1, 2, 3}.

◆ setLinearForm() [1/6]

void Geom::XYZ::setLinearForm ( const double  A1,
const XYZ &  XYZ1,
const double  A2,
const XYZ &  XYZ2,
const double  A3,
const XYZ &  XYZ3,
const XYZ &  XYZ4 
)

<me> is setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3 + XYZ4

◆ setLinearForm() [2/6]

void Geom::XYZ::setLinearForm ( const double  A1,
const XYZ &  XYZ1,
const double  A2,
const XYZ &  XYZ2,
const double  A3,
const XYZ &  XYZ3 
)

<me> is setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3

◆ setLinearForm() [3/6]

void Geom::XYZ::setLinearForm ( const double  A1,
const XYZ &  XYZ1,
const double  A2,
const XYZ &  XYZ2,
const XYZ &  XYZ3 
)

<me> is setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2 + XYZ3

◆ setLinearForm() [4/6]

void Geom::XYZ::setLinearForm ( const double  A1,
const XYZ &  XYZ1,
const double  A2,
const XYZ &  XYZ2 
)

<me> is setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2

◆ setLinearForm() [5/6]

void Geom::XYZ::setLinearForm ( const double  A1,
const XYZ &  XYZ1,
const XYZ &  XYZ2 
)

<me> is setted to the following linear form :
A1 * XYZ1 + XYZ2

◆ setLinearForm() [6/6]

void Geom::XYZ::setLinearForm ( const XYZ &  Left,
const XYZ &  Right 
)

◆ setX()

void Geom::XYZ::setX ( const double  X)

Assigns the given value to the X coordinate of this number triple.

◆ setY()

void Geom::XYZ::setY ( const double  Y)

Assigns the given value to the Y coordinate of this number triple.

◆ setZ()

void Geom::XYZ::setZ ( const double  Z)

Assigns the given value to ther Z coordinate of this number triple.

◆ squareModulus()

double Geom::XYZ::squareModulus ( ) const

Computes X*X + Y*Y + Z*Z where X, Y and Z are the three coordinates of this number triple.

◆ subtract()

void Geom::XYZ::subtract ( const XYZ &  Right)

<me>.X() = <me>.X() - Other.X()
<me>.Y() = <me>.Y() - Other.Y()
<me>.Z() = <me>.Z() - Other.Z()

◆ subtracted()

XYZ Geom::XYZ::subtracted ( const XYZ &  Right) const

new.X() = <me>.X() - Other.X()
new.Y() = <me>.Y() - Other.Y()
new.Z() = <me>.Z() - Other.Z()

◆ x()

double Geom::XYZ::x ( ) const

Returns the X, Y, or Z coordinate of this number triple.

◆ y()

double Geom::XYZ::y ( ) const

Returns the X, Y, or Z coordinate of this number triple.

◆ z()

double Geom::XYZ::z ( ) const

Returns the X, Y, or Z coordinate of this number triple.


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