Webots Reference Manual

previous page go up next page

Thanks

1. Introduction

2. Node Chart

3. Nodes and API Functions

4. Motion Functions

5. Prototypes

6. Physics Plugin

7. Fast2D Plugin

8. MTN Functions

9. Webots World Files

     

3.44 Transform

Derived from Group.

Transform {
  SFVec3f      translation   0 0 0     # (-inf,inf)
  SFRotation   rotation      0 1 0 0   # [-1,1],(-inf,inf)
  SFVec3f      scale         1 1 1     # (-inf,inf)
}

Direct derived nodes: Solid.

3.44.1 Description

The Transform node is a grouping node that defines a coordinate system for its children that is relative to the coordinate systems of its parent.

3.44.2 Field Summary

  • The translation field defines the translation from the parent coordinate system to the children's coordinate system.

  • The rotation field defines an arbitrary rotation of the children's coordinate system with respect to the parent coordinate system. This field contains four floating point values: rx, ry, rz and alpha. The first three numbers, rx ry rz, define the normalized rotation axis around which the rotation must be carried out. The fourth value, alpha, specifies the rotation angle around the axis in radians. When alpha is zero, no rotation is carried out. All the values of the rotation field can be positive or negative, however, note that the length of the rx ry rz axis must be normalized (length=1.0), otherwise the outcome of the simulation is undefined.

    For example, a rotation of pi/2 radians around the z-axis is represented like this:

    rotation 0 0 1 1.5708

    A rotation of pi radians around an axis located exactly between the x and y-axis is represented like this:

    rotation 0.7071 0.7071 0 3.1416

    And finally, note that these two rotations are identical:

    rotation 0 1 0 -1.5708
    rotation 0 -1 0 1.5708

  • The scale field specifies a (possibly) non-uniform scale. Note that only the scaling of graphical objects is possible. The scale fields of Solid (or derived) nodes, as well as all the scale fields placed inside boundingObjects must remain 1 1 1 because the simulation engine does not support the scaling of rigid bodies.

previous page go up next page
^ page top ^

  E-mail to webmaster Last updated: Copyright © 2008 Cyberbotics Ltd.