igeo
Class IStick

java.lang.Object
  extended by igeo.IDynamicsBase
      extended by igeo.IStick
All Implemented Interfaces:
IDynamics, ISubobject

public class IStick
extends IDynamicsBase

Class of IDynamics to simulate fixed length relationship between two points

Author:
Satoru Sugihara

Field Summary
 IVec frc
          just to store force difference in each time frame
 double len
           
 double maxTension
           
 IParticleI pt1
           
 IParticleI pt2
           
 
Fields inherited from class igeo.IDynamicsBase
parent, targets
 
Constructor Summary
IStick(IParticleI p1, IParticleI p2)
           
IStick(IParticleI p1, IParticleI p2, IObject parent)
           
IStick(IVecI p1, IVecI p2)
           
IStick(IVecI p1, IVecI p2, IObject parent)
           
 
Method Summary
 IStick parent(IObject par)
          setting parent object
 IParticleI particle(int i)
          alias of pt1()
 IParticleI particle1()
          alias of pt1()
 IParticleI particle2()
          alias of pt2()
 IVec pos(int i)
          position of particle(i)
 IVec pos1()
          position of particle1()
 IVec pos2()
          position of particle2()
 void postinteract(java.util.ArrayList<IDynamics> agents)
          executed after interact(ArrayList).
 void postupdate()
          executed after update().
 void preupdate()
          after each particle receive all forces
 IParticleI pt(int i)
          getting end point.
 IParticleI pt1()
          getting end point1.
 IParticleI pt2()
          getting end point2.
 IStick removeTarget(int i)
          remove target object.
 IStick removeTarget(IObject obj)
          remove target object.
 IStick target(IObject targetObj)
          add terget object to be updated by this dynamic object.
 
Methods inherited from class igeo.IDynamicsBase
initDynamicsBase, initDynamicsBase, initDynamicsBase, interact, localDynamics, parent, preinteract, target, targetNum, targets, update, updateTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pt1

public IParticleI pt1

pt2

public IParticleI pt2

frc

public IVec frc
just to store force difference in each time frame


len

public double len

maxTension

public double maxTension
Constructor Detail

IStick

public IStick(IParticleI p1,
              IParticleI p2,
              IObject parent)

IStick

public IStick(IVecI p1,
              IVecI p2,
              IObject parent)

IStick

public IStick(IParticleI p1,
              IParticleI p2)

IStick

public IStick(IVecI p1,
              IVecI p2)
Method Detail

pt

public IParticleI pt(int i)
getting end point. i==0 or i==1. if i is other value, returns first point.


particle

public IParticleI particle(int i)
alias of pt1()


pos

public IVec pos(int i)
position of particle(i)


pt1

public IParticleI pt1()
getting end point1.


particle1

public IParticleI particle1()
alias of pt1()


pos1

public IVec pos1()
position of particle1()


pt2

public IParticleI pt2()
getting end point2.


particle2

public IParticleI particle2()
alias of pt2()


pos2

public IVec pos2()
position of particle2()


parent

public IStick parent(IObject par)
Description copied from interface: ISubobject
setting parent object

Specified by:
parent in interface ISubobject
Overrides:
parent in class IDynamicsBase

target

public IStick target(IObject targetObj)
Description copied from class: IDynamicsBase
add terget object to be updated by this dynamic object.

Specified by:
target in interface IDynamics
Overrides:
target in class IDynamicsBase

removeTarget

public IStick removeTarget(int i)
Description copied from class: IDynamicsBase
remove target object.

Specified by:
removeTarget in interface IDynamics
Overrides:
removeTarget in class IDynamicsBase

removeTarget

public IStick removeTarget(IObject obj)
Description copied from class: IDynamicsBase
remove target object.

Specified by:
removeTarget in interface IDynamics
Overrides:
removeTarget in class IDynamicsBase

preupdate

public void preupdate()
after each particle receive all forces

Specified by:
preupdate in interface IDynamics
Overrides:
preupdate in class IDynamicsBase

postinteract

public void postinteract(java.util.ArrayList<IDynamics> agents)
Description copied from interface: IDynamics
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).

Specified by:
postinteract in interface IDynamics
Overrides:
postinteract in class IDynamicsBase

postupdate

public void postupdate()
Description copied from interface: IDynamics
executed after update(). behavior can be changed by IConfig.enablePostupdate and IConfig.loopPostupdate.

Specified by:
postupdate in interface IDynamics
Overrides:
postupdate in class IDynamicsBase