OpendTect  7.0
Public Member Functions | Public Attributes | List of all members
Quaternion Class Reference

Quaternion is an extension to complex numbers. More...

Public Member Functions

 Quaternion (const Vector3 &axis, float angle)
 
 Quaternion (double s, double x, double y, double z)
 
void getRotation (Vector3 &axis, float &angle) const
 
Quaternion inverse () const
 
Quaternion operator* (const Quaternion &) const
 
Quaternionoperator*= (const Quaternion &)
 
Quaternion operator+ (const Quaternion &) const
 
Quaternionoperator+= (const Quaternion &)
 
Quaternion operator- (const Quaternion &) const
 
Quaternionoperator-= (const Quaternion &)
 
Coord3 rotate (const Coord3 &) const
 
void setRotation (const Vector3 &axis, float angle)
 

Public Attributes

double s_
 
Vector3 vec_
 

Detailed Description

Quaternion is an extension to complex numbers.

A Quaternion is represented by the equation:
q = s + xi + yj + zk
where: i*i = j*j = k*k = -1.

<>

Constructor & Destructor Documentation

◆ Quaternion() [1/2]

Quaternion::Quaternion ( double  s,
double  x,
double  y,
double  z 
)

◆ Quaternion() [2/2]

Quaternion::Quaternion ( const Vector3 axis,
float  angle 
)

Member Function Documentation

◆ getRotation()

void Quaternion::getRotation ( Vector3 axis,
float &  angle 
) const
Note
axis is not normalized.

◆ inverse()

Quaternion Quaternion::inverse ( ) const

◆ operator*()

Quaternion Quaternion::operator* ( const Quaternion ) const

◆ operator*=()

Quaternion& Quaternion::operator*= ( const Quaternion )

◆ operator+()

Quaternion Quaternion::operator+ ( const Quaternion ) const

◆ operator+=()

Quaternion& Quaternion::operator+= ( const Quaternion )

◆ operator-()

Quaternion Quaternion::operator- ( const Quaternion ) const

◆ operator-=()

Quaternion& Quaternion::operator-= ( const Quaternion )

◆ rotate()

Coord3 Quaternion::rotate ( const Coord3 ) const

◆ setRotation()

void Quaternion::setRotation ( const Vector3 axis,
float  angle 
)

Member Data Documentation

◆ s_

double Quaternion::s_

◆ vec_

Vector3 Quaternion::vec_

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024