OCC Main Page | FoundationClasses | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

FoundationClasses
TKMath
gp


gp_XYZ Class Reference

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

#include <gp_XYZ.hxx>

Inheritance diagram for gp_XYZ:

Inheritance graph
[legend]

Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
 gp_XYZ ()
 creates an indefinite XYZ.

 gp_XYZ (const Standard_Real X, const Standard_Real Y, const Standard_Real Z)
 modification of the XYZ coordinates

void SetCoord (const Standard_Real X, const Standard_Real Y, const Standard_Real Z)
 For this number triple, assigns
the values X, Y and Z to its three coordinates
.
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}.

void SetX (const Standard_Real X)
 Assigns the given value to the X coordinate of this number triple.
.
void SetY (const Standard_Real Y)
 Assigns the given value to the Y coordinate of this number triple.
.
void SetZ (const Standard_Real Z)
 Assigns the given value to ther Z coordinate of this number triple.
.
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

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

void Coord (Standard_Real &X, Standard_Real &Y, Standard_Real &Z) const
Standard_Real X () const
 Returns the X, Y, or Z coordinate of this number triple.
.
Standard_Real Y () const
 Returns the X, Y, or Z coordinate of this number triple.
.
Standard_Real Z () const
 Returns the X, Y, or Z coordinate of this number triple.
.
Standard_Real Modulus () const
 computes Sqrt (X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this number triple.

Standard_Real SquareModulus () const
 Computes X*X + Y*Y + Z*Z where X, Y and Z are the three coordinates of this number triple.
.
Standard_EXPORT Standard_Boolean IsEqual (const gp_XYZ &Other, const Standard_Real 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.
.
void Add (const gp_XYZ &Other)
 <me>.X() = <me>.X() + Other.X()
<me>.Y() = <me>.Y() + Other.Y()
<me>.Z() = <me>.Z() + Other.Z()

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

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

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

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 ||
.
Standard_Real CrossSquareMagnitude (const gp_XYZ &Right) const
 Computes the square magnitude of the cross product between <me> and
Right. Returns || <me> ^ Right ||**2
.
void CrossCross (const gp_XYZ &Coord1, const gp_XYZ &Coord2)
 Triple vector product
Computes <me> = <me>.Cross(Coord1.Cross(Coord2))
.
gp_XYZ CrossCrossed (const gp_XYZ &Coord1, const gp_XYZ &Coord2) const
 Triple vector product
computes New = <me>.Cross(Coord1.Cross(Coord2))
.
void Divide (const Standard_Real Scalar)
 divides <me> by a real.

void operator/= (const Standard_Real Scalar)
gp_XYZ Divided (const Standard_Real Scalar) const
 divides <me> by a real.

gp_XYZ operator/ (const Standard_Real Scalar) const
Standard_Real Dot (const gp_XYZ &Other) const
 computes the scalar product between <me> and Other

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.

void Multiply (const Standard_Real Scalar)
 <me>.X() = <me>.X() * Scalar;
<me>.Y() = <me>.Y() * Scalar;
<me>.Z() = <me>.Z() * Scalar;

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

void operator *= (const gp_XYZ &Other)
void Multiply (const gp_Mat &Matrix)
 <me> = Matrix * <me>

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

gp_XYZ Multiplied (const gp_Mat &Matrix) const
 New = Matrix * <me>
.
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

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
.
void Reverse ()
 <me>.X() = -<me>.X()
<me>.Y() = -<me>.Y()
<me>.Z() = -<me>.Z()

gp_XYZ Reversed () const
 New.X() = -<me>.X()
New.Y() = -<me>.Y()
New.Z() = -<me>.Z()
.
void Subtract (const gp_XYZ &Right)
 <me>.X() = <me>.X() - Other.X()
<me>.Y() = <me>.Y() - Other.Y()
<me>.Z() = <me>.Z() - Other.Z()

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

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 setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3 + XYZ4

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 setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3

void SetLinearForm (const Standard_Real A1, const gp_XYZ &XYZ1, const Standard_Real A2, const gp_XYZ &XYZ2, const gp_XYZ &XYZ3)
 <me> is setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2 + XYZ3

void SetLinearForm (const Standard_Real A1, const gp_XYZ &XYZ1, const Standard_Real A2, const gp_XYZ &XYZ2)
 <me> is setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2

void SetLinearForm (const Standard_Real A1, const gp_XYZ &XYZ1, const gp_XYZ &XYZ2)
 <me> is setted to the following linear form :
A1 * XYZ1 + XYZ2

void SetLinearForm (const gp_XYZ &XYZ1, const gp_XYZ &XYZ2)
 <me> is setted to the following linear form :
XYZ1 + XYZ2

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)

Private Attributes

Standard_Real x
Standard_Real y
Standard_Real z

Friends

Standard_EXPORT friend Handle_Standard_Type & gp_XYZ_Type_ ()

Constructor & Destructor Documentation

gp_XYZ::gp_XYZ  )  [inline]
 

gp_XYZ::gp_XYZ const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  Z
[inline]
 


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  )  [inline]
 

gp_XYZ gp_XYZ::Added const gp_XYZ Other  )  const [inline]
 

void gp_XYZ::Coord Standard_Real X,
Standard_Real Y,
Standard_Real Z
const [inline]
 

Standard_Real gp_XYZ::Coord const Standard_Integer  Index  )  const [inline]
 

void gp_XYZ::Cross const gp_XYZ Right  )  [inline]
 

void gp_XYZ::CrossCross const gp_XYZ Coord1,
const gp_XYZ Coord2
[inline]
 

gp_XYZ gp_XYZ::CrossCrossed const gp_XYZ Coord1,
const gp_XYZ Coord2
const [inline]
 

gp_XYZ gp_XYZ::Crossed const gp_XYZ Right  )  const [inline]
 

Standard_Real gp_XYZ::CrossMagnitude const gp_XYZ Right  )  const [inline]
 

Standard_Real gp_XYZ::CrossSquareMagnitude const gp_XYZ Right  )  const [inline]
 

void gp_XYZ::Divide const Standard_Real  Scalar  )  [inline]
 

gp_XYZ gp_XYZ::Divided const Standard_Real  Scalar  )  const [inline]
 

Standard_Real gp_XYZ::Dot const gp_XYZ Other  )  const [inline]
 

Standard_Real gp_XYZ::DotCross const gp_XYZ Coord1,
const gp_XYZ Coord2
const [inline]
 

Standard_EXPORT Standard_Boolean gp_XYZ::IsEqual const gp_XYZ Other,
const Standard_Real  Tolerance
const
 

Standard_Real gp_XYZ::Modulus  )  const [inline]
 

gp_XYZ gp_XYZ::Multiplied const gp_Mat Matrix  )  const [inline]
 

gp_XYZ gp_XYZ::Multiplied const gp_XYZ Other  )  const [inline]
 

gp_XYZ gp_XYZ::Multiplied const Standard_Real  Scalar  )  const [inline]
 

void gp_XYZ::Multiply const gp_Mat Matrix  )  [inline]
 

void gp_XYZ::Multiply const gp_XYZ Other  )  [inline]
 

void gp_XYZ::Multiply const Standard_Real  Scalar  )  [inline]
 

void gp_XYZ::Normalize  )  [inline]
 

gp_XYZ gp_XYZ::Normalized  )  const [inline]
 

gp_XYZ gp_XYZ::operator * const gp_Mat Matrix  )  const [inline]
 

gp_XYZ gp_XYZ::operator * const Standard_Real  Scalar  )  const [inline]
 

Standard_Real gp_XYZ::operator * const gp_XYZ Other  )  const [inline]
 

void gp_XYZ::operator *= const gp_Mat Matrix  )  [inline]
 

void gp_XYZ::operator *= const gp_XYZ Other  )  [inline]
 

void gp_XYZ::operator *= const Standard_Real  Scalar  )  [inline]
 

void gp_XYZ::operator delete void *  anAddress  )  [inline]
 

void* gp_XYZ::operator new size_t  size  )  [inline]
 

void* gp_XYZ::operator new size_t  ,
void *  anAddress
[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  )  [inline]
 

gp_XYZ gp_XYZ::Reversed  )  const [inline]
 

void gp_XYZ::SetCoord const Standard_Integer  Index,
const Standard_Real  Xi
[inline]
 

void gp_XYZ::SetCoord const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  Z
[inline]
 

void gp_XYZ::SetLinearForm const gp_XYZ XYZ1,
const gp_XYZ XYZ2
[inline]
 

void gp_XYZ::SetLinearForm const Standard_Real  A1,
const gp_XYZ XYZ1,
const gp_XYZ XYZ2
[inline]
 

void gp_XYZ::SetLinearForm const Standard_Real  A1,
const gp_XYZ XYZ1,
const Standard_Real  A2,
const gp_XYZ XYZ2
[inline]
 

void gp_XYZ::SetLinearForm const Standard_Real  A1,
const gp_XYZ XYZ1,
const Standard_Real  A2,
const gp_XYZ XYZ2,
const gp_XYZ XYZ3
[inline]
 

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
[inline]
 

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
[inline]
 

void gp_XYZ::SetX const Standard_Real  X  )  [inline]
 

void gp_XYZ::SetY const Standard_Real  Y  )  [inline]
 

void gp_XYZ::SetZ const Standard_Real  Z  )  [inline]
 

Standard_Real gp_XYZ::SquareModulus  )  const [inline]
 

void gp_XYZ::Subtract const gp_XYZ Right  )  [inline]
 

gp_XYZ gp_XYZ::Subtracted const gp_XYZ Right  )  const [inline]
 

Standard_Real gp_XYZ::X  )  const [inline]
 

Standard_Real gp_XYZ::Y  )  const [inline]
 

Standard_Real gp_XYZ::Z  )  const [inline]
 


Friends And Related Function Documentation

Standard_EXPORT friend Handle_Standard_Type& gp_XYZ_Type_  )  [friend]
 


Field Documentation

Standard_Real gp_XYZ::x [private]
 

Standard_Real gp_XYZ::y [private]
 

Standard_Real gp_XYZ::z [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 13:12:41 2008 for OpenCASCADE by  doxygen 1.4.1