Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
gp_XYZ Class Reference

This class describes a cartesian coordinate entity in 3D space {X,Y,Z}. 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. More...

#include <gp_XYZ.hxx>

Inheritance diagram for gp_XYZ:
Inheritance graph
[legend]

Public Member Functions

constexpr gp_XYZ () noexcept
 Creates an XYZ object with zero coordinates (0,0,0)
 
constexpr gp_XYZ (const double theX, const double theY, const double theZ) noexcept
 creates an XYZ with given coordinates
 
constexpr void SetCoord (const double theX, const double theY, const double theZ) noexcept
 For this XYZ object, assigns the values theX, theY and theZ to its three coordinates.
 
constexpr void SetCoord (const int theIndex, const double theXi)
 modifies the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raises OutOfRange if theIndex != {1, 2, 3}.
 
constexpr void SetX (const double theX) noexcept
 Assigns the given value to the X coordinate.
 
constexpr void SetY (const double theY) noexcept
 Assigns the given value to the Y coordinate.
 
constexpr void SetZ (const double theZ) noexcept
 Assigns the given value to the Z coordinate.
 
constexpr double Coord (const int theIndex) const
 returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned
 
constexpr doubleChangeCoord (const int theIndex)
 
constexpr void Coord (double &theX, double &theY, double &theZ) const noexcept
 
constexpr const doubleGetData () const noexcept
 Returns a const ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS!
 
doubleChangeData () noexcept
 Returns a ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS!
 
constexpr double X () const noexcept
 Returns the X coordinate.
 
constexpr double Y () const noexcept
 Returns the Y coordinate.
 
constexpr double Z () const noexcept
 Returns the Z coordinate.
 
double Modulus () const
 Computes std::sqrt(X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this XYZ object.
 
constexpr double SquareModulus () const noexcept
 Computes X*X + Y*Y + Z*Z where X, Y and Z are the three coordinates of this XYZ object.
 
bool IsEqual (const gp_XYZ &theOther, const double theTolerance) const
 Returns True if he coordinates of this XYZ object are equal to the respective coordinates Other, within the specified tolerance theTolerance.
 
constexpr void Add (const gp_XYZ &theOther) noexcept
 
constexpr void operator+= (const gp_XYZ &theOther) noexcept
 
constexpr gp_XYZ Added (const gp_XYZ &theOther) const noexcept
 
constexpr gp_XYZ operator+ (const gp_XYZ &theOther) const noexcept
 
constexpr void Cross (const gp_XYZ &theOther) noexcept
 
constexpr void operator^= (const gp_XYZ &theOther) noexcept
 
constexpr gp_XYZ Crossed (const gp_XYZ &theOther) const noexcept
 
constexpr gp_XYZ operator^ (const gp_XYZ &theOther) const noexcept
 
double CrossMagnitude (const gp_XYZ &theRight) const
 Computes the magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||.
 
constexpr double CrossSquareMagnitude (const gp_XYZ &theRight) const noexcept
 Computes the square magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||**2.
 
constexpr void CrossCross (const gp_XYZ &theCoord1, const gp_XYZ &theCoord2) noexcept
 Triple vector product Computes <me> = <me>.Cross(theCoord1.Cross(theCoord2))
 
constexpr gp_XYZ CrossCrossed (const gp_XYZ &theCoord1, const gp_XYZ &theCoord2) const noexcept
 Triple vector product computes New = <me>.Cross(theCoord1.Cross(theCoord2))
 
constexpr void Divide (const double theScalar)
 divides <me> by a real.
 
constexpr void operator/= (const double theScalar)
 
constexpr gp_XYZ Divided (const double theScalar) const
 divides <me> by a real.
 
constexpr gp_XYZ operator/ (const double theScalar) const
 
constexpr double Dot (const gp_XYZ &theOther) const noexcept
 Computes the scalar product between <me> and theOther.
 
constexpr double operator* (const gp_XYZ &theOther) const noexcept
 
constexpr double DotCross (const gp_XYZ &theCoord1, const gp_XYZ &theCoord2) const noexcept
 Computes the triple scalar product.
 
constexpr void Multiply (const double theScalar) noexcept
 
constexpr void operator*= (const double theScalar) noexcept
 
constexpr void Multiply (const gp_XYZ &theOther) noexcept
 
constexpr void operator*= (const gp_XYZ &theOther) noexcept
 
constexpr void Multiply (const gp_Mat &theMatrix) noexcept
 <me> = theMatrix * <me>
 
constexpr void operator*= (const gp_Mat &theMatrix) noexcept
 
constexpr gp_XYZ Multiplied (const double theScalar) const noexcept
 
constexpr gp_XYZ operator* (const double theScalar) const noexcept
 
constexpr gp_XYZ Multiplied (const gp_XYZ &theOther) const noexcept
 
constexpr gp_XYZ Multiplied (const gp_Mat &theMatrix) const noexcept
 New = theMatrix * <me>
 
constexpr gp_XYZ operator* (const gp_Mat &theMatrix) const noexcept
 
void Normalize ()
 
gp_XYZ Normalized () const
 
constexpr void Reverse () noexcept
 
constexpr gp_XYZ Reversed () const noexcept
 
constexpr void Subtract (const gp_XYZ &theOther) noexcept
 
constexpr void operator-= (const gp_XYZ &theOther) noexcept
 
constexpr gp_XYZ Subtracted (const gp_XYZ &theOther) const noexcept
 
constexpr gp_XYZ operator- (const gp_XYZ &theOther) const noexcept
 
constexpr void SetLinearForm (const double theA1, const gp_XYZ &theXYZ1, const double theA2, const gp_XYZ &theXYZ2, const double theA3, const gp_XYZ &theXYZ3, const gp_XYZ &theXYZ4) noexcept
 <me> is set to the following linear form :
 
constexpr void SetLinearForm (const double theA1, const gp_XYZ &theXYZ1, const double theA2, const gp_XYZ &theXYZ2, const double theA3, const gp_XYZ &theXYZ3) noexcept
 <me> is set to the following linear form :
 
constexpr void SetLinearForm (const double theA1, const gp_XYZ &theXYZ1, const double theA2, const gp_XYZ &theXYZ2, const gp_XYZ &theXYZ3) noexcept
 <me> is set to the following linear form :
 
constexpr void SetLinearForm (const double theA1, const gp_XYZ &theXYZ1, const double theA2, const gp_XYZ &theXYZ2) noexcept
 <me> is set to the following linear form :
 
constexpr void SetLinearForm (const double theA1, const gp_XYZ &theXYZ1, const gp_XYZ &theXYZ2) noexcept
 <me> is set to the following linear form :
 
constexpr void SetLinearForm (const gp_XYZ &theXYZ1, const gp_XYZ &theXYZ2) noexcept
 <me> is set to the following linear form :
 
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
 Dumps the content of me into the stream.
 
bool InitFromJson (const Standard_SStream &theSStream, int &theStreamPos)
 Inits the content of me from the stream.
 

Detailed Description

This class describes a cartesian coordinate entity in 3D space {X,Y,Z}. 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

◆ gp_XYZ() [1/2]

constexpr gp_XYZ::gp_XYZ ( )
inlineconstexprnoexcept

Creates an XYZ object with zero coordinates (0,0,0)

◆ gp_XYZ() [2/2]

constexpr gp_XYZ::gp_XYZ ( const double theX,
const double theY,
const double theZ )
inlineconstexprnoexcept

creates an XYZ with given coordinates

Member Function Documentation

◆ Add()

constexpr void gp_XYZ::Add ( const gp_XYZ & theOther)
inlineconstexprnoexcept
<me>.X() = <me>.X() + theOther.X()
<me>.Y() = <me>.Y() + theOther.Y()
<me>.Z() = <me>.Z() + theOther.Z()
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142

◆ Added()

constexpr gp_XYZ gp_XYZ::Added ( const gp_XYZ & theOther) const
inlineconstexprnoexcept
new.X() = <me>.X() + theOther.X()
new.Y() = <me>.Y() + theOther.Y()
new.Z() = <me>.Z() + theOther.Z()

◆ ChangeCoord()

constexpr double & gp_XYZ::ChangeCoord ( const int theIndex)
inlineconstexpr

◆ ChangeData()

double * gp_XYZ::ChangeData ( )
inlinenoexcept

Returns a ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS!

◆ Coord() [1/2]

constexpr double gp_XYZ::Coord ( const int theIndex) const
inlineconstexpr

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

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

◆ Coord() [2/2]

constexpr void gp_XYZ::Coord ( double & theX,
double & theY,
double & theZ ) const
inlineconstexprnoexcept

◆ Cross()

constexpr void gp_XYZ::Cross ( const gp_XYZ & theOther)
inlineconstexprnoexcept
<me>.X() = <me>.Y() * theOther.Z() - <me>.Z() * theOther.Y()
<me>.Y() = <me>.Z() * theOther.X() - <me>.X() * theOther.Z()
<me>.Z() = <me>.X() * theOther.Y() - <me>.Y() * theOther.X()

◆ CrossCross()

constexpr void gp_XYZ::CrossCross ( const gp_XYZ & theCoord1,
const gp_XYZ & theCoord2 )
inlineconstexprnoexcept

Triple vector product Computes <me> = <me>.Cross(theCoord1.Cross(theCoord2))

◆ CrossCrossed()

constexpr gp_XYZ gp_XYZ::CrossCrossed ( const gp_XYZ & theCoord1,
const gp_XYZ & theCoord2 ) const
inlineconstexprnoexcept

Triple vector product computes New = <me>.Cross(theCoord1.Cross(theCoord2))

◆ Crossed()

constexpr gp_XYZ gp_XYZ::Crossed ( const gp_XYZ & theOther) const
inlineconstexprnoexcept
new.X() = <me>.Y() * theOther.Z() - <me>.Z() * theOther.Y()
new.Y() = <me>.Z() * theOther.X() - <me>.X() * theOther.Z()
new.Z() = <me>.X() * theOther.Y() - <me>.Y() * theOther.X()

◆ CrossMagnitude()

double gp_XYZ::CrossMagnitude ( const gp_XYZ & theRight) const
inline

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

◆ CrossSquareMagnitude()

constexpr double gp_XYZ::CrossSquareMagnitude ( const gp_XYZ & theRight) const
inlineconstexprnoexcept

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

◆ Divide()

constexpr void gp_XYZ::Divide ( const double theScalar)
inlineconstexpr

divides <me> by a real.

◆ Divided()

constexpr gp_XYZ gp_XYZ::Divided ( const double theScalar) const
inlineconstexpr

divides <me> by a real.

◆ Dot()

constexpr double gp_XYZ::Dot ( const gp_XYZ & theOther) const
inlineconstexprnoexcept

Computes the scalar product between <me> and theOther.

◆ DotCross()

constexpr double gp_XYZ::DotCross ( const gp_XYZ & theCoord1,
const gp_XYZ & theCoord2 ) const
inlineconstexprnoexcept

Computes the triple scalar product.

◆ DumpJson()

void gp_XYZ::DumpJson ( Standard_OStream & theOStream,
int theDepth = -1 ) const

Dumps the content of me into the stream.

◆ GetData()

constexpr const double * gp_XYZ::GetData ( ) const
inlineconstexprnoexcept

Returns a const ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS!

◆ InitFromJson()

bool gp_XYZ::InitFromJson ( const Standard_SStream & theSStream,
int & theStreamPos )

Inits the content of me from the stream.

◆ IsEqual()

bool gp_XYZ::IsEqual ( const gp_XYZ & theOther,
const double theTolerance ) const
inline

Returns True if he coordinates of this XYZ object are equal to the respective coordinates Other, within the specified tolerance theTolerance.

◆ Modulus()

double gp_XYZ::Modulus ( ) const
inline

Computes std::sqrt(X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this XYZ object.

◆ Multiplied() [1/3]

constexpr gp_XYZ gp_XYZ::Multiplied ( const double theScalar) const
inlineconstexprnoexcept
New.X() = <me>.X() * theScalar;
New.Y() = <me>.Y() * theScalar;
New.Z() = <me>.Z() * theScalar;

◆ Multiplied() [2/3]

constexpr gp_XYZ gp_XYZ::Multiplied ( const gp_Mat & theMatrix) const
inlineconstexprnoexcept

New = theMatrix * <me>

◆ Multiplied() [3/3]

constexpr gp_XYZ gp_XYZ::Multiplied ( const gp_XYZ & theOther) const
inlineconstexprnoexcept
new.X() = <me>.X() * theOther.X();
new.Y() = <me>.Y() * theOther.Y();
new.Z() = <me>.Z() * theOther.Z();

◆ Multiply() [1/3]

constexpr void gp_XYZ::Multiply ( const double theScalar)
inlineconstexprnoexcept
<me>.X() = <me>.X() * theScalar;
<me>.Y() = <me>.Y() * theScalar;
<me>.Z() = <me>.Z() * theScalar;

◆ Multiply() [2/3]

constexpr void gp_XYZ::Multiply ( const gp_Mat & theMatrix)
inlineconstexprnoexcept

<me> = theMatrix * <me>

◆ Multiply() [3/3]

constexpr void gp_XYZ::Multiply ( const gp_XYZ & theOther)
inlineconstexprnoexcept
<me>.X() = <me>.X() * theOther.X();
<me>.Y() = <me>.Y() * theOther.Y();
<me>.Z() = <me>.Z() * theOther.Z();

◆ Normalize()

void gp_XYZ::Normalize ( )
inline
<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()

gp_XYZ gp_XYZ::Normalized ( ) const
inline
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]

constexpr gp_XYZ gp_XYZ::operator* ( const double theScalar) const
inlineconstexprnoexcept

◆ operator*() [2/3]

constexpr gp_XYZ gp_XYZ::operator* ( const gp_Mat & theMatrix) const
inlineconstexprnoexcept

◆ operator*() [3/3]

constexpr double gp_XYZ::operator* ( const gp_XYZ & theOther) const
inlineconstexprnoexcept

◆ operator*=() [1/3]

constexpr void gp_XYZ::operator*= ( const double theScalar)
inlineconstexprnoexcept

◆ operator*=() [2/3]

constexpr void gp_XYZ::operator*= ( const gp_Mat & theMatrix)
inlineconstexprnoexcept

◆ operator*=() [3/3]

constexpr void gp_XYZ::operator*= ( const gp_XYZ & theOther)
inlineconstexprnoexcept

◆ operator+()

constexpr gp_XYZ gp_XYZ::operator+ ( const gp_XYZ & theOther) const
inlineconstexprnoexcept

◆ operator+=()

constexpr void gp_XYZ::operator+= ( const gp_XYZ & theOther)
inlineconstexprnoexcept

◆ operator-()

constexpr gp_XYZ gp_XYZ::operator- ( const gp_XYZ & theOther) const
inlineconstexprnoexcept

◆ operator-=()

constexpr void gp_XYZ::operator-= ( const gp_XYZ & theOther)
inlineconstexprnoexcept

◆ operator/()

constexpr gp_XYZ gp_XYZ::operator/ ( const double theScalar) const
inlineconstexpr

◆ operator/=()

constexpr void gp_XYZ::operator/= ( const double theScalar)
inlineconstexpr

◆ operator^()

constexpr gp_XYZ gp_XYZ::operator^ ( const gp_XYZ & theOther) const
inlineconstexprnoexcept

◆ operator^=()

constexpr void gp_XYZ::operator^= ( const gp_XYZ & theOther)
inlineconstexprnoexcept

◆ Reverse()

constexpr void gp_XYZ::Reverse ( )
inlineconstexprnoexcept
<me>.X() = -<me>.X()
<me>.Y() = -<me>.Y()
<me>.Z() = -<me>.Z()

◆ Reversed()

constexpr gp_XYZ gp_XYZ::Reversed ( ) const
inlineconstexprnoexcept
New.X() = -<me>.X()
New.Y() = -<me>.Y()
New.Z() = -<me>.Z()

◆ SetCoord() [1/2]

constexpr void gp_XYZ::SetCoord ( const double theX,
const double theY,
const double theZ )
inlineconstexprnoexcept

For this XYZ object, assigns the values theX, theY and theZ to its three coordinates.

◆ SetCoord() [2/2]

constexpr void gp_XYZ::SetCoord ( const int theIndex,
const double theXi )
inlineconstexpr

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

◆ SetLinearForm() [1/6]

constexpr void gp_XYZ::SetLinearForm ( const double theA1,
const gp_XYZ & theXYZ1,
const double theA2,
const gp_XYZ & theXYZ2 )
inlineconstexprnoexcept

<me> is set to the following linear form :

◆ SetLinearForm() [2/6]

constexpr void gp_XYZ::SetLinearForm ( const double theA1,
const gp_XYZ & theXYZ1,
const double theA2,
const gp_XYZ & theXYZ2,
const double theA3,
const gp_XYZ & theXYZ3 )
inlineconstexprnoexcept

<me> is set to the following linear form :

◆ SetLinearForm() [3/6]

constexpr void gp_XYZ::SetLinearForm ( const double theA1,
const gp_XYZ & theXYZ1,
const double theA2,
const gp_XYZ & theXYZ2,
const double theA3,
const gp_XYZ & theXYZ3,
const gp_XYZ & theXYZ4 )
inlineconstexprnoexcept

<me> is set to the following linear form :

◆ SetLinearForm() [4/6]

constexpr void gp_XYZ::SetLinearForm ( const double theA1,
const gp_XYZ & theXYZ1,
const double theA2,
const gp_XYZ & theXYZ2,
const gp_XYZ & theXYZ3 )
inlineconstexprnoexcept

<me> is set to the following linear form :

◆ SetLinearForm() [5/6]

constexpr void gp_XYZ::SetLinearForm ( const double theA1,
const gp_XYZ & theXYZ1,
const gp_XYZ & theXYZ2 )
inlineconstexprnoexcept

<me> is set to the following linear form :

◆ SetLinearForm() [6/6]

constexpr void gp_XYZ::SetLinearForm ( const gp_XYZ & theXYZ1,
const gp_XYZ & theXYZ2 )
inlineconstexprnoexcept

<me> is set to the following linear form :

◆ SetX()

constexpr void gp_XYZ::SetX ( const double theX)
inlineconstexprnoexcept

Assigns the given value to the X coordinate.

◆ SetY()

constexpr void gp_XYZ::SetY ( const double theY)
inlineconstexprnoexcept

Assigns the given value to the Y coordinate.

◆ SetZ()

constexpr void gp_XYZ::SetZ ( const double theZ)
inlineconstexprnoexcept

Assigns the given value to the Z coordinate.

◆ SquareModulus()

constexpr double gp_XYZ::SquareModulus ( ) const
inlineconstexprnoexcept

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

◆ Subtract()

constexpr void gp_XYZ::Subtract ( const gp_XYZ & theOther)
inlineconstexprnoexcept
<me>.X() = <me>.X() - theOther.X()
<me>.Y() = <me>.Y() - theOther.Y()
<me>.Z() = <me>.Z() - theOther.Z()

◆ Subtracted()

constexpr gp_XYZ gp_XYZ::Subtracted ( const gp_XYZ & theOther) const
inlineconstexprnoexcept
new.X() = <me>.X() - theOther.X()
new.Y() = <me>.Y() - theOther.Y()
new.Z() = <me>.Z() - theOther.Z()

◆ X()

constexpr double gp_XYZ::X ( ) const
inlineconstexprnoexcept

Returns the X coordinate.

◆ Y()

constexpr double gp_XYZ::Y ( ) const
inlineconstexprnoexcept

Returns the Y coordinate.

◆ Z()

constexpr double gp_XYZ::Z ( ) const
inlineconstexprnoexcept

Returns the Z coordinate.


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