Open CASCADE Technology  7.3.1.dev
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

 gp_XYZ ()
 Creates an XYZ object with zero co-ordinates (0,0,0) More...
 
 gp_XYZ (const Standard_Real X, const Standard_Real Y, const Standard_Real Z)
 creates an XYZ with given coordinates More...
 
void SetCoord (const Standard_Real X, const Standard_Real Y, const Standard_Real Z)
 For this XYZ object, assigns the values X, Y and Z to its three coordinates. More...
 
void SetCoord (const Standard_Integer Index, const Standard_Real 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}. More...
 
void SetX (const Standard_Real X)
 Assigns the given value to the X coordinate. More...
 
void SetY (const Standard_Real Y)
 Assigns the given value to the Y coordinate. More...
 
void SetZ (const Standard_Real Z)
 Assigns the given value to the Z coordinate. More...
 
Standard_Real Coord (const Standard_Integer Index) const
 returns the coordinate of range Index : Index = 1 => X is returned Index = 2 => Y is returned Index = 3 => Z is returned More...
 
Standard_RealChangeCoord (const Standard_Integer theIndex)
 
void Coord (Standard_Real &X, Standard_Real &Y, Standard_Real &Z) const
 
const Standard_RealGetData () const
 Returns a const ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS! More...
 
Standard_RealChangeData ()
 Returns a ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS! More...
 
Standard_Real X () const
 Returns the X coordinate. More...
 
Standard_Real Y () const
 Returns the Y coordinate. More...
 
Standard_Real Z () const
 Returns the Z coordinate. More...
 
Standard_Real Modulus () const
 computes Sqrt (X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this XYZ object. More...
 
Standard_Real SquareModulus () const
 Computes X*X + Y*Y + Z*Z where X, Y and Z are the three coordinates of this XYZ object. More...
 
Standard_Boolean IsEqual (const gp_XYZ &Other, const Standard_Real Tolerance) const
 Returns True if he coordinates of this XYZ object are equal to the respective coordinates 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. More...
 
void Add (const gp_XYZ &Other)
 <me>.X() = <me>.X() + Other.X() <me>.Y() = <me>.Y() + Other.Y() <me>.Z() = <me>.Z() + Other.Z() More...
 
void operator+= (const gp_XYZ &Other)
 
gp_XYZ Added (const gp_XYZ &Other) const
 new.X() = <me>.X() + Other.X() new.Y() = <me>.Y() + Other.Y() new.Z() = <me>.Z() + Other.Z() More...
 
gp_XYZ operator+ (const gp_XYZ &Other) const
 
void Cross (const gp_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() More...
 
void operator^= (const gp_XYZ &Right)
 
gp_XYZ Crossed (const gp_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() More...
 
gp_XYZ operator^ (const gp_XYZ &Right) const
 
Standard_Real CrossMagnitude (const gp_XYZ &Right) const
 Computes the magnitude of the cross product between <me> and Right. Returns || <me> ^ Right ||. More...
 
Standard_Real CrossSquareMagnitude (const gp_XYZ &Right) const
 Computes the square magnitude of the cross product between <me> and Right. Returns || <me> ^ Right ||**2. More...
 
void CrossCross (const gp_XYZ &Coord1, const gp_XYZ &Coord2)
 Triple vector product Computes <me> = <me>.Cross(Coord1.Cross(Coord2)) More...
 
gp_XYZ CrossCrossed (const gp_XYZ &Coord1, const gp_XYZ &Coord2) const
 Triple vector product computes New = <me>.Cross(Coord1.Cross(Coord2)) More...
 
void Divide (const Standard_Real Scalar)
 divides <me> by a real. More...
 
void operator/= (const Standard_Real Scalar)
 
gp_XYZ Divided (const Standard_Real Scalar) const
 divides <me> by a real. More...
 
gp_XYZ operator/ (const Standard_Real Scalar) const
 
Standard_Real Dot (const gp_XYZ &Other) const
 computes the scalar product between <me> and Other More...
 
Standard_Real operator* (const gp_XYZ &Other) const
 
Standard_Real DotCross (const gp_XYZ &Coord1, const gp_XYZ &Coord2) const
 computes the triple scalar product More...
 
void Multiply (const Standard_Real Scalar)
 <me>.X() = <me>.X() * Scalar; <me>.Y() = <me>.Y() * Scalar; <me>.Z() = <me>.Z() * Scalar; More...
 
void operator*= (const Standard_Real Scalar)
 
void Multiply (const gp_XYZ &Other)
 <me>.X() = <me>.X() * Other.X(); <me>.Y() = <me>.Y() * Other.Y(); <me>.Z() = <me>.Z() * Other.Z(); More...
 
void operator*= (const gp_XYZ &Other)
 
void Multiply (const gp_Mat &Matrix)
 <me> = Matrix * <me> More...
 
void operator*= (const gp_Mat &Matrix)
 
gp_XYZ Multiplied (const Standard_Real Scalar) const
 New.X() = <me>.X() * Scalar; New.Y() = <me>.Y() * Scalar; New.Z() = <me>.Z() * Scalar;. More...
 
gp_XYZ operator* (const Standard_Real Scalar) const
 
gp_XYZ Multiplied (const gp_XYZ &Other) const
 new.X() = <me>.X() * Other.X(); new.Y() = <me>.Y() * Other.Y(); new.Z() = <me>.Z() * Other.Z(); More...
 
gp_XYZ Multiplied (const gp_Mat &Matrix) const
 New = Matrix * <me> More...
 
gp_XYZ operator* (const gp_Mat &Matrix) const
 
void 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 More...
 
gp_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. More...
 
void Reverse ()
 <me>.X() = -<me>.X() <me>.Y() = -<me>.Y() <me>.Z() = -<me>.Z() More...
 
gp_XYZ Reversed () const
 New.X() = -<me>.X() New.Y() = -<me>.Y() New.Z() = -<me>.Z() More...
 
void Subtract (const gp_XYZ &Right)
 <me>.X() = <me>.X() - Other.X() <me>.Y() = <me>.Y() - Other.Y() <me>.Z() = <me>.Z() - Other.Z() More...
 
void operator-= (const gp_XYZ &Right)
 
gp_XYZ Subtracted (const gp_XYZ &Right) const
 new.X() = <me>.X() - Other.X() new.Y() = <me>.Y() - Other.Y() new.Z() = <me>.Z() - Other.Z() More...
 
gp_XYZ operator- (const gp_XYZ &Right) const
 
void SetLinearForm (const Standard_Real A1, const gp_XYZ &XYZ1, const Standard_Real A2, const gp_XYZ &XYZ2, const Standard_Real A3, const gp_XYZ &XYZ3, const gp_XYZ &XYZ4)
 <me> is set to the following linear form : A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3 + XYZ4 More...
 
void SetLinearForm (const Standard_Real A1, const gp_XYZ &XYZ1, const Standard_Real A2, const gp_XYZ &XYZ2, const Standard_Real A3, const gp_XYZ &XYZ3)
 <me> is set to the following linear form : A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3 More...
 
void SetLinearForm (const Standard_Real A1, const gp_XYZ &XYZ1, const Standard_Real A2, const gp_XYZ &XYZ2, const gp_XYZ &XYZ3)
 <me> is set to the following linear form : A1 * XYZ1 + A2 * XYZ2 + XYZ3 More...
 
void SetLinearForm (const Standard_Real A1, const gp_XYZ &XYZ1, const Standard_Real A2, const gp_XYZ &XYZ2)
 <me> is set to the following linear form : A1 * XYZ1 + A2 * XYZ2 More...
 
void SetLinearForm (const Standard_Real A1, const gp_XYZ &XYZ1, const gp_XYZ &XYZ2)
 <me> is set to the following linear form : A1 * XYZ1 + XYZ2 More...
 
void SetLinearForm (const gp_XYZ &XYZ1, const gp_XYZ &XYZ2)
 <me> is set to the following linear form : XYZ1 + XYZ2 More...
 

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]

gp_XYZ::gp_XYZ ( )

Creates an XYZ object with zero co-ordinates (0,0,0)

◆ gp_XYZ() [2/2]

gp_XYZ::gp_XYZ ( const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  Z 
)

creates an XYZ with given coordinates

Member Function Documentation

◆ Add()

void gp_XYZ::Add ( const gp_XYZ Other)

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

◆ Added()

gp_XYZ gp_XYZ::Added ( const gp_XYZ Other) const

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

◆ ChangeCoord()

Standard_Real& gp_XYZ::ChangeCoord ( const Standard_Integer  theIndex)

◆ ChangeData()

Standard_Real* gp_XYZ::ChangeData ( )
inline

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

◆ Coord() [1/2]

Standard_Real gp_XYZ::Coord ( const Standard_Integer  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 gp_XYZ::Coord ( Standard_Real X,
Standard_Real Y,
Standard_Real Z 
) const

◆ Cross()

void gp_XYZ::Cross ( const gp_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 gp_XYZ::CrossCross ( const gp_XYZ Coord1,
const gp_XYZ Coord2 
)

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

◆ CrossCrossed()

gp_XYZ gp_XYZ::CrossCrossed ( const gp_XYZ Coord1,
const gp_XYZ Coord2 
) const

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

◆ Crossed()

gp_XYZ gp_XYZ::Crossed ( const gp_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()

Standard_Real gp_XYZ::CrossMagnitude ( const gp_XYZ Right) const

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

◆ CrossSquareMagnitude()

Standard_Real gp_XYZ::CrossSquareMagnitude ( const gp_XYZ Right) const

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

◆ Divide()

void gp_XYZ::Divide ( const Standard_Real  Scalar)

divides <me> by a real.

◆ Divided()

gp_XYZ gp_XYZ::Divided ( const Standard_Real  Scalar) const

divides <me> by a real.

◆ Dot()

Standard_Real gp_XYZ::Dot ( const gp_XYZ Other) const

computes the scalar product between <me> and Other

◆ DotCross()

Standard_Real gp_XYZ::DotCross ( const gp_XYZ Coord1,
const gp_XYZ Coord2 
) const

computes the triple scalar product

◆ GetData()

const Standard_Real* gp_XYZ::GetData ( ) const
inline

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

◆ IsEqual()

Standard_Boolean gp_XYZ::IsEqual ( const gp_XYZ Other,
const Standard_Real  Tolerance 
) const

Returns True if he coordinates of this XYZ object are equal to the respective coordinates 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()

Standard_Real gp_XYZ::Modulus ( ) const

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

◆ Multiplied() [1/3]

gp_XYZ gp_XYZ::Multiplied ( const Standard_Real  Scalar) const

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

◆ Multiplied() [2/3]

gp_XYZ gp_XYZ::Multiplied ( const gp_XYZ Other) const

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

◆ Multiplied() [3/3]

gp_XYZ gp_XYZ::Multiplied ( const gp_Mat Matrix) const

New = Matrix * <me>

◆ Multiply() [1/3]

void gp_XYZ::Multiply ( const Standard_Real  Scalar)

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

◆ Multiply() [2/3]

void gp_XYZ::Multiply ( const gp_XYZ Other)

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

◆ Multiply() [3/3]

void gp_XYZ::Multiply ( const gp_Mat Matrix)

<me> = Matrix * <me>

◆ Normalize()

void gp_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()

gp_XYZ gp_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]

Standard_Real gp_XYZ::operator* ( const gp_XYZ Other) const
inline

◆ operator*() [2/3]

gp_XYZ gp_XYZ::operator* ( const Standard_Real  Scalar) const
inline

◆ operator*() [3/3]

gp_XYZ gp_XYZ::operator* ( const gp_Mat Matrix) const
inline

◆ operator*=() [1/3]

void gp_XYZ::operator*= ( const Standard_Real  Scalar)
inline

◆ operator*=() [2/3]

void gp_XYZ::operator*= ( const gp_XYZ Other)
inline

◆ operator*=() [3/3]

void gp_XYZ::operator*= ( const gp_Mat Matrix)
inline

◆ operator+()

gp_XYZ gp_XYZ::operator+ ( const gp_XYZ Other) const
inline

◆ operator+=()

void gp_XYZ::operator+= ( const gp_XYZ Other)
inline

◆ operator-()

gp_XYZ gp_XYZ::operator- ( const gp_XYZ Right) const
inline

◆ operator-=()

void gp_XYZ::operator-= ( const gp_XYZ Right)
inline

◆ operator/()

gp_XYZ gp_XYZ::operator/ ( const Standard_Real  Scalar) const
inline

◆ operator/=()

void gp_XYZ::operator/= ( const Standard_Real  Scalar)
inline

◆ operator^()

gp_XYZ gp_XYZ::operator^ ( const gp_XYZ Right) const
inline

◆ operator^=()

void gp_XYZ::operator^= ( const gp_XYZ Right)
inline

◆ Reverse()

void gp_XYZ::Reverse ( )

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

◆ Reversed()

gp_XYZ gp_XYZ::Reversed ( ) const

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

◆ SetCoord() [1/2]

void gp_XYZ::SetCoord ( const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  Z 
)

For this XYZ object, assigns the values X, Y and Z to its three coordinates.

◆ SetCoord() [2/2]

void gp_XYZ::SetCoord ( const Standard_Integer  Index,
const Standard_Real  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 gp_XYZ::SetLinearForm ( const Standard_Real  A1,
const gp_XYZ XYZ1,
const Standard_Real  A2,
const gp_XYZ XYZ2,
const Standard_Real  A3,
const gp_XYZ XYZ3,
const gp_XYZ XYZ4 
)

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

◆ SetLinearForm() [2/6]

void gp_XYZ::SetLinearForm ( const Standard_Real  A1,
const gp_XYZ XYZ1,
const Standard_Real  A2,
const gp_XYZ XYZ2,
const Standard_Real  A3,
const gp_XYZ XYZ3 
)

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

◆ SetLinearForm() [3/6]

void gp_XYZ::SetLinearForm ( const Standard_Real  A1,
const gp_XYZ XYZ1,
const Standard_Real  A2,
const gp_XYZ XYZ2,
const gp_XYZ XYZ3 
)

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

◆ SetLinearForm() [4/6]

void gp_XYZ::SetLinearForm ( const Standard_Real  A1,
const gp_XYZ XYZ1,
const Standard_Real  A2,
const gp_XYZ XYZ2 
)

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

◆ SetLinearForm() [5/6]

void gp_XYZ::SetLinearForm ( const Standard_Real  A1,
const gp_XYZ XYZ1,
const gp_XYZ XYZ2 
)

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

◆ SetLinearForm() [6/6]

void gp_XYZ::SetLinearForm ( const gp_XYZ XYZ1,
const gp_XYZ XYZ2 
)

<me> is set to the following linear form : XYZ1 + XYZ2

◆ SetX()

void gp_XYZ::SetX ( const Standard_Real  X)

Assigns the given value to the X coordinate.

◆ SetY()

void gp_XYZ::SetY ( const Standard_Real  Y)

Assigns the given value to the Y coordinate.

◆ SetZ()

void gp_XYZ::SetZ ( const Standard_Real  Z)

Assigns the given value to the Z coordinate.

◆ SquareModulus()

Standard_Real gp_XYZ::SquareModulus ( ) const

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

◆ Subtract()

void gp_XYZ::Subtract ( const gp_XYZ Right)

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

◆ Subtracted()

gp_XYZ gp_XYZ::Subtracted ( const gp_XYZ Right) const

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

◆ X()

Standard_Real gp_XYZ::X ( ) const

Returns the X coordinate.

◆ Y()

Standard_Real gp_XYZ::Y ( ) const

Returns the Y coordinate.

◆ Z()

Standard_Real gp_XYZ::Z ( ) const

Returns the Z coordinate.


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