public class ITensionLine extends ICurve implements ITensionI, IDynamics
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<IObject> |
targets
target objects to be updated by dynamic object
|
ITension |
tensionDynamics |
defaultTension
Constructor and Description |
---|
ITensionLine(IParticleI p1,
IParticleI p2) |
ITensionLine(IParticleI p1,
IParticleI p2,
double tension) |
ITensionLine(IVecI p1,
IVecI p2) |
ITensionLine(IVecI p1,
IVecI p2,
double tension) |
Modifier and Type | Method and Description |
---|---|
ITensionLine |
attr(IAttribute at)
set attributes
|
ITensionLine |
clr(java.awt.Color c) |
ITensionLine |
clr(java.awt.Color c,
double alpha) |
ITensionLine |
clr(java.awt.Color c,
float alpha) |
ITensionLine |
clr(java.awt.Color c,
int alpha) |
ITensionLine |
clr(double dgray) |
ITensionLine |
clr(double dgray,
double dalpha) |
ITensionLine |
clr(double dr,
double dg,
double db) |
ITensionLine |
clr(double dr,
double dg,
double db,
double da) |
ITensionLine |
clr(float fgray) |
ITensionLine |
clr(float fgray,
float falpha) |
ITensionLine |
clr(float fr,
float fg,
float fb) |
ITensionLine |
clr(float fr,
float fg,
float fb,
float fa) |
ITensionLine |
clr(IColor c)
to set an object color
|
ITensionLine |
clr(IColor c,
double alpha)
to set color, with alpha value overwritten
|
ITensionLine |
clr(IColor c,
float alpha)
to set color, with alpha value overwritten
|
ITensionLine |
clr(IColor c,
int alpha)
to set color, with alpha value overwritten
|
ITensionLine |
clr(int gray) |
ITensionLine |
clr(int gray,
int alpha) |
ITensionLine |
clr(int r,
int g,
int b) |
ITensionLine |
clr(int r,
int g,
int b,
int a) |
ITensionLine |
clr(IObject o)
to set the same color with the object
|
boolean |
constant()
if constantTension is true, amount of force is always constant and it's equals to tension.
|
ITensionLine |
constant(boolean cnst)
if constantTension is true, amount of force is always constant and it's equals to tension.
|
ITensionLine |
hide() |
ITensionLine |
hsb(double h,
double s,
double b) |
ITensionLine |
hsb(double h,
double s,
double b,
double a) |
ITensionLine |
hsb(float h,
float s,
float b) |
ITensionLine |
hsb(float h,
float s,
float b,
float a) |
void |
initTensionLine(IParticleI p1,
IParticleI p2) |
void |
initTensionLine(IParticleI p1,
IParticleI p2,
double tension) |
void |
interact(java.util.ArrayList<IDynamics> dynamics)
behavior definition of interaction with other dynamic objects.
|
ITensionLine |
layer(ILayer l)
Set layer by ILayer object
|
ITensionLine |
layer(java.lang.String l)
Set layer by layer name.
|
java.util.ArrayList<IDynamics> |
localDynamics()
IDynamicsBase doesn't implement local dynamics feature
|
double |
maxTension()
if maxTension is set to be positive number, it limits the force (distance * tension) is cut off at maxTension.
|
ITensionLine |
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.
|
ITensionLine |
name(java.lang.String nm)
IObject methods
|
ITensionLine |
parent()
for IDynamics
|
ITensionLine |
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(i)
|
IVec |
pos1()
position of particle1
|
IVec |
pos2()
position of particle2
|
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().
|
IParticleI |
pt(int i)
getting end point.
|
IParticleI |
pt1()
getting end point1.
|
IParticleI |
pt2()
getting end point2.
|
ITensionLine |
removeTarget(int i)
remove target object.
|
ITensionLine |
removeTarget(IObject obj)
remove target object.
|
ITensionLine |
setColor(java.awt.Color c) |
ITensionLine |
setColor(java.awt.Color c,
double alpha) |
ITensionLine |
setColor(java.awt.Color c,
float alpha) |
ITensionLine |
setColor(java.awt.Color c,
int alpha) |
ITensionLine |
setColor(double dgray) |
ITensionLine |
setColor(double dgray,
double dalpha) |
ITensionLine |
setColor(double dr,
double dg,
double db) |
ITensionLine |
setColor(double dr,
double dg,
double db,
double da) |
ITensionLine |
setColor(float fgray) |
ITensionLine |
setColor(float fgray,
float falpha) |
ITensionLine |
setColor(float fr,
float fg,
float fb) |
ITensionLine |
setColor(float fr,
float fg,
float fb,
float fa) |
ITensionLine |
setColor(IColor c) |
ITensionLine |
setColor(IColor c,
double alpha) |
ITensionLine |
setColor(IColor c,
float alpha) |
ITensionLine |
setColor(IColor c,
int alpha) |
ITensionLine |
setColor(int gray) |
ITensionLine |
setColor(int gray,
int alpha) |
ITensionLine |
setColor(int r,
int g,
int b) |
ITensionLine |
setColor(int r,
int g,
int b,
int a) |
ITensionLine |
setHSBColor(double h,
double s,
double b) |
ITensionLine |
setHSBColor(double h,
double s,
double b,
double a) |
ITensionLine |
setHSBColor(float h,
float s,
float b) |
ITensionLine |
setHSBColor(float h,
float s,
float b,
float a) |
ITensionLine |
show() |
IObject |
target(int i)
get target object.
|
ITensionLine |
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.
|
double |
tension()
tension is a coefficient to convert distance of two points to amount of force.
|
ITensionLine |
tension(double tensionIntensity)
tension is a coefficient to convert distance of two points to amount of force.
|
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).
|
ITensionLine |
weight(double w) |
ITensionLine |
weight(float w) |
add, add, add, add, add, add, add, addCP, addCP, addCP, addCP, addCP, addCP, addCP, addCP, center, closePt, closePt, cp, cp, cp, cp, cp, cp, cpNum, cpNum, cpNum, cps, createGraphic, deg, deg, deg, dist, dist, div, div, dup, end, endCP, ep, ep, epNum, epNum, epNum, flip, flipU, get, initCurve, insertCP, insertCP, intersectPlane, intersectPlane, isClosed, isClosed, isClosed, isInside2d, isInside2d, isRational, isRational, isRational, isValid, knot, knot, knotNum, knotNum, knotNum, knots, knots, knots, len, len, len, mid, mirror, mirror, mul, mul, mv, mv, mv, neg, num, num, num, pt, pt, ref, ref, removeCP, removeCP, removeCP, rev, revU, rot, rot, rot, rot, rot, rot, rot, rot, rot2, rot2, rot2, rot2, rot2, rot2, scale, scale, scale, scale, scale1d, scale1d, scale1d, scale1d, shear, shear, shear, shear, shearXY, shearXY, shearXY, shearXY, shearYZ, shearYZ, shearYZ, shearYZ, shearZX, shearZX, shearZX, shearZX, start, startCP, sub, sub, sub, tan, tan, transform, transform, transform, transform, translate, translate, translate, u, u, u, u, u, u, u, u, uend, uend, uend, ustart, ustart, ustart
addDynamics, addUserData, addUserData, alpha, alphaInt, attr, attr, awtColor, blue, blueInt, brightness, castStringHashMap, clearDynamics, clearGraphics, clr, defaultAttribute, del, deletDynamics, deleteDynamics, deleteDynamics, deleteGraphic, dynamicsNum, getAWTColor, getColor, getDynamics, getGraphic, getGraphic, getParameter, graphicsNum, gray, grayInt, green, greenInt, grey, greyInt, hue, initGraphic, initObject, isVisible, layer, name, red, redInt, resetGraphic, saturation, server, setParameter, setTexture, syncColor, syncGraphic, syncVisibility, syncWeight, texture, updateGraphic, userData, userData, userData, userDataNum, visible, weight
public ITension tensionDynamics
public java.util.ArrayList<IObject> targets
public ITensionLine(IParticleI p1, IParticleI p2)
public ITensionLine(IParticleI p1, IParticleI p2, double tension)
public void initTensionLine(IParticleI p1, IParticleI p2)
public void initTensionLine(IParticleI p1, IParticleI p2, double tension)
public double tension()
ITensionI
public ITensionLine tension(double tensionIntensity)
ITensionI
public boolean constant()
ITensionI
public ITensionLine constant(boolean cnst)
ITensionI
public double maxTension()
maxTension
in interface ITensionI
public ITensionLine maxTension(double maxTension)
maxTension
in interface ITensionI
public IParticleI pt(int i)
public IParticleI particle(int i)
public IParticleI pt1()
public IParticleI particle1()
public IParticleI pt2()
public IParticleI particle2()
public ITensionLine parent()
parent
in interface ISubobject
public ITensionLine parent(IObject par)
ISubobject
parent
in interface ISubobject
public java.util.ArrayList<IDynamics> localDynamics()
localDynamics
in interface IDynamics
public ITensionLine target(IObject targetObj)
IDynamics
public int targetNum()
public java.util.ArrayList<IObject> targets()
public ITensionLine removeTarget(int i)
removeTarget
in interface IDynamics
public ITensionLine removeTarget(IObject obj)
removeTarget
in interface IDynamics
public void updateTarget()
updateTarget
in interface IDynamics
public void interact(java.util.ArrayList<IDynamics> dynamics)
public void update()
public void preinteract(java.util.ArrayList<IDynamics> dynamics)
IDynamics
preinteract
in interface IDynamics
public void postinteract(java.util.ArrayList<IDynamics> dynamics)
IDynamics
postinteract
in interface IDynamics
public void preupdate()
IDynamics
public void postupdate()
IDynamics
postupdate
in interface IDynamics
public ITensionLine name(java.lang.String nm)
public ITensionLine layer(ILayer l)
IGeometry
public ITensionLine layer(java.lang.String l)
IGeometry
public ITensionLine attr(IAttribute at)
IObject
public ITensionLine hide()
public ITensionLine show()
public ITensionLine clr(IColor c)
IObject
public ITensionLine clr(IColor c, int alpha)
IObject
public ITensionLine clr(IColor c, float alpha)
IObject
public ITensionLine clr(IColor c, double alpha)
IObject
public ITensionLine clr(java.awt.Color c)
public ITensionLine clr(IObject o)
IObject
public ITensionLine clr(java.awt.Color c, int alpha)
public ITensionLine clr(java.awt.Color c, float alpha)
public ITensionLine clr(java.awt.Color c, double alpha)
public ITensionLine clr(int gray)
public ITensionLine clr(float fgray)
public ITensionLine clr(double dgray)
public ITensionLine clr(int gray, int alpha)
public ITensionLine clr(float fgray, float falpha)
public ITensionLine clr(double dgray, double dalpha)
public ITensionLine clr(int r, int g, int b)
public ITensionLine clr(float fr, float fg, float fb)
public ITensionLine clr(double dr, double dg, double db)
public ITensionLine clr(int r, int g, int b, int a)
public ITensionLine clr(float fr, float fg, float fb, float fa)
public ITensionLine clr(double dr, double dg, double db, double da)
public ITensionLine hsb(float h, float s, float b, float a)
public ITensionLine hsb(double h, double s, double b, double a)
public ITensionLine hsb(float h, float s, float b)
public ITensionLine hsb(double h, double s, double b)
public ITensionLine setColor(IColor c)
public ITensionLine setColor(IColor c, int alpha)
public ITensionLine setColor(IColor c, float alpha)
public ITensionLine setColor(IColor c, double alpha)
public ITensionLine setColor(java.awt.Color c)
public ITensionLine setColor(java.awt.Color c, int alpha)
public ITensionLine setColor(java.awt.Color c, float alpha)
public ITensionLine setColor(java.awt.Color c, double alpha)
public ITensionLine setColor(int gray)
public ITensionLine setColor(float fgray)
public ITensionLine setColor(double dgray)
public ITensionLine setColor(int gray, int alpha)
public ITensionLine setColor(float fgray, float falpha)
public ITensionLine setColor(double dgray, double dalpha)
public ITensionLine setColor(int r, int g, int b)
public ITensionLine setColor(float fr, float fg, float fb)
public ITensionLine setColor(double dr, double dg, double db)
public ITensionLine setColor(int r, int g, int b, int a)
public ITensionLine setColor(float fr, float fg, float fb, float fa)
public ITensionLine setColor(double dr, double dg, double db, double da)
public ITensionLine setHSBColor(float h, float s, float b, float a)
setHSBColor
in class ICurve
public ITensionLine setHSBColor(double h, double s, double b, double a)
setHSBColor
in class ICurve
public ITensionLine setHSBColor(float h, float s, float b)
setHSBColor
in class ICurve
public ITensionLine setHSBColor(double h, double s, double b)
setHSBColor
in class ICurve
public ITensionLine weight(double w)
public ITensionLine weight(float w)