ERC CISST - cisst software

vctAngleRotation2 Class Reference
[Vectors]

#include <vctAngleRotation2.h>

Collaboration diagram for vctAngleRotation2:

Collaboration graph
[legend]
List of all members.

Detailed Description

Define a rotation based on an angle for a space of dimension 2.

This class is not templated by the element type. It contains an angle of type AngleType.

See also:
vctMatrixRotation2Base vctMatrixRotation2

Definition at line 47 of file vctAngleRotation2.h.

Constructors without normalization test

These constructors will either assume that the input is normalized or normalize the input (a copy of it, if required) based on the last parameter provided.

Public Types

Public Member Functions

Conversion from normalized input.
These methods will check that the input is normalized. If the input is not normalized, an exception (std::runtime_error) will be thrown using cmnThrow().

Note:
Since all exceptions are thrown using cmnThrow(), it is possible to configure these methods to use abort() if the normalization requirements are not met (see cmnThrow()).


Conversion and normalization.
These method will accept any input and attempt to either normalize the input and then convert or convert and then normalize the quaternion itself.
The order depends on the type of input.

Conversion.
These method don't check if the input is normalized nor try to normalize the results. They should be used with caution since the resulting rotation (in this case a quaternion) might not be normalized.

Public Attributes

Protected Member Functions

Protected Attributes


Constructor & Destructor Documentation

vctAngleRotation2::vctAngleRotation2 (  )  [inline]

Default constructor. Sets the angle to zero.

Definition at line 81 of file vctAngleRotation2.h.

vctAngleRotation2::vctAngleRotation2 ( const AngleType  angle  )  throw (std::runtime_error) [inline, explicit]

Constructor from an angle (in radians).

Definition at line 101 of file vctAngleRotation2.h.

References From().

template<class _containerType>
vctAngleRotation2::vctAngleRotation2 ( const vctMatrixRotation2Base< _containerType > &  matrixRotation  )  throw (std::runtime_error) [inline]

Constructor from a rotation matrix.

Definition at line 109 of file vctAngleRotation2.h.

References From().

vctAngleRotation2::vctAngleRotation2 ( const AngleType  angle,
bool  normalizeInput 
) [inline]

Constructor from an angle (in radians).

Definition at line 139 of file vctAngleRotation2.h.

References FromNormalized(), and FromRaw().

template<class _containerType>
vctAngleRotation2::vctAngleRotation2 ( const vctMatrixRotation2Base< _containerType > &  matrixRotation,
bool  normalizeInput 
) [inline]

Constructor from a rotation matrix.

Definition at line 151 of file vctAngleRotation2.h.

References FromNormalized(), and FromRaw().

vctAngleRotation2::vctAngleRotation2 ( const AngleType  angle  )  throw (std::runtime_error) [inline, explicit]

Constructor from an angle (in radians).

Definition at line 101 of file vctAngleRotation2.h.

References From().

template<class _containerType>
vctAngleRotation2::vctAngleRotation2 ( const vctMatrixRotation2Base< _containerType > &  matrixRotation  )  throw (std::runtime_error) [inline]

Constructor from a rotation matrix.

Definition at line 109 of file vctAngleRotation2.h.

References From().


Member Function Documentation

void vctAngleRotation2::ThrowUnlessIsNormalized ( void   )  const throw (std::runtime_error) [inline, protected]

Throw an exception unless this rotation is normalized.

Definition at line 60 of file vctAngleRotation2.h.

References cmnThrow(), and IsNormalized().

Referenced by From().

template<class _inputType>
void vctAngleRotation2::ThrowUnlessIsNormalized ( const _inputType &  input  )  const throw (std::runtime_error) [inline, protected]

Throw an exception unless the input is normalized.

Parameters:
input An object with IsNormalized method.

Definition at line 71 of file vctAngleRotation2.h.

References cmnThrow().

static CISST_EXPORT const ThisType& vctAngleRotation2::Identity (  )  [static]

Const reference to the identity. In this case, the angle is set to zero.

const AngleType& vctAngleRotation2::Angle ( void   )  const [inline]

Constructor from an angle (in radians).

Definition at line 167 of file vctAngleRotation2.h.

References AngleMember.

Referenced by Inverse(), InverseOf(), NormalizedOf(), ToStream(), and ToStreamRaw().

AngleType& vctAngleRotation2::Angle ( void   )  [inline]

Constructor from an angle (in radians).

Definition at line 171 of file vctAngleRotation2.h.

References AngleMember.

ThisType& vctAngleRotation2::From ( const AngleType  angle  )  throw (std::runtime_error) [inline]

Conversion from an angle (in radians).

Definition at line 193 of file vctAngleRotation2.h.

References AngleMember.

Referenced by vctAngleRotation2().

template<class _containerType>
ThisType& vctAngleRotation2::From ( const vctMatrixRotation2Base< _containerType > &  matrixRotation  )  throw (std::runtime_error) [inline]

Conversion from a rotation matrix.

Definition at line 204 of file vctAngleRotation2.h.

References AngleMember, and ThrowUnlessIsNormalized().

ThisType& vctAngleRotation2::FromNormalized ( const AngleType  angle  )  [inline]

Conversion from an angle (in radians).

Definition at line 226 of file vctAngleRotation2.h.

References AngleMember, and NormalizedSelf().

Referenced by vctAngleRotation2().

template<class _containerType>
ThisType& vctAngleRotation2::FromNormalized ( const vctMatrixRotation2Base< _containerType > &  matrixRotation  )  [inline]

Conversion from a rotation matrix.

Definition at line 236 of file vctAngleRotation2.h.

References FromRaw(), and vctMatrixRotation2Base< _containerType >::Normalized().

ThisType& vctAngleRotation2::FromRaw ( const AngleType  angle  )  [inline]

Conversion from an angle (in radians).

Definition at line 254 of file vctAngleRotation2.h.

References AngleMember.

Referenced by FromNormalized(), and vctAngleRotation2().

template<class _containerType>
ThisType& vctAngleRotation2::FromRaw ( const vctMatrixRotation2Base< _containerType > &  matrixRotation  )  [inline]

Conversion from a rotation matrix.

Definition at line 263 of file vctAngleRotation2.h.

References AngleMember.

ThisType& vctAngleRotation2::InverseSelf ( void   )  [inline]

Inverse this angle rotation. This methods assumes that the angle is betweem 0 and 2 * PI. The angle is set to 2 * PI minus the previous value.

Definition at line 275 of file vctAngleRotation2.h.

References AngleMember, and cmnPI.

ThisType& vctAngleRotation2::InverseOf ( const ThisType otherRotation  )  [inline]

Set this rotation as the inverse of another one. See also InverseSelf().

Definition at line 282 of file vctAngleRotation2.h.

References Angle(), AngleMember, and cmnPI.

ThisType vctAngleRotation2::Inverse ( void   )  const [inline]

Create and return by copy the inverse of this rotation. This method is not the most efficient since it requires a copy. See also InverseSelf().

Definition at line 290 of file vctAngleRotation2.h.

References Angle(), and cmnPI.

ThisType& vctAngleRotation2::NormalizedSelf ( void   )  [inline]

Normalizes the angle. This method ensures that the angle is between 0 and 2 * PI.

Definition at line 299 of file vctAngleRotation2.h.

References AngleMember, and cmnPI.

Referenced by FromNormalized(), and Normalized().

ThisType& vctAngleRotation2::NormalizedOf ( const ThisType otherRotation  )  [inline]

Sets this rotation as the normalized version of another one.

Parameters:
otherRotation Angle rotation used to compute the normalized rotation.

Definition at line 312 of file vctAngleRotation2.h.

References Angle(), and AngleMember.

ThisType vctAngleRotation2::Normalized ( void   )  const [inline]

Returns the normalized version of this rotation. This method returns a copy of the normalized rotation and does not modify this rotation. See also NormalizedSelf().

Definition at line 320 of file vctAngleRotation2.h.

References NormalizedSelf().

Referenced by vctMatrixRotation2Base< vctFixedSizeMatrix< _elementType, 2, 2 > >::FromNormalized().

bool vctAngleRotation2::IsNormalized ( AngleType   CMN_UNUSED(tolerance) = TypeTraits::Tolerance()  )  const [inline]

Test if this rotation is normalized. This methods always return "true" since any angle is considered valid. This method is provided mostly for API completion.

Parameters:
tolerance Tolerance. This variable is not used as this rotation is always normalized. The tolerance parameter is provided just to have the same signature as for other transformations.

Definition at line 335 of file vctAngleRotation2.h.

Referenced by ThrowUnlessIsNormalized().

void vctAngleRotation2::ToStream ( std::ostream &  outputStream  )  const [inline]

Print the matrix in a human readable format

Definition at line 347 of file vctAngleRotation2.h.

References Angle().

Referenced by operator<<(), and ToString().

void vctAngleRotation2::ToStreamRaw ( std::ostream &  outputStream,
const char   CMN_UNUSED(delimiter) = ' ',
bool  headerOnly = false,
const std::string &  headerPrefix = "" 
) const [inline]

Print in machine processable format

Definition at line 354 of file vctAngleRotation2.h.

References Angle().

void vctAngleRotation2::SerializeRaw ( std::ostream &  outputStream  )  const [inline]

Binary serialization

Definition at line 364 of file vctAngleRotation2.h.

References cmnSerializeRaw().

void vctAngleRotation2::DeSerializeRaw ( std::istream &  inputStream  )  [inline]

Binary deserialization

Definition at line 370 of file vctAngleRotation2.h.

References cmnDeSerializeRaw().


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu