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.behaviors
Class AttractionBehavior

    java.lang.Object
      toxi.physics.behaviors.AttractionBehavior

All Implemented Interfaces:
  ParticleBehavior

    public class AttractionBehavior

extends java.lang.Object
implements ParticleBehavior

Constructor Summary
`AttractionBehavior(toxi.geom.Vec3D attractor, float radius, float strength)`
`AttractionBehavior(toxi.geom.Vec3D attractor, float radius, float strength, float jitter)`

Method Summary
`void` | `apply(VerletParticle p)` Applies the constraint to the passed in particle.
`void` | `configure(float timeStep)`
`toxi.geom.Vec3D` | `getAttractor()`
`float` | `getJitter()`
`float` | `getRadius()`
`float` | `getStrength()`
`void` | `setAttractor(toxi.geom.Vec3D attractor)`
`void` | `setJitter(float jitter)`
`void` | `setRadius(float r)`
`void` | `setStrength(float strength)`

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

Constructor Detail

### AttractionBehavior

    public AttractionBehavior(toxi.geom.Vec3D attractor,
                              float radius,
                              float strength)

### AttractionBehavior

    public AttractionBehavior(toxi.geom.Vec3D attractor,
                              float radius,
                              float strength,
                              float jitter)

Method Detail

### apply

    public void apply(VerletParticle p)

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

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

### configure

    public void configure(float timeStep)

  Specified by:
    `configure` in interface `ParticleBehavior`

### getAttractor

    public toxi.geom.Vec3D getAttractor()

  Returns:
    the attractor

### getJitter

    public float getJitter()

  Returns:
    the jitter

### getRadius

    public float getRadius()

  Returns:
    the radius

### getStrength

    public float getStrength()

  Returns:
    the strength

### setAttractor

    public void setAttractor(toxi.geom.Vec3D attractor)

  Parameters:
    `attractor` - the attractor to set

### setJitter

    public void setJitter(float jitter)

  Parameters:
    `jitter` - the jitter to set

### setRadius

    public void setRadius(float r)

### setStrength

    public void setStrength(float strength)

  Parameters:
    `strength` - the strength to set

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