igeo

## Interface IDynamics

- All Superinterfaces:
    ISubobject
  All Known Implementing Classes:
    I2DField, I2DMapField, I2DSurfaceNormalField, I2DSurfacePositionField, I2DSurfaceSlopeField, I2DSurfaceUTangentField, I2DSurfaceVTangentField, I3DField, IAgent, IAgentTracker, IAttractor, IBoid, IBoidGeo, IBoidTrajectory, ICompoundField, ICurveAttractorField, ICurveCurlField, ICurvePositionField, ICurveTangentField, IDataAgent, IDynamicsBase, IField, IFieldVisualizer, IGravity, ILineAgent, ILineAgentGeo, ILinkedDataAgent, ILinkedNodeMeshAgent, ILinkedNodeMeshField, ILinkedScalarAgent, ILinkedVec2Agent, ILinkedVecAgent, IMeshAgent, IMeshNormalField, IParticle, IParticleAgent, IParticleDirectionLink, IParticleDistanceLink, IParticleGeo, IParticleOnCurve, IParticleOnCurveAgent, IParticleOnCurveGeo, IParticleOnMeshGeo, IParticleOnPlane, IParticleOnPlaneGeo, IParticleOnSurface, IParticleOnSurfaceGeo, IParticleTrajectory, IPlanarAttractor, IPlaneAttractorField, IPointAgent, IPointCurlField, IScalarField, ISpacingEqualizer, ISpring, ISpringLine, IStick, IStickLine, IStraightener, IString, IStringLine, ISurfaceAttractorField, ISurfaceNormalField, ISurfacePositionField, ISurfaceSlopeField, ISurfaceUTangentField, ISurfaceVTangentField, ITensileNet.IParticleCoupler, ITension, ITensionLine, ITensionOnCurve, ITrajectoryGeo, ITriangleWall, IWall

      public interface IDynamics
      extends ISubobject

  Interface of a subobject of IObject to control dynamic behavior of IObject.
  Author:
    Satoru Sugihara

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `interact(java.util.ArrayList<IDynamics> dynamics)` behavior definition of interaction with other dynamic objects.
    `java.util.ArrayList<IDynamics>` | `localDynamics()` IDynamics can have local dynamics which is managed by parent dynamics.
    `void` | `postinteract(java.util.ArrayList<IDynamics> dynamics)` executed after interact(ArrayList).
    `void` | `postupdate()` executed after update().
    `void` | `preinteract(java.util.ArrayList<IDynamics> dynamics)` executed before interact(ArrayList).
    `void` | `preupdate()` executed before update().
    `IDynamics` | `removeTarget(int i)` remove target object.
    `IDynamics` | `removeTarget(IObject obj)` remove target object.
    `IObject` | `target(int i)` get target object.
    `IDynamics` | `target(IObject targetObj)` add terget object to be updated by this dynamic object.
    `int` | `targetNum()` get total target number.
    `java.util.ArrayList<IObject>` | `targets()` get all target objects.
    `void` | `update()` behavior definition of updating dynamics in each time frame
    `void` | `updateTarget()` update all terget objects (should be called when the dynamic object is updated).

    - ### Methods inherited from interface igeo.ISubobject

      `parent, parent`

- - ### Method Detail

    - #### interact

          void interact(java.util.ArrayList<IDynamics> dynamics)

      behavior definition of interaction with other dynamic objects. The server puts all dynamic objects including itself.

    - #### update

          void update()

      behavior definition of updating dynamics in each time frame

    - #### preinteract

          void preinteract(java.util.ArrayList<IDynamics> dynamics)

      executed before interact(ArrayList). behavior can be changed by IConfig.enablePreinteract and IConfig.loopPreinteract.

    - #### postinteract

          void postinteract(java.util.ArrayList<IDynamics> dynamics)

      executed after interact(ArrayList). behavior can be changed by IConfig.enablePostinteract and IConfig.loopPostinteract. If IConfig.loopPostinteract is false, preupdate is executed before post interact (updated 2012/08/26).

    - #### preupdate

          void preupdate()

      executed before update(). behavior can be changed by IConfig.enablePreupdate and IConfig.loopPreupdate. If IConfig.loopPreupdate is false, preupdate is executed before post interact (updated 2012/08/26).

    - #### postupdate

          void postupdate()

      executed after update(). behavior can be changed by IConfig.enablePostupdate and IConfig.loopPostupdate.

    - #### localDynamics

          java.util.ArrayList<IDynamics> localDynamics()

      IDynamics can have local dynamics which is managed by parent dynamics. IAgent implements this feature

    - #### target

          IDynamics target(IObject targetObj)

      add terget object to be updated by this dynamic object.

    - #### targetNum

          int targetNum()

      get total target number.

    - #### target

          IObject target(int i)

      get target object.

    - #### targets

          java.util.ArrayList<IObject> targets()

      get all target objects.

    - #### removeTarget

          IDynamics removeTarget(int i)

      remove target object.

    - #### removeTarget

          IDynamics removeTarget(IObject obj)

      remove target object.

    - #### updateTarget

          void updateTarget()

      update all terget objects (should be called when the dynamic object is updated).