.TH "SoSFRotation" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoSFRotation \- .PP The \fBSoSFRotation\fP class is a container for an \fBSbRotation\fP\&. .PP This field is used where nodes, engines or other field containers needs to store a single rotation definition\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoSField\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .ti -1c .RI "virtual void \fBcopyFrom\fP (const \fBSoField\fP &field)" .br .ti -1c .RI "const \fBSoSFRotation\fP & \fBoperator=\fP (const \fBSoSFRotation\fP &field)" .br .ti -1c .RI "virtual SbBool \fBisSame\fP (const \fBSoField\fP &field) const " .br .ti -1c .RI "const \fBSbRotation\fP & \fBgetValue\fP (void) const " .br .ti -1c .RI "void \fBsetValue\fP (const \fBSbRotation\fP &newvalue)" .br .ti -1c .RI "const \fBSbRotation\fP & \fBoperator=\fP (const \fBSbRotation\fP &newvalue)" .br .ti -1c .RI "int \fBoperator==\fP (const \fBSoSFRotation\fP &field) const " .br .ti -1c .RI "int \fBoperator!=\fP (const \fBSoSFRotation\fP &field) const " .br .ti -1c .RI "void \fBgetValue\fP (\fBSbVec3f\fP &axis, float &angle) const " .br .ti -1c .RI "void \fBsetValue\fP (const float q0, const float q1, const float q2, const float q3)" .br .ti -1c .RI "void \fBsetValue\fP (const float q[4])" .br .ti -1c .RI "void \fBsetValue\fP (const \fBSbVec3f\fP &axis, const float angle)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static void * \fBcreateInstance\fP (void)" .br .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "\fBSbRotation\fP \fBvalue\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoSFRotation\fP class is a container for an \fBSbRotation\fP\&. .PP This field is used where nodes, engines or other field containers needs to store a single rotation definition\&. Fields of this type stores their value to file as a rotation axis vector plus a rotation angle: 'axis0 axis1 axis2 angle'\&. .PP Note that there is one \fIvery\fP common mistake that is easy to make when setting the value of an \fBSoSFRotation\fP field, and that is to inadvertently use the wrong \fBSbRotation\fP constructor\&. This example should clarify the problem: .PP .PP .nf mytransformnode->rotation\&.setValue(0, 0, 1, 1\&.5707963f); .fi .PP .PP The programmer clearly tries to set a PI/2 rotation around the Z axis, but this will fail, as the \fBSbRotation\fP constructor invoked above is the one that takes as arguments the 4 floats of a \fIquaternion\fP\&. What the programmer almost certainly wanted to do was to use the \fBSbRotation\fP constructor that takes a rotation vector and a rotation angle, which is invoked like this: .PP .PP .nf mytransformnode->rotation\&.setValue(SbVec3f(0, 0, 1), 1\&.5707963f); .fi .PP .PP \fBSee also:\fP .RS 4 \fBSoMFRotation\fP .RE .PP .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoSFRotation::getTypeId (void) const\fC [virtual]\fP" Returns the type identification instance which uniquely identifies the Coin field class the object belongs to\&. .PP \fBSee also:\fP .RS 4 getClassTypeId(), \fBSoType\fP .RE .PP .PP Implements \fBSoField\fP\&. .SS "void SoSFRotation::copyFrom (const \fBSoField\fP &f)\fC [virtual]\fP" Copy value(s) from \fIf\fP into this field\&. \fIf\fP must be of the same type as this field\&. .PP Implements \fBSoField\fP\&. .SS "SbBool SoSFRotation::isSame (const \fBSoField\fP &f) const\fC [virtual]\fP" Check for equal type and value(s)\&. .PP Implements \fBSoField\fP\&. .SS "void SoSFRotation::getValue (\fBSbVec3f\fP &axis, float &angle) const" Return value of rotation as an \fIaxis\fP and an \fIangle\fP around this \fIaxis\fP\&. .SS "void SoSFRotation::setValue (const floatq0, const floatq1, const floatq2, const floatq3)" Set the rotation from a set of quaternion values\&. .SS "void SoSFRotation::setValue (const floatq[4])" Set the rotation from a set of quaternion values\&. .SS "void SoSFRotation::setValue (const \fBSbVec3f\fP &axis, const floatangle)" Set the rotation from an \fIaxis\fP and an \fIangle\fP around this \fIaxis\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.