### proscene

# Class PSWorldConstraint

- `PSAxisPlaneConstraint`
- - `proscene.PSWorldConstraint`

`public class PSWorldConstraint`
`extends PSAxisPlaneConstraint`

A PSAxisPlaneConstraint defined in the world coordinate system.

The `translationConstraintDirection()` and `rotationConstraintDirection()` are expressed in the PSFrame world coordinate system (see `PSFrame.referenceFrame()`).

  ## Method Summary
  `PSQuaternion` | `constrainRotation(PSQuaternion rotation, PSFrame frame)` When `rotationConstraintType()` is of type AXIS, constrain `rotation` to be a rotation around an axis whose direction is defined in the PSFrame world coordinate system by `rotationConstraintDirection()`.
  `PVector` | `constrainTranslation(PVector translation, PSFrame frame)` Depending on `translationConstraintType()`, `constrain` translation to be along an axis or limited to a plane defined in the PSFrame world coordinate system by `translationConstraintDirection()`.

## Method Details

### constrainRotation

    public PSQuaternion constrainRotation(PSQuaternion rotation,
                                          PSFrame frame)

> When `rotationConstraintType()` is of type AXIS, constrain `rotation` to be a rotation around an axis whose direction is defined in the PSFrame world coordinate system by `rotationConstraintDirection()`.

### constrainTranslation

    public PVector constrainTranslation(PVector translation,
                                        PSFrame frame)

> Depending on `translationConstraintType()`, `constrain` translation to be along an axis or limited to a plane defined in the PSFrame world coordinate system by `translationConstraintDirection()`.

processing library glgraphics by Andres Colubri. (c) 2008