SHAPER  9.13.0
GeomAPI_Dir Class Reference

3D direction defined by three normalized coordinates More...

Inheritance diagram for GeomAPI_Dir:

## Public Member Functions

GEOMAPI_EXPORT GeomAPI_Dir (const double theX, const double theY, const double theZ)
Creation of direction by coordinates. More...

GEOMAPI_EXPORT GeomAPI_Dir (const std::shared_ptr< GeomAPI_XYZ > &theCoords)
Creation of direction by coordinates. More...

GEOMAPI_EXPORT double x () const
returns X coordinate More...

GEOMAPI_EXPORT double y () const
returns Y coordinate More...

GEOMAPI_EXPORT double z () const
returns Z coordinate More...

GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_XYZxyz ()
returns coordinates of the direction More...

GEOMAPI_EXPORT void reverse ()
inverses the direction More...

GEOMAPI_EXPORT double dot (const std::shared_ptr< GeomAPI_Dir > &theArg) const
result is a scalar product of directions More...

GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_XYZcross (const std::shared_ptr< GeomAPI_Dir > &theArg) const
result is a cross product of two directions More...

GEOMAPI_EXPORT double angle (const std::shared_ptr< GeomAPI_Dir > &theArg) const
calculates angle between two directions More...

GEOMAPI_EXPORT bool isParallel (const std::shared_ptr< GeomAPI_Dir > theDir, const double theTolerance=1.e-7) const

template<class T >
T * implPtr ()
Returns the pointer to the impl. More...

template<class T >
const T * implPtr () const
Returns the pointer to the impl. More...

template<class T >
const T & impl () const
Returns the reference object of the impl. More...

template<class T >
void setImpl (T *theImpl)
Updates the impl (deletes the old one) More...

GEOMAPI_EXPORT bool empty () const
Returns true if the impl is empty. More...

## Detailed Description

3D direction defined by three normalized coordinates

## ◆ GeomAPI_Dir() [1/2]

 GeomAPI_Dir::GeomAPI_Dir ( const double theX, const double theY, const double theZ )

Creation of direction by coordinates.

## ◆ GeomAPI_Dir() [2/2]

 GeomAPI_Dir::GeomAPI_Dir ( const std::shared_ptr< GeomAPI_XYZ > & theCoords )

Creation of direction by coordinates.

## ◆ x()

 double GeomAPI_Dir::x ( ) const

returns X coordinate

## ◆ y()

 double GeomAPI_Dir::y ( ) const

returns Y coordinate

## ◆ z()

 double GeomAPI_Dir::z ( ) const

returns Z coordinate

## ◆ xyz()

 const std::shared_ptr< GeomAPI_XYZ > GeomAPI_Dir::xyz ( )

returns coordinates of the direction

## ◆ reverse()

 void GeomAPI_Dir::reverse ( )

inverses the direction

## ◆ dot()

 double GeomAPI_Dir::dot ( const std::shared_ptr< GeomAPI_Dir > & theArg ) const

result is a scalar product of directions

## ◆ cross()

 const std::shared_ptr< GeomAPI_XYZ > GeomAPI_Dir::cross ( const std::shared_ptr< GeomAPI_Dir > & theArg ) const

result is a cross product of two directions

## ◆ angle()

 double GeomAPI_Dir::angle ( const std::shared_ptr< GeomAPI_Dir > & theArg ) const

calculates angle between two directions

## ◆ isParallel()

 bool GeomAPI_Dir::isParallel ( const std::shared_ptr< GeomAPI_Dir > theDir, const double theTolerance = `1.e-7` ) const
Returns
true if the angle between this unit vector and theDir unit vector is equal to 0 or to Pi.

## ◆ implPtr() [1/2]

template<class T >
 T* GeomAPI_Interface::implPtr ( )
inlineinherited

Returns the pointer to the impl.

## ◆ implPtr() [2/2]

template<class T >
 const T* GeomAPI_Interface::implPtr ( ) const
inlineinherited

Returns the pointer to the impl.

## ◆ impl()

template<class T >
 const T& GeomAPI_Interface::impl ( ) const
inlineinherited

Returns the reference object of the impl.

## ◆ setImpl()

template<class T >
 void GeomAPI_Interface::setImpl ( T * theImpl )
inlineinherited

Updates the impl (deletes the old one)

## ◆ empty()

 bool GeomAPI_Interface::empty ( ) const
inherited

Returns true if the impl is empty.