Open CASCADE Technology  6.9.0
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
 
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...
 
Standard_Real _CSFDB_Getgp_XYZx () const
 
void _CSFDB_Setgp_XYZx (const Standard_Real p)
 
Standard_Real _CSFDB_Getgp_XYZy () const
 
void _CSFDB_Setgp_XYZy (const Standard_Real p)
 
Standard_Real _CSFDB_Getgp_XYZz () const
 
void _CSFDB_Setgp_XYZz (const Standard_Real p)
 

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

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

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

Standard_Real gp_XYZ::_CSFDB_Getgp_XYZx ( ) const
inline
Standard_Real gp_XYZ::_CSFDB_Getgp_XYZy ( ) const
inline
Standard_Real gp_XYZ::_CSFDB_Getgp_XYZz ( ) const
inline
void gp_XYZ::_CSFDB_Setgp_XYZx ( const Standard_Real  p)
inline
void gp_XYZ::_CSFDB_Setgp_XYZy ( const Standard_Real  p)
inline
void gp_XYZ::_CSFDB_Setgp_XYZz ( const Standard_Real  p)
inline
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()

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

Standard_Real& gp_XYZ::ChangeCoord ( const Standard_Integer  theIndex)
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}.

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

void gp_XYZ::CrossCross ( const gp_XYZ Coord1,
const gp_XYZ Coord2 
)

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

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

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

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

Standard_Real gp_XYZ::CrossMagnitude ( const gp_XYZ Right) const

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

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.

void gp_XYZ::Divide ( const Standard_Real  Scalar)

divides <me> by a real.

gp_XYZ gp_XYZ::Divided ( const Standard_Real  Scalar) const

divides <me> by a real.

Standard_Real gp_XYZ::Dot ( const gp_XYZ Other) const

computes the scalar product between <me> and Other

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

computes the triple scalar product

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.

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.

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;.

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();

gp_XYZ gp_XYZ::Multiplied ( const gp_Mat Matrix) const

New = Matrix * <me>

void gp_XYZ::Multiply ( const Standard_Real  Scalar)

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

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();

void gp_XYZ::Multiply ( const gp_Mat Matrix)

<me> = Matrix * <me>

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

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.

Standard_Real gp_XYZ::operator* ( const gp_XYZ Other) const
inline
gp_XYZ gp_XYZ::operator* ( const Standard_Real  Scalar) const
inline
gp_XYZ gp_XYZ::operator* ( const gp_Mat Matrix) const
inline
void gp_XYZ::operator*= ( const Standard_Real  Scalar)
inline
void gp_XYZ::operator*= ( const gp_XYZ Other)
inline
void gp_XYZ::operator*= ( const gp_Mat Matrix)
inline
gp_XYZ gp_XYZ::operator+ ( const gp_XYZ Other) const
inline
void gp_XYZ::operator+= ( const gp_XYZ Other)
inline
gp_XYZ gp_XYZ::operator- ( const gp_XYZ Right) const
inline
void gp_XYZ::operator-= ( const gp_XYZ Right)
inline
gp_XYZ gp_XYZ::operator/ ( const Standard_Real  Scalar) const
inline
void gp_XYZ::operator/= ( const Standard_Real  Scalar)
inline
gp_XYZ gp_XYZ::operator^ ( const gp_XYZ Right) const
inline
void gp_XYZ::operator^= ( const gp_XYZ Right)
inline
void gp_XYZ::Reverse ( )

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

gp_XYZ gp_XYZ::Reversed ( ) const

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

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.

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}.

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

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

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

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

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

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

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

void gp_XYZ::SetX ( const Standard_Real  X)

Assigns the given value to the X coordinate.

void gp_XYZ::SetY ( const Standard_Real  Y)

Assigns the given value to the Y coordinate.

void gp_XYZ::SetZ ( const Standard_Real  Z)

Assigns the given value to the Z coordinate.

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.

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

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

Standard_Real gp_XYZ::X ( ) const

Returns the X coordinate.

Standard_Real gp_XYZ::Y ( ) const

Returns the Y coordinate.

Standard_Real gp_XYZ::Z ( ) const

Returns the Z coordinate.


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