Avogadro  1.1.0
Public Member Functions | Static Public Member Functions
Avogadro::Navigate Class Reference

Navigation functions to simplify common tasks. More...

#include <avogadro/navigate.h>

List of all members.

Public Member Functions

 Navigate ()
virtual ~Navigate ()

Static Public Member Functions

static void zoom (GLWidget *widget, const Eigen::Vector3d &goal, double delta)
static void translate (GLWidget *widget, const Eigen::Vector3d &what, const QPoint &from, const QPoint &to)
static void translate (GLWidget *widget, const Eigen::Vector3d &what, double deltaX, double deltaY)
static void rotate (GLWidget *widget, const Eigen::Vector3d &center, double deltaX, double deltaY)
static void tilt (GLWidget *widget, const Eigen::Vector3d &center, double delta)
static void rotate (GLWidget *widget, const Eigen::Vector3d &center, double deltaX, double deltaY, double deltaZ)

Detailed Description

Navigation functions to simplify common tasks.

Author:
Marcus D. Hanwell

This class contains navigation functions that are used by several tools.


Constructor & Destructor Documentation

Constructor.

Destructor.


Member Function Documentation

void Avogadro::Navigate::rotate ( GLWidget widget,
const Eigen::Vector3d &  center,
double  deltaX,
double  deltaY 
) [static]

Rotate about center by the amounts deltaX and deltaY in tha x and y axes.

Parameters:
widgetthe GLWidget being operated on.
centerthe point at the center of rotation.
deltaXthe amount to rotate about the x axis in degrees.
deltaYthe amount to rotate about the y axis in degrees.
void Avogadro::Navigate::rotate ( GLWidget widget,
const Eigen::Vector3d &  center,
double  deltaX,
double  deltaY,
double  deltaZ 
) [static]

Rotate about center by deltaX, deltaY, and deltaZ in the x, y and z axes A generalization of the rotate() and tilt() methods.

Parameters:
widgetthe GLWidget being operated on.
centerthe point at the center of rotation.
deltaXthe amount to rotate about the x axis in degrees.
deltaYthe amount to rotate about the y axis in degrees.
deltaZthe amount to rotate about the z axis in degrees.

References Avogadro::Camera::backTransformedXAxis(), Avogadro::Camera::backTransformedYAxis(), Avogadro::Camera::backTransformedZAxis(), Avogadro::GLWidget::camera(), Avogadro::Camera::rotate(), and Avogadro::Camera::translate().

void Avogadro::Navigate::tilt ( GLWidget widget,
const Eigen::Vector3d &  center,
double  delta 
) [static]

Tilt about center by the amount delta z axis.

Parameters:
widgetthe GLWidget being operated on.
centerthe point at the center of rotation.
deltathe amount to rotate about the z axis in degrees.
void Avogadro::Navigate::translate ( GLWidget widget,
const Eigen::Vector3d &  what,
const QPoint from,
const QPoint to 
) [static]

Translate between the from and to positions relative to what.

Parameters:
widgetthe GLWidget being operated on.
whatthe point that is being translated about.
fromthe starting position.
tothe ending position.

References Avogadro::GLWidget::camera(), Avogadro::Camera::translate(), and Avogadro::Camera::unProject().

void Avogadro::Navigate::translate ( GLWidget widget,
const Eigen::Vector3d &  what,
double  deltaX,
double  deltaY 
) [static]

Translate between the from and to positions relative to what.

Parameters:
widgetthe GLWidget being operated on.
whatthe point that is being translated about.
deltaXthe amount to translate the x axis.
deltaYthe amount to translate the y axis.

References Avogadro::GLWidget::camera(), Avogadro::Camera::translate(), and Avogadro::Camera::unProject().

void Avogadro::Navigate::zoom ( GLWidget widget,
const Eigen::Vector3d &  goal,
double  delta 
) [static]

Zooms toward a given point by the given amount.

Parameters:
widgetthe GLWidget being operated on.
goalthe point that is being zoomed toward.
deltathe amount to zoom by.

References Avogadro::GLWidget::camera(), Avogadro::Camera::modelview(), Avogadro::GLWidget::projection(), and Avogadro::Camera::scale().


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