Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## toxi.physics.constraints
Class PlaneConstraint

    java.lang.Object
      toxi.physics.constraints.PlaneConstraint

All Implemented Interfaces:
  ParticleConstraint

    public class PlaneConstraint

extends java.lang.Object
implements ParticleConstraint

Constrains a particle's movement by locking it to a fixed axis aligned plane.

Field Summary
`toxi.geom.Vec3D.Axis` | `axis1`
`toxi.geom.Vec3D.Axis` | `axis2`
`toxi.geom.Vec3D` | `constraint`

Constructor Summary
`PlaneConstraint(toxi.geom.Vec3D.Axis axis, toxi.geom.Vec3D.Axis axis2, toxi.geom.Vec3D constraint)`

Method Summary
`void` | `apply(VerletParticle p)` Applies the constraint to the passed in particle.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### constraint

    public toxi.geom.Vec3D constraint

### axis1

    public toxi.geom.Vec3D.Axis axis1

### axis2

    public toxi.geom.Vec3D.Axis axis2

Constructor Detail

### PlaneConstraint

    public PlaneConstraint(toxi.geom.Vec3D.Axis axis,
                           toxi.geom.Vec3D.Axis axis2,
                           toxi.geom.Vec3D constraint)

Parameters:
  `axis` - 1st axis to lock
  `axis2` - 2d axis to lock
  `constraint` - point on the desired constraint plane

Method Detail

### apply

    public void apply(VerletParticle p)

  Description copied from interface: `ParticleConstraint`
  Applies the constraint to the passed in particle. The method is assumed to manipulate the given instance directly.

  Specified by:
    `apply` in interface `ParticleConstraint`
  Parameters:
    `p` - particle

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD