SoSFRotation Class Reference
[Fields]

Field containing a rotation. More...

#include <Inventor/fields/SoSFRotation.h>

Inheritance diagram for SoSFRotation:
SoSField SoField SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
const SoSFRotationoperator= (const SoSFRotation &f)
 SoSFRotation ()
virtual ~SoSFRotation ()
const SbRotationgetValue () const
void setValue (const SbRotation &newValue)
const SbRotationoperator= (const SbRotation &newValue)
int operator== (const SoSFRotation &f) const
int operator!= (const SoSFRotation &f) const
virtual size_t getValueSize () const
void getValue (SbVec3f &axis, float &angle) const
void setValue (float q0, float q1, float q2, float q3)
void setValue (const float q[4])
void setValue (const SbVec3f &axis, float angle)
void setValue (const SbRotationd &rotd)

Static Public Member Functions

static SoType getClassTypeId ()

Detailed Description

Field containing a rotation.

A field containing a single SbRotation (an arbitrary rotation).

SoSFRotations are written to file as four floating point values separated by whitespace. The 4 values represent an axis of rotation followed by the amount of right-handed rotation about that axis, in radians. For example, a 180 degree rotation about the Y axis is:

      0 1 0 3.14159265
     

NOTE: When you specify an SoSFRotation value using setValue with 4 floating point values, those values will be interpreted as a quaternion (x, y, z, w) rather than an axis and a rotation. To specify an SoSFRotation value using an axis and a rotation, you must use the following method: setValue(const SbVec3f &axis, float angle).

SEE ALSO

SbRotation, SoField, SoSField, SoMFRotation


Constructor & Destructor Documentation

SoSFRotation::SoSFRotation (  ) 

Default constructor.

virtual SoSFRotation::~SoSFRotation (  )  [virtual]

Destructor.


Member Function Documentation

static SoType SoSFRotation::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoSField.

virtual SoType SoSFRotation::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Implements SoTypedObject.

void SoSFRotation::getValue ( SbVec3f axis,
float &  angle 
) const [inline]

Gets the value of the field as an axis/angle.

const SbRotation& SoSFRotation::getValue (  )  const [inline]

Returns this field's value.

virtual size_t SoSFRotation::getValueSize (  )  const [inline, virtual]

Get size of the value.

Reimplemented from SoField.

int SoSFRotation::operator!= ( const SoSFRotation f  )  const [inline]

Returns FALSE if otherField is of the same type and has the same value as this field.

Reimplemented from SoField.

const SbRotation& SoSFRotation::operator= ( const SbRotation newValue  )  [inline]

Sets this field to newValue.

const SoSFRotation& SoSFRotation::operator= ( const SoSFRotation f  ) 

Copy from another field of same type.

int SoSFRotation::operator== ( const SoSFRotation f  )  const

Returns TRUE if otherField is of the same type and has the same value as this field.

Reimplemented from SoField.

void SoSFRotation::setValue ( const SbRotationd rotd  ) 

Convenience method that allows you to specify a field value using a double precision variable.

Note that Open Inventor fields still store only single precision values, not double precision values. The specified value is converted to single precision, then stored.

void SoSFRotation::setValue ( const SbVec3f axis,
float  angle 
)

Sets the field to the rotation given by axis/angle.

void SoSFRotation::setValue ( const float  q[4]  ) 

Sets the field to the given quaternion (x, y, z, w).

void SoSFRotation::setValue ( float  q0,
float  q1,
float  q2,
float  q3 
)

Sets the field to the given quaternion (x, y, z, w).

void SoSFRotation::setValue ( const SbRotation newValue  ) 

Sets this field to newValue.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/