|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectigeo.IDynamicsBase
igeo.ISpring
public class ISpring
Class of IDynamics to simulate spring force between two particles with specified length.
Field Summary | |
---|---|
boolean |
constantTension
if constantTension is true, amount of force is always constant and it's equals to tension. |
double |
length
|
double |
maxTension
|
IParticleI |
pt1
|
IParticleI |
pt2
|
double |
tension
tension is a coefficient to convert distance of two points to amount of force. |
Fields inherited from class igeo.IDynamicsBase |
---|
parent, targets |
Fields inherited from interface igeo.ITensionI |
---|
defaultTension |
Constructor Summary | |
---|---|
ISpring(IParticleI p1,
IParticleI p2)
|
|
ISpring(IParticleI p1,
IParticleI p2,
double tension)
|
|
ISpring(IParticleI p1,
IParticleI p2,
double tension,
double length)
|
|
ISpring(IParticleI p1,
IParticleI p2,
double tension,
double length,
IObject parent)
|
|
ISpring(IParticleI p1,
IParticleI p2,
double tension,
IObject parent)
|
|
ISpring(IParticleI p1,
IParticleI p2,
IObject parent)
|
|
ISpring(IVecI p1,
IVecI p2)
|
|
ISpring(IVecI p1,
IVecI p2,
double tension)
|
|
ISpring(IVecI p1,
IVecI p2,
double tension,
double length)
|
|
ISpring(IVecI p1,
IVecI p2,
double tension,
double length,
IObject parent)
|
|
ISpring(IVecI p1,
IVecI p2,
double tension,
IObject parent)
|
|
ISpring(IVecI p1,
IVecI p2,
IObject parent)
|
Method Summary | |
---|---|
boolean |
constant()
if constantTension is true, amount of force is always constant and it's equals to tension. |
ISpring |
constant(boolean cnst)
if constantTension is true, amount of force is always constant and it's equals to tension. |
void |
interact(java.util.ArrayList<IDynamics> dynamics)
behavior definition of interaction with other dynamic objects. |
double |
len()
get length |
ISpring |
len(double length)
set length |
ISpring |
len(IVecI p1,
IVecI p2)
set length by two points |
double |
length()
alias of len |
ISpring |
length(double length)
alias of len |
ISpring |
length(IVecI p1,
IVecI p2)
alias of len |
double |
maxTension()
if maxTension is set to be positive number, it limits the force (distance * tension) is cut off at maxTension. |
ISpring |
maxTension(double maxTension)
if maxTension is set to be positive number, it limits the force (distance * tension) is cut off at maxTension if constant is set, maxTension is ignored. |
ISpring |
parent(IObject par)
setting parent object |
IParticleI |
particle(int i)
alias of pt(int) |
IParticleI |
particle1()
alias of pt1() |
IParticleI |
particle2()
alias of pt2() |
IVec |
pos(int i)
position of particle(int i) |
IVec |
pos1()
position of particle1 |
IVec |
pos2()
position of particle2 |
IParticleI |
pt(int i)
getting end point. |
IParticleI |
pt1()
getting end point1. |
IParticleI |
pt2()
getting end point2. |
ISpring |
removeTarget(int i)
remove target object. |
ISpring |
removeTarget(IObject obj)
remove target object. |
ISpring |
target(IObject targetObj)
add terget object to be updated by this dynamic object. |
double |
tension()
tension is a coefficient to convert distance of two points to amount of force. |
ISpring |
tension(double tension)
tension is a coefficient to convert distance of two points to amount of force. |
Methods inherited from class igeo.IDynamicsBase |
---|
initDynamicsBase, initDynamicsBase, initDynamicsBase, localDynamics, parent, postinteract, postupdate, preinteract, preupdate, 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 |
---|
public IParticleI pt1
public IParticleI pt2
public double tension
public boolean constantTension
public double maxTension
public double length
Constructor Detail |
---|
public ISpring(IParticleI p1, IParticleI p2, double tension, double length, IObject parent)
public ISpring(IVecI p1, IVecI p2, double tension, double length, IObject parent)
public ISpring(IParticleI p1, IParticleI p2, double tension, IObject parent)
public ISpring(IVecI p1, IVecI p2, double tension, IObject parent)
public ISpring(IParticleI p1, IParticleI p2, IObject parent)
public ISpring(IVecI p1, IVecI p2, IObject parent)
public ISpring(IParticleI p1, IParticleI p2, double tension, double length)
public ISpring(IVecI p1, IVecI p2, double tension, double length)
public ISpring(IParticleI p1, IParticleI p2, double tension)
public ISpring(IVecI p1, IVecI p2, double tension)
public ISpring(IParticleI p1, IParticleI p2)
public ISpring(IVecI p1, IVecI p2)
Method Detail |
---|
public double tension()
ITensionI
tension
in interface ITensionI
public ISpring tension(double tension)
ITensionI
tension
in interface ITensionI
public boolean constant()
ITensionI
constant
in interface ITensionI
public ISpring constant(boolean cnst)
ITensionI
constant
in interface ITensionI
public double maxTension()
maxTension
in interface ITensionI
public ISpring maxTension(double maxTension)
maxTension
in interface ITensionI
public double len()
ISpringI
len
in interface ISpringI
public ISpring len(double length)
ISpringI
len
in interface ISpringI
public ISpring len(IVecI p1, IVecI p2)
ISpringI
len
in interface ISpringI
public double length()
ISpringI
length
in interface ISpringI
public ISpring length(double length)
ISpringI
length
in interface ISpringI
public ISpring length(IVecI p1, IVecI p2)
ISpringI
length
in interface ISpringI
public IParticleI pt(int i)
pt
in interface ITensionI
public IParticleI particle(int i)
particle
in interface ITensionI
public IVec pos(int i)
pos
in interface ITensionI
public IParticleI pt1()
pt1
in interface ITensionI
public IParticleI particle1()
particle1
in interface ITensionI
public IVec pos1()
pos1
in interface ITensionI
public IParticleI pt2()
pt2
in interface ITensionI
public IParticleI particle2()
particle2
in interface ITensionI
public IVec pos2()
pos2
in interface ITensionI
public ISpring parent(IObject par)
ISubobject
parent
in interface ISubobject
parent
in class IDynamicsBase
public ISpring target(IObject targetObj)
IDynamicsBase
target
in interface IDynamics
target
in class IDynamicsBase
public ISpring removeTarget(int i)
IDynamicsBase
removeTarget
in interface IDynamics
removeTarget
in class IDynamicsBase
public ISpring removeTarget(IObject obj)
IDynamicsBase
removeTarget
in interface IDynamics
removeTarget
in class IDynamicsBase
public void interact(java.util.ArrayList<IDynamics> dynamics)
IDynamicsBase
interact
in interface IDynamics
interact
in class IDynamicsBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |