INET Framework for OMNeT++/OMNEST
inet::Quaternion Class Reference

#include <Quaternion.h>

Public Member Functions

 Quaternion ()
 
 Quaternion (double realPart, const Coord &vectorPart)
 
Quaternion operator* (double scalar) const
 
Quaternion operator+ (const Quaternion &rhs) const
 
Quaternion operator% (const Quaternion &rhs) const
 

Protected Attributes

double realPart
 
Coord vectorPart
 

Friends

Quaternion operator* (double scalar, const Quaternion &lhs)
 

Constructor & Destructor Documentation

inet::Quaternion::Quaternion ( )
inline

Referenced by operator%(), inet::operator*(), operator*(), and operator+().

35 : realPart(0), vectorPart(Coord(0,0,0)) {}
Coord vectorPart
Definition: Quaternion.h:32
double realPart
Definition: Quaternion.h:31
inet::Quaternion::Quaternion ( double  realPart,
const Coord vectorPart 
)
inline
36  :
Coord vectorPart
Definition: Quaternion.h:32
double realPart
Definition: Quaternion.h:31

Member Function Documentation

Quaternion inet::Quaternion::operator% ( const Quaternion rhs) const
33 {
34  return Quaternion(realPart * rhs.realPart - vectorPart * rhs.vectorPart,
35  rhs.vectorPart * realPart + vectorPart * rhs.realPart +
36  vectorPart % rhs.vectorPart);
37 }
Quaternion()
Definition: Quaternion.h:35
Coord vectorPart
Definition: Quaternion.h:32
double realPart
Definition: Quaternion.h:31
Quaternion inet::Quaternion::operator* ( double  scalar) const
23 {
24  return Quaternion(this->realPart * scalar, this->vectorPart * scalar);
25 }
Quaternion()
Definition: Quaternion.h:35
Coord vectorPart
Definition: Quaternion.h:32
double realPart
Definition: Quaternion.h:31
Quaternion inet::Quaternion::operator+ ( const Quaternion rhs) const
28 {
29  return Quaternion(this->realPart + rhs.realPart, this->vectorPart + rhs.vectorPart);
30 }
Quaternion()
Definition: Quaternion.h:35
double realPart
Definition: Quaternion.h:31

Friends And Related Function Documentation

Quaternion operator* ( double  scalar,
const Quaternion lhs 
)
friend
40 {
41  return Quaternion(lhs.realPart * scalar, lhs.vectorPart * scalar);
42 }
Quaternion()
Definition: Quaternion.h:35

Member Data Documentation

double inet::Quaternion::realPart
protected
Coord inet::Quaternion::vectorPart
protected

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