|
| gp_Quaternion () |
| Creates an identity quaternion.
|
|
| gp_Quaternion (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ, const Standard_Real theW) |
| Creates quaternion directly from component values.
|
|
| gp_Quaternion (const gp_Vec &theVecFrom, const gp_Vec &theVecTo) |
| Creates quaternion representing shortest-arc rotation operator producing vector theVecTo from vector theVecFrom.
|
|
| gp_Quaternion (const gp_Vec &theVecFrom, const gp_Vec &theVecTo, const gp_Vec &theHelpCrossVec) |
| Creates quaternion representing shortest-arc rotation operator producing vector theVecTo from vector theVecFrom. Additional vector theHelpCrossVec defines preferred direction for rotation and is used when theVecTo and theVecFrom are directed oppositely.
|
|
| gp_Quaternion (const gp_Vec &theAxis, const Standard_Real theAngle) |
| Creates quaternion representing rotation on angle theAngle around vector theAxis.
|
|
| gp_Quaternion (const gp_Mat &theMat) |
| Creates quaternion from rotation matrix 3*3 (which should be orthonormal skew-symmetric matrix)
|
|
Standard_Boolean | IsEqual (const gp_Quaternion &theOther) const |
| Simple equal test without precision.
|
|
void | SetRotation (const gp_Vec &theVecFrom, const gp_Vec &theVecTo) |
| Sets quaternion to shortest-arc rotation producing vector theVecTo from vector theVecFrom. If vectors theVecFrom and theVecTo are opposite then rotation axis is computed as theVecFrom ^ (1,0,0) or theVecFrom ^ (0,0,1).
|
|
void | SetRotation (const gp_Vec &theVecFrom, const gp_Vec &theVecTo, const gp_Vec &theHelpCrossVec) |
| Sets quaternion to shortest-arc rotation producing vector theVecTo from vector theVecFrom. If vectors theVecFrom and theVecTo are opposite then rotation axis is computed as theVecFrom ^ theHelpCrossVec.
|
|
void | SetVectorAndAngle (const gp_Vec &theAxis, const Standard_Real theAngle) |
| Create a unit quaternion from Axis+Angle representation.
|
|
void | GetVectorAndAngle (gp_Vec &theAxis, Standard_Real &theAngle) const |
| Convert a quaternion to Axis+Angle representation, preserve the axis direction and angle from -PI to +PI.
|
|
void | SetMatrix (const gp_Mat &theMat) |
| Create a unit quaternion by rotation matrix matrix must contain only rotation (not scale or shear)
|
|
gp_Mat | GetMatrix () const |
| Returns rotation operation as 3*3 matrix.
|
|
void | SetEulerAngles (const gp_EulerSequence theOrder, const Standard_Real theAlpha, const Standard_Real theBeta, const Standard_Real theGamma) |
| Create a unit quaternion representing rotation defined by generalized Euler angles.
|
|
void | GetEulerAngles (const gp_EulerSequence theOrder, Standard_Real &theAlpha, Standard_Real &theBeta, Standard_Real &theGamma) const |
| Returns Euler angles describing current rotation.
|
|
void | Set (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ, const Standard_Real theW) |
|
void | Set (const gp_Quaternion &theQuaternion) |
|
Standard_Real | X () const |
|
Standard_Real | Y () const |
|
Standard_Real | Z () const |
|
Standard_Real | W () const |
|
void | SetIdent () |
| Make identity quaternion (zero-rotation)
|
|
void | Reverse () |
| Reverse direction of rotation (conjugate quaternion)
|
|
gp_Quaternion | Reversed () const |
| Return rotation with reversed direction (conjugated quaternion)
|
|
void | Invert () |
| Inverts quaternion (both rotation direction and norm)
|
|
gp_Quaternion | Inverted () const |
| Return inversed quaternion q^-1.
|
|
Standard_Real | SquareNorm () const |
| Returns square norm of quaternion.
|
|
Standard_Real | Norm () const |
| Returns norm of quaternion.
|
|
void | Scale (const Standard_Real theScale) |
| Scale all components by quaternion by theScale; note that rotation is not changed by this operation (except 0-scaling)
|
|
void | operator*= (const Standard_Real theScale) |
|
gp_Quaternion | Scaled (const Standard_Real theScale) const |
| Returns scaled quaternion.
|
|
gp_Quaternion | operator* (const Standard_Real theScale) const |
|
void | StabilizeLength () |
| Stabilize quaternion length within 1 - 1/4. This operation is a lot faster than normalization and preserve length goes to 0 or infinity.
|
|
void | Normalize () |
| Scale quaternion that its norm goes to 1. The appearing of 0 magnitude or near is a error, so we can be sure that can divide by magnitude.
|
|
gp_Quaternion | Normalized () const |
| Returns quaternion scaled so that its norm goes to 1.
|
|
gp_Quaternion | Negated () const |
| Returns quaternion with all components negated. Note that this operation does not affect neither rotation operator defined by quaternion nor its norm.
|
|
gp_Quaternion | operator- () const |
|
gp_Quaternion | Added (const gp_Quaternion &theOther) const |
| Makes sum of quaternion components; result is "rotations mix".
|
|
gp_Quaternion | operator+ (const gp_Quaternion &theOther) const |
|
gp_Quaternion | Subtracted (const gp_Quaternion &theOther) const |
| Makes difference of quaternion components; result is "rotations mix".
|
|
gp_Quaternion | operator- (const gp_Quaternion &theOther) const |
|
gp_Quaternion | Multiplied (const gp_Quaternion &theOther) const |
| Multiply function - work the same as Matrices multiplying.
|
|
gp_Quaternion | operator* (const gp_Quaternion &theOther) const |
|
void | Add (const gp_Quaternion &theOther) |
| Adds components of other quaternion; result is "rotations mix".
|
|
void | operator+= (const gp_Quaternion &theOther) |
|
void | Subtract (const gp_Quaternion &theOther) |
| Subtracts components of other quaternion; result is "rotations mix".
|
|
void | operator-= (const gp_Quaternion &theOther) |
|
void | Multiply (const gp_Quaternion &theOther) |
| Adds rotation by multiplication.
|
|
void | operator*= (const gp_Quaternion &theOther) |
|
Standard_Real | Dot (const gp_Quaternion &theOther) const |
| Computes inner product / scalar product / Dot.
|
|
Standard_Real | GetRotationAngle () const |
| Return rotation angle from -PI to PI.
|
|
gp_Vec | Multiply (const gp_Vec &theVec) const |
| Rotates vector by quaternion as rotation operator.
|
|
gp_Vec | operator* (const gp_Vec &theVec) const |
|