IMP  2.0.0
The Integrative Modeling Platform
Rotation3D.h File Reference

Simple 3D rotation class. More...

#include <IMP/algebra/algebra_config.h>
#include "Vector3D.h"
#include "utility.h"
#include "constants.h"
#include "GeometricPrimitiveD.h"
#include <IMP/base/log.h>
#include <cmath>
#include <iostream>
#include <algorithm>
+ Include dependency graph for Rotation3D.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  IMP::algebra::FixedXYZ
 A simple class for returning XYZ Euler angles. More...
 
class  IMP::algebra::FixedZXZ
 A simple class for returning ZXZ Euler angles. More...
 
class  IMP::algebra::FixedZYZ
 A simple class for returning ZYZ Euler angles. More...
 
class  IMP::algebra::Rotation3D
 3D rotation class. More...
 

Namespaces

namespace  IMP
 All IMP::kernel code is brought into the IMP namespace.
 
namespace  IMP::algebra
 See IMP.algebra Overview for more information.
 

Typedefs

typedef std::pair< Vector3D,
double > 
IMP::algebra::AxisAnglePair
 
typedef IMP::base::Vector
< Rotation3D > 
IMP::algebra::Rotation3Ds
 

Functions

Rotation3D IMP::algebra::compose (const Rotation3D &a, const Rotation3D &b)
 
std::pair< Vector3D, double > IMP::algebra::get_axis_and_angle (const Rotation3D &rot)
 Decompose a Rotation3D object into a rotation around an axis. More...
 
double IMP::algebra::get_distance (const Rotation3D &r0, const Rotation3D &r1)
 Return a distance between the two rotations. More...
 
Rotation3D IMP::algebra::get_identity_rotation_3d ()
 Return a rotation that does not do anything. More...
 
Rotation3D IMP::algebra::get_interpolated (const Rotation3D &a, const Rotation3D &b, double f)
 Interpolate between two rotations. More...
 
Rotation3D IMP::algebra::get_random_rotation_3d ()
 Pick a rotation at random from all possible rotations. More...
 
Rotation3D IMP::algebra::get_random_rotation_3d (const Rotation3D &center, double distance)
 Pick a rotation at random near the provided one. More...
 
Rotation3D IMP::algebra::get_rotation_about_axis (const Vector3D &axis, double angle)
 Generate a Rotation3D object from a rotation around an axis. More...
 
Rotation3D IMP::algebra::get_rotation_from_matrix (double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)
 Generate a Rotation3D object from a rotation matrix.
 
Rotation3D IMP::algebra::get_rotation_from_vector4d (const VectorD< 4 > &v)
 Compute a rotatation from an unnormalized quaternion. More...
 
Rotation3D IMP::algebra::get_rotation_from_x_y_axes (const Vector3D &x, const Vector3D &y)
 
Rotation3D IMP::algebra::get_rotation_taking_first_to_second (const Vector3D &v1, const Vector3D &v2)
 Create a rotation from the first vector to the second one.
 
Rotation3Ds IMP::algebra::get_uniform_cover_rotations_3d (unsigned int num_points)
 Cover the space of rotations evenly. More...
 
algebra::Rotation3Ds IMP::algebra::get_uniformly_sampled_rotations (double delta)
 Generates a nondegenerate set of Euler angles with a delta resolution. More...
 

Euler Angles

There are many conventions for how to define Euler angles, based on choices of which of the x,y,z axis to use in what order and whether the rotation axis is in the body frame (and hence affected by previous rotations) or in in a fixed frame. See http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles for a general description.

  • All Euler angles are specified in radians.
  • The names are all rotation_from_{fixed/body}_abc() where abc is the ordering of x,y,z.
typedef IMP::base::Vector
< FixedZYZ > 
IMP::algebra::FixedZYZs
 
typedef IMP::base::Vector
< FixedZXZ > 
IMP::algebra::FixedZXZs
 
typedef IMP::base::Vector
< FixedXYZ > 
IMP::algebra::FixedXYZs
 
Rotation3D IMP::algebra::get_rotation_from_fixed_xyz (double xr, double yr, double zr)
 Initialize a rotation in x-y-z order from three angles. More...
 
Rotation3D IMP::algebra::get_rotation_from_fixed_zxz (double phi, double theta, double psi)
 Initialize a rotation from euler angles. More...
 
Rotation3D IMP::algebra::get_rotation_from_fixed_zyz (double Rot, double Tilt, double Psi)
 Generate a rotation object from Euler Angles. More...
 
FixedZYZ IMP::algebra::get_fixed_zyz_from_rotation (const Rotation3D &r)
 The inverse of rotation_from_fixed_zyz() More...
 
FixedZXZ IMP::algebra::get_fixed_zxz_from_rotation (const Rotation3D &r)
 The inverse of rotation_from_fixed_zyz() More...
 
FixedXYZ IMP::algebra::get_fixed_xyz_from_rotation (const Rotation3D &r)
 The inverse of rotation_from_fixed_xyz() More...
 

Detailed Description

Copyright 2007-2013 IMP Inventors. All rights reserved.

Definition in file Rotation3D.h.