igeo

## Class IStickLine

- java.lang.Object
- - igeo.IObject
  - - igeo.IGeometry
    - - igeo.ICurve
      - - igeo.IStickLine

- All Implemented Interfaces:
    ICurveI, ICurveOp, IDynamics, IParameter, ISubobject, ITransformable, IVal

      public class IStickLine
      extends ICurve
      implements IDynamics

  Line representation of stick dynamics
  Author:
    Satoru Sugihara

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `IStick` | `stickDynamics`
    `java.util.ArrayList<IObject>` | `targets` target objects to be updated by dynamic object

    - ### Fields inherited from class igeo.ICurve

      `curve`

    - ### Fields inherited from class igeo.IObject

      `attribute, dynamics, graphics, parameter, server, userData`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IStickLine(IParticleI p1, IParticleI p2)`
    `IStickLine(IVecI p1, IVecI p2)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IStickLine` | `attr(IAttribute at)` set attributes
    `IStickLine` | `clr(java.awt.Color c)`
    `IStickLine` | `clr(java.awt.Color c, double alpha)`
    `IStickLine` | `clr(java.awt.Color c, float alpha)`
    `IStickLine` | `clr(java.awt.Color c, int alpha)`
    `IStickLine` | `clr(double dgray)`
    `IStickLine` | `clr(double dgray, double dalpha)`
    `IStickLine` | `clr(double dr, double dg, double db)`
    `IStickLine` | `clr(double dr, double dg, double db, double da)`
    `IStickLine` | `clr(float fgray)`
    `IStickLine` | `clr(float fgray, float falpha)`
    `IStickLine` | `clr(float fr, float fg, float fb)`
    `IStickLine` | `clr(float fr, float fg, float fb, float fa)`
    `IStickLine` | `clr(IColor c)` to set an object color
    `IStickLine` | `clr(IColor c, double alpha)` to set color, with alpha value overwritten
    `IStickLine` | `clr(IColor c, float alpha)` to set color, with alpha value overwritten
    `IStickLine` | `clr(IColor c, int alpha)` to set color, with alpha value overwritten
    `IStickLine` | `clr(int gray)`
    `IStickLine` | `clr(int gray, int alpha)`
    `IStickLine` | `clr(int r, int g, int b)`
    `IStickLine` | `clr(int r, int g, int b, int a)`
    `IStickLine` | `clr(IObject o)` to set the same color with the object
    `IStickLine` | `hide()`
    `IStickLine` | `hsb(double h, double s, double b)`
    `IStickLine` | `hsb(double h, double s, double b, double a)`
    `IStickLine` | `hsb(float h, float s, float b)`
    `IStickLine` | `hsb(float h, float s, float b, float a)`
    `void` | `initStickLine(IParticleI p1, IParticleI p2)`
    `void` | `interact(java.util.ArrayList<IDynamics> dynamics)` behavior definition of interaction with other dynamic objects.
    `IStickLine` | `layer(ILayer l)` Set layer by ILayer object
    `IStickLine` | `layer(java.lang.String l)` Set layer by layer name.
    `java.util.ArrayList<IDynamics>` | `localDynamics()` IDynamicsBase doesn't implement local dynamics feature
    `IStickLine` | `name(java.lang.String nm)` IObject methods
    `IStickLine` | `parent()` for IDynamics
    `IStickLine` | `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<IDynamics>).
    `void` | `postupdate()` executed after update().
    `void` | `preinteract(java.util.ArrayList<IDynamics> dynamics)` executed before interact(ArrayList<IDynamics>).
    `void` | `preupdate()` executed before update().
    `IParticleI` | `pt(int i)` getting end point.
    `IParticleI` | `pt1()` getting end point1.
    `IParticleI` | `pt2()` getting end point2.
    `IStickLine` | `removeTarget(int i)` remove target object.
    `IStickLine` | `removeTarget(IObject obj)` remove target object.
    `IStickLine` | `setColor(java.awt.Color c)`
    `IStickLine` | `setColor(java.awt.Color c, double alpha)`
    `IStickLine` | `setColor(java.awt.Color c, float alpha)`
    `IStickLine` | `setColor(java.awt.Color c, int alpha)`
    `IStickLine` | `setColor(double dgray)`
    `IStickLine` | `setColor(double dgray, double dalpha)`
    `IStickLine` | `setColor(double dr, double dg, double db)`
    `IStickLine` | `setColor(double dr, double dg, double db, double da)`
    `IStickLine` | `setColor(float fgray)`
    `IStickLine` | `setColor(float fgray, float falpha)`
    `IStickLine` | `setColor(float fr, float fg, float fb)`
    `IStickLine` | `setColor(float fr, float fg, float fb, float fa)`
    `IStickLine` | `setColor(IColor c)`
    `IStickLine` | `setColor(IColor c, double alpha)`
    `IStickLine` | `setColor(IColor c, float alpha)`
    `IStickLine` | `setColor(IColor c, int alpha)`
    `IStickLine` | `setColor(int gray)`
    `IStickLine` | `setColor(int gray, int alpha)`
    `IStickLine` | `setColor(int r, int g, int b)`
    `IStickLine` | `setColor(int r, int g, int b, int a)`
    `IStickLine` | `setHSBColor(double h, double s, double b)`
    `IStickLine` | `setHSBColor(double h, double s, double b, double a)`
    `IStickLine` | `setHSBColor(float h, float s, float b)`
    `IStickLine` | `setHSBColor(float h, float s, float b, float a)`
    `IStickLine` | `show()`
    `IObject` | `target(int i)` get target object.
    `IStickLine` | `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).
    `IStickLine` | `weight(double w)`
    `IStickLine` | `weight(float w)`

    - ### Methods inherited from class igeo.ICurve

      `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`

    - ### Methods inherited from class igeo.IObject

      `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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### stickDynamics

          public IStick stickDynamics

    - #### targets

          public java.util.ArrayList<IObject> targets

      target objects to be updated by dynamic object

  - ### Constructor Detail

    - #### IStickLine

          public IStickLine(IParticleI p1,
                            IParticleI p2)

    - #### IStickLine

          public IStickLine(IVecI p1,
                            IVecI p2)

  - ### Method Detail

    - #### initStickLine

          public void initStickLine(IParticleI p1,
                                    IParticleI p2)

    - #### 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 pt(int)

    - #### 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 IStickLine parent()

      for IDynamics
      Specified by:
        `parent` in interface `ISubobject`

    - #### parent

          public IStickLine parent(IObject par)

      Description copied from interface: `ISubobject`
      setting parent object
      Specified by:
        `parent` in interface `ISubobject`

    - #### localDynamics

          public java.util.ArrayList<IDynamics> localDynamics()

      IDynamicsBase doesn't implement local dynamics feature
      Specified by:
        `localDynamics` in interface `IDynamics`

    - #### target

          public IStickLine target(IObject targetObj)

      Description copied from interface: `IDynamics`
      add terget object to be updated by this dynamic object.
      Specified by:
        `target` in interface `IDynamics`

    - #### targetNum

          public int targetNum()

      get total target number.
      Specified by:
        `targetNum` in interface `IDynamics`

    - #### target

          public IObject target(int i)

      get target object.
      Specified by:
        `target` in interface `IDynamics`

    - #### targets

          public java.util.ArrayList<IObject> targets()

      get all target objects.
      Specified by:
        `targets` in interface `IDynamics`

    - #### removeTarget

          public IStickLine removeTarget(int i)

      remove target object.
      Specified by:
        `removeTarget` in interface `IDynamics`

    - #### removeTarget

          public IStickLine removeTarget(IObject obj)

      remove target object.
      Specified by:
        `removeTarget` in interface `IDynamics`

    - #### updateTarget

          public void updateTarget()

      update all terget objects (should be called when the dynamic object is updated).
      Specified by:
        `updateTarget` in interface `IDynamics`

    - #### interact

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

      behavior definition of interaction with other dynamic objects. The server puts all dynamic objects including itself.
      Specified by:
        `interact` in interface `IDynamics`

    - #### update

          public void update()

      behavior definition of updating dynamics in each time frame
      Specified by:
        `update` in interface `IDynamics`

    - #### preinteract

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

      Description copied from interface: `IDynamics`
      executed before interact(ArrayList<IDynamics>). behavior can be changed by IConfig.enablePreinteract and IConfig.loopPreinteract.
      Specified by:
        `preinteract` in interface `IDynamics`

    - #### postinteract

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

      Description copied from interface: `IDynamics`
      executed after interact(ArrayList<IDynamics>). 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`

    - #### preupdate

          public void preupdate()

      Description copied from interface: `IDynamics`
      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).
      Specified by:
        `preupdate` in interface `IDynamics`

    - #### 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`

    - #### name

          public IStickLine name(java.lang.String nm)

      IObject methods
      Overrides:
        `name` in class `ICurve`

    - #### layer

          public IStickLine layer(ILayer l)

      Description copied from class: `IGeometry`
      Set layer by ILayer object
      Overrides:
        `layer` in class `ICurve`

    - #### layer

          public IStickLine layer(java.lang.String l)

      Description copied from class: `IGeometry`
      Set layer by layer name. If the layer specified by the name is not existing in the server, a new layer is automatically created in the server
      Overrides:
        `layer` in class `ICurve`

    - #### attr

          public IStickLine attr(IAttribute at)

      Description copied from class: `IObject`
      set attributes
      Overrides:
        `attr` in class `ICurve`

    - #### hide

          public IStickLine hide()

      Overrides:
        `hide` in class `ICurve`

    - #### show

          public IStickLine show()

      Overrides:
        `show` in class `ICurve`

    - #### clr

          public IStickLine clr(IColor c)

      Description copied from class: `IObject`
      to set an object color
      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(IColor c,
                                int alpha)

      Description copied from class: `IObject`
      to set color, with alpha value overwritten
      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(IColor c,
                                float alpha)

      Description copied from class: `IObject`
      to set color, with alpha value overwritten
      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(IColor c,
                                double alpha)

      Description copied from class: `IObject`
      to set color, with alpha value overwritten
      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(IObject o)

      Description copied from class: `IObject`
      to set the same color with the object
      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(java.awt.Color c)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(java.awt.Color c,
                                int alpha)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(java.awt.Color c,
                                float alpha)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(java.awt.Color c,
                                double alpha)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(int gray)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(float fgray)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(double dgray)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(int gray,
                                int alpha)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(float fgray,
                                float falpha)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(double dgray,
                                double dalpha)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(int r,
                                int g,
                                int b)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(float fr,
                                float fg,
                                float fb)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(double dr,
                                double dg,
                                double db)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(int r,
                                int g,
                                int b,
                                int a)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(float fr,
                                float fg,
                                float fb,
                                float fa)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStickLine clr(double dr,
                                double dg,
                                double db,
                                double da)

      Overrides:
        `clr` in class `ICurve`

    - #### hsb

          public IStickLine hsb(float h,
                                float s,
                                float b,
                                float a)

      Overrides:
        `hsb` in class `ICurve`

    - #### hsb

          public IStickLine hsb(double h,
                                double s,
                                double b,
                                double a)

      Overrides:
        `hsb` in class `ICurve`

    - #### hsb

          public IStickLine hsb(float h,
                                float s,
                                float b)

      Overrides:
        `hsb` in class `ICurve`

    - #### hsb

          public IStickLine hsb(double h,
                                double s,
                                double b)

      Overrides:
        `hsb` in class `ICurve`

    - #### setColor

          public IStickLine setColor(IColor c)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(IColor c,
                                     int alpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(IColor c,
                                     float alpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(IColor c,
                                     double alpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(java.awt.Color c)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(java.awt.Color c,
                                     int alpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(java.awt.Color c,
                                     float alpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(java.awt.Color c,
                                     double alpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(int gray)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(float fgray)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(double dgray)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(int gray,
                                     int alpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(float fgray,
                                     float falpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(double dgray,
                                     double dalpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(int r,
                                     int g,
                                     int b)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(float fr,
                                     float fg,
                                     float fb)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(double dr,
                                     double dg,
                                     double db)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(int r,
                                     int g,
                                     int b,
                                     int a)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(float fr,
                                     float fg,
                                     float fb,
                                     float fa)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStickLine setColor(double dr,
                                     double dg,
                                     double db,
                                     double da)

      Overrides:
        `setColor` in class `ICurve`

    - #### setHSBColor

          public IStickLine setHSBColor(float h,
                                        float s,
                                        float b,
                                        float a)

      Overrides:
        `setHSBColor` in class `ICurve`

    - #### setHSBColor

          public IStickLine setHSBColor(double h,
                                        double s,
                                        double b,
                                        double a)

      Overrides:
        `setHSBColor` in class `ICurve`

    - #### setHSBColor

          public IStickLine setHSBColor(float h,
                                        float s,
                                        float b)

      Overrides:
        `setHSBColor` in class `ICurve`

    - #### setHSBColor

          public IStickLine setHSBColor(double h,
                                        double s,
                                        double b)

      Overrides:
        `setHSBColor` in class `ICurve`

    - #### weight

          public IStickLine weight(double w)

      Overrides:
        `weight` in class `ICurve`

    - #### weight

          public IStickLine weight(float w)

      Overrides:
        `weight` in class `ICurve`