OpendTect-6_4  6.4
Public Member Functions | Public Attributes | List of all members
Quaternion Class Reference

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

Public Member Functions

 Quaternion (double s, double x, double y, double z)
 
 Quaternion (const Vector3 &axis, float angle)
 
void setRotation (const Vector3 &axis, float angle)
 
void getRotation (Vector3 &axis, float &angle) const
 
Coord3 rotate (const Coord3 &) 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 &)
 
Quaternion inverse () const
 

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::Quaternion ( double  s,
double  x,
double  y,
double  z 
)
Quaternion::Quaternion ( const Vector3 axis,
float  angle 
)

Member Function Documentation

void Quaternion::getRotation ( Vector3 axis,
float &  angle 
) const
Note
axis is not normalized.
Quaternion Quaternion::inverse ( ) const
Quaternion Quaternion::operator* ( const Quaternion ) const
Quaternion& Quaternion::operator*= ( const Quaternion )
Quaternion Quaternion::operator+ ( const Quaternion ) const
Quaternion& Quaternion::operator+= ( const Quaternion )
Quaternion Quaternion::operator- ( const Quaternion ) const
Quaternion& Quaternion::operator-= ( const Quaternion )
Coord3 Quaternion::rotate ( const Coord3 ) const
void Quaternion::setRotation ( const Vector3 axis,
float  angle 
)

Member Data Documentation

double Quaternion::s_
Vector3 Quaternion::vec_

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