#include <vectorMath.h>
Public Member Functions | |
Create methods | |
CAngle3D () | |
CAngle3D (const unit inPan, const unit inTilt, const unit inRoll) | |
Set/Reset methods | |
void | set (const unit inPan, const unit inTilt, const unit inRoll) |
Set the values of this rotation. | |
void | set (const CVector3D &inVec) |
Set the values of this rotation. | |
void | reset () |
Reset the values of this rotation to zero. | |
void | pan (const unit f) |
Set the pan value of this rotation. | |
void | tilt (const unit f) |
Set the tilt value of this rotation. | |
void | roll (const unit f) |
Set the roll value of this rotation. | |
unit | pan () const |
Get the pan value of this rotation. | |
unit | tilt () const |
Get the tilt value of this rotation. | |
unit | roll () const |
Get the roll value of this rotation. | |
Add methods | |
void | add (const unit pan, const unit tilt, const unit roll) |
Add to the values of this rotation. | |
void | addPan (const unit f) |
Add to the pan value of this rotation. | |
void | addTilt (const unit f) |
Tilt to the pan value of this rotation. | |
void | addRoll (const unit f) |
Roll to the pan value of this rotation. | |
Operator Overloads | |
CAngle3D | operator+ (const CAngle3D &inAng) const |
Add two rotations. | |
CAngle3D | operator- (const CAngle3D &inAng) const |
Subtract two rotations. | |
CAngle3D | operator * (const CAngle3D &inAng) const |
Scale the values of this rotation by the values of the second. | |
void | operator+= (const CAngle3D &inAng) |
Add another set of rotations. | |
void | operator-= (const CAngle3D &inAng) |
Subtract another set of rotations. | |
void | operator *= (const CAngle3D &inAng) |
Scale by the second set of rotations. | |
void | operator *= (const unit f) |
Scale by a constant value. | |
Misc methods | |
void | convert (const CVector3D &vec) |
Convert a 3d vector into an angle (pan and tilt). | |
void | get_array (unit array[]) const |
Get angle values as an array. | |
CVector3D | get_vector3d (const unit f=1.0) const |
Return a unit vector pointing in the direction of this angle (pan and tilt). | |
void | look_at (const CVector3D &vFrom, const CVector3D &vTo) |
Point this angle from point vFrom to point vTo. |
(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.
void CAngle3D::get_array | ( | unit | array[] | ) | const [inline] |
Get angle values as an array.
array | A unit array of at least 3 values. |
CVector3D CAngle3D::get_vector3d | ( | const unit | f = 1.0 |
) | const |
Return a unit vector pointing in the direction of this angle (pan and tilt).
Return a rotated vector of length f
f | Lenth of vector returned |