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 AxisgetAxis () const
 
const Vector3dgetPosition () const
 
const Vector3dgetXDirection () const
 
const Vector3dgetYDirection () const
 
const Vector3dgetZDirection () 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 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().

◆ setPlacement()

void CoordinateSystem::setPlacement ( const Placement p)

Set the placement p to the coordinate system.

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

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

◆ transform() [1/2]

void CoordinateSystem::transform ( const Placement p)

◆ transform() [2/2]

◆ transformTo()

void CoordinateSystem::transformTo ( Vector3d p)

Transform the point p to be in this coordinate system.

References Base::Axis::getBase().


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