Public Member Functions | Public Attributes | Protected Member Functions

ArcBall Class Reference

#include <arcball.h>

List of all members.

Public Member Functions

 ArcBall ()
 ~ArcBall ()
void set_bounds (int width, int height)
void click (QVector2D mousePt)
void drag (QVector2D mousePt)
QQuaternion get_quaternion (QVector3D v1, QVector3D v2)

Public Attributes

QQuaternion quaternion
double inv_height
double inv_width
QVector3D startVec
QVector3D endVec
QQuaternion q_down
QQuaternion mouseQuat
double epsilon

Protected Member Functions

QVector3D mapToSphere (QVector2D mousePt)

Detailed Description

The ArcBall class defines tools for rotating and viewing three-dimensional images.

When viewing three-dimensional objects there are many different ways to choose a viewpoint. The basic principle is to create a sphere around a chosen object and then, by choosing a point on that sphere, drag that point to a different location and have the object rotate in a way defined by a rotation around the arc-ball.

Rotations are mapped onto a quaternion.


Constructor & Destructor Documentation

ArcBall::ArcBall (  )

Constructor.

ArcBall::~ArcBall (  ) [inline]

Destructor.


Member Function Documentation

void ArcBall::click ( QVector2D  mousePt )
void ArcBall::drag ( QVector2D  mousePt )
QQuaternion ArcBall::get_quaternion ( QVector3D  v1,
QVector3D  v2 
)

Return this quaternion.

QVector3D ArcBall::mapToSphere ( QVector2D  mousePt ) [inline, protected]
void ArcBall::set_bounds ( int  width,
int  height 
) [inline]

Set the bounds to this width and this height.


Member Data Documentation

QVector3D ArcBall::endVec

?

?

QQuaternion ArcBall::mouseQuat
QQuaternion ArcBall::q_down
QQuaternion ArcBall::quaternion
QVector3D ArcBall::startVec

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