XdkWrl: MFRotation Class Reference

Home | Hierarchy | Members | Alphabetical | Related Pages

# MFRotation Class Reference
[Field Types]

`#include <mfrotation.h>`

Inherits deque.

List of all members.

## Static Public Member Functions
static const char * | typeName ()
static FieldTypeId | typeId ()
## Friends
std::ostream & | operator<< (std::ostream &s, const MFRotation &f)

## Detailed Description

A MFRotation is a container of SFRotation. It is implemented using a STL's deque so you can benefit from its interface. Most common functionnalities you would use are:

       MFRotation mf;
       mf.push_back(SFRotation(45.0f,0.0f,1.0f,0.0f));
       mf.push_front(SFRotation(-45.0f,0.0f,1.0f,0.0f));
       mf[0].setAngle(60.0f);

but since it uses STL principles, you have all useful concepts such as iterator, algorithms, etc...

Below is included the documentation for this field type from the ISO standard.

## 5.8 SFRotation and MFRotation

The SFRotation field and event specifies one arbitrary rotation. The MFRotation field and event specifies zero or more arbitrary rotations. An SFRotation is written to the VRML file as four ISO C floating point values (see 2.[ISOC]) separated by whitespace. The first three values specify a normalized rotation axis vector about which the rotation takes place. The fourth value specifies the amount of right-handed rotation about that axis in radians. For example, an SFRotation containing a PI radians rotation about the Y axis is:

        fooRot 0.0 1.0 0.0 3.14159265

The 3x3 matrix representation of a rotation (x y z a) is

        [ tx2+c    txy+sz    txz-sy
          txy-sz   ty2+c     tyz+sx
          txz+sy   tyz-sx    tz2+c  ]

        where c = cos(a), s = sin(a), and t = 1-c

The initial value of an SFRotation eventOut is (0 0 1 0). The initial value of an MFRotation eventOut is [ ].

## Member Function Documentation

const char * typeName | ( |  | ) | `[inline, static]`

FieldTypeId typeId | ( |  | ) | `[inline, static]`

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | s,
|  | const MFRotation & | f |
| ) |  |  | `[friend]`

Generated on 5 Jan 2007 with version 1.5.1. |