Base::CoordinateSystem Class Reference

Describes a right-handed coordinate system in 3D space. More...

#include <CoordinateSystem.h>

Public Member Functions

 CoordinateSystem ()
 Construct a default coordinate system with position in (0,0,0), with X axis (1,0,0), with Y axis (0,1,0) and Z axis (0,0,1) More...
 
Placement displacement (const CoordinateSystem &cs) const
 This computes the displacement from this coordinate system to the given coordinate system cs. More...
 
const Axis & getAxis () const
 
const Vector3d & getPosition () const
 
const Vector3d & getXDirection () const
 
const Vector3d & getYDirection () const
 
const Vector3d & getZDirection () const
 
void setAxes (const Axis &, const Vector3d &xd)
 Sets the main axis. More...
 
void setAxes (const Vector3d &n, const Vector3d &xd)
 Sets the main axis. More...
 
void setAxis (const Axis &v)
 Sets the main axis. More...
 
void setPlacement (const Placement &p)
 Set the placement p to the coordinate system. More...
 
void setPosition (const Vector3d &p)
 
void setXDirection (const Vector3d &)
 The passed vector must not be parallel to the main axis. More...
 
void setYDirection (const Vector3d &)
 The passed vector must not be parallel to the main axis. More...
 
void setZDirection (const Vector3d &)
 Sets the main axis. More...
 
void transform (const Placement &p)
 Apply the placement p to the coordinate system. More...
 
void transform (const Rotation &r)
 Apply the rotation r to the coordinate system. More...
 
void transformTo (Vector3d &p)
 Transform the point p to be in this coordinate system. More...
 
 ~CoordinateSystem ()
 

Detailed Description

Describes a right-handed coordinate system in 3D space.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ CoordinateSystem()

CoordinateSystem::CoordinateSystem ( )

Construct a default coordinate system with position in (0,0,0), with X axis (1,0,0), with Y axis (0,1,0) and Z axis (0,0,1)

◆ ~CoordinateSystem()

CoordinateSystem::~CoordinateSystem ( )

Member Function Documentation

◆ displacement()

Placement CoordinateSystem::displacement ( const CoordinateSystem &  cs) const

◆ getAxis()

const Axis& Base::CoordinateSystem::getAxis ( ) const

◆ getPosition()

const Vector3d& Base::CoordinateSystem::getPosition ( ) const

Referenced by displacement().

◆ getXDirection()

const Vector3d& Base::CoordinateSystem::getXDirection ( ) const

Referenced by displacement().

◆ getYDirection()

const Vector3d& Base::CoordinateSystem::getYDirection ( ) const

◆ getZDirection()

const Vector3d& Base::CoordinateSystem::getZDirection ( ) const

Referenced by displacement().

◆ setAxes() [1/2]

void CoordinateSystem::setAxes ( const Axis &  v,
const Vector3d &  xd 
)

Sets the main axis.

X and Y dir are adjusted accordingly. The main axis must not be parallel to xd

References Base::Vector3< double >::epsilon(), Base::Vector3< _Precision >::Normalize(), Base::Axis::setBase(), Base::Axis::setDirection(), and Base::Vector3< _Precision >::Sqr().

Referenced by Base::CoordinateSystemPy::setAxes(), setAxis(), and setZDirection().

◆ setAxes() [2/2]

void CoordinateSystem::setAxes ( const Vector3d &  n,
const Vector3d &  xd 
)

Sets the main axis.

X and Y dir are adjusted accordingly. The main axis n must not be parallel to xd

References Base::Vector3< double >::epsilon(), Base::Vector3< _Precision >::Normalize(), Base::Axis::setDirection(), and Base::Vector3< _Precision >::Sqr().

◆ setAxis()

void CoordinateSystem::setAxis ( const Axis &  v)

Sets the main axis.

X and Y dir are adjusted accordingly. The main axis v must not be parallel to the X axis

References setAxes().

Referenced by Base::CoordinateSystemPy::setAxis().

◆ setPlacement()

void CoordinateSystem::setPlacement ( const Placement &  p)

Set the placement p to the coordinate system.

References Base::Axis::setBase(), and Base::Axis::setDirection().

Referenced by Base::CoordinateSystemPy::setPlacement().

◆ setPosition()

void Base::CoordinateSystem::setPosition ( const Vector3d &  p)

◆ setXDirection()

void CoordinateSystem::setXDirection ( const Vector3d &  dir)

◆ setYDirection()

void CoordinateSystem::setYDirection ( const Vector3d &  dir)

◆ setZDirection()

void CoordinateSystem::setZDirection ( const Vector3d &  dir)

Sets the main axis.

X and Y dir are adjusted accordingly. The main axis must not be parallel to the X axis

References setAxes().

Referenced by Base::CoordinateSystemPy::setZDirection().

◆ transform() [1/2]

void CoordinateSystem::transform ( const Placement &  p)

Apply the placement p to the coordinate system.

Referenced by Base::CoordinateSystemPy::transform().

◆ transform() [2/2]

void CoordinateSystem::transform ( const Rotation &  r)

Apply the rotation r to the coordinate system.

References Base::Axis::getDirection(), and Base::Axis::setDirection().

◆ transformTo()

void CoordinateSystem::transformTo ( Vector3d &  p)

Transform the point p to be in this coordinate system.

References Base::Axis::getBase().

Referenced by Base::CoordinateSystemPy::transformTo().


The documentation for this class was generated from the following files:
  • src/Base/CoordinateSystem.h
  • src/Base/CoordinateSystem.cpp