Home Hierarchy Members Alphabetical Related Pages

SFRotation Class Reference
[Field Types]

#include <sfrotation.h>

List of all members.

Public Member Functions

 SFRotation ()
 SFRotation (const float x, const float y, const float z, const float angle)
SFRotationoperator= (const SFRotation &r)
const float * axis () const
float angle () const
void setAxis (const float x, const float y, const float z)
void setAngle (const float)
void setAxisAndAngle (const float x, const float y, const float z, const float a)
bool operator== (const SFRotation &r) const

Static Public Member Functions

const char * typeName ()
FieldTypeId typeId ()

Friends

std::ostream & operator<< (std::ostream &s, const SFRotation &f)


Detailed Description

Represents a rotation of a given angle around an axis. 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 [ ].

--- VRML separator bar ---


Constructor & Destructor Documentation

SFRotation  )  [inline]
 

SFRotation const float  x,
const float  y,
const float  z,
const float  angle
[inline]
 


Member Function Documentation

float angle  )  const [inline]
 

const float * axis  )  const [inline]
 

SFRotation & operator= const SFRotation r  )  [inline]
 

bool operator== const SFRotation r  )  const [inline]
 

void setAngle const   float  )  [inline]
 

void setAxis const float  x,
const float  y,
const float  z
[inline]
 

void setAxisAndAngle const float  x,
const float  y,
const float  z,
const float  a
[inline]
 

FieldTypeId typeId  )  [inline, static]
 

const char * typeName  )  [inline, static]
 


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  s,
const SFRotation f
[friend]
 


Generated on 24 Feb 2005 with doxygen version 1.3.9.1. Valid HTML 4.0! Valid CSS!