igeo

## Class IStraightenerCurve

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

- All Implemented Interfaces:
    ICurveI, ICurveOp, IParameter, IStraightenerI, ITensionI, ITransformable, IVal

      public class IStraightenerCurve
      extends ICurve
      implements IStraightenerI

  3 point curve with straightener force inside.
  Author:
    Satoru Sugihara

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) IStraightener` | `straightener`

    - ### Fields inherited from class igeo.ICurve

      `curve`

    - ### Fields inherited from class igeo.IObject

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

    - ### Fields inherited from interface igeo.ITensionI

      `defaultTension`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IStraightenerCurve(IParticleGeo p1, IParticleGeo p2, IParticleGeo p3)`
    `IStraightenerCurve(IParticleI p1, IParticleI p2, IParticleI p3)`
    `IStraightenerCurve(IVecI p1, IVecI p2, IVecI p3)`
    `IStraightenerCurve(IVec p1, IVec p2, IVec p3)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IStraightenerCurve` | `attr(IAttribute at)` set attributes
    `IStraightenerCurve` | `clr(java.awt.Color c)`
    `IStraightenerCurve` | `clr(java.awt.Color c, int alpha)`
    `IStraightenerCurve` | `clr(double dgray)`
    `IStraightenerCurve` | `clr(double dgray, double dalpha)`
    `IStraightenerCurve` | `clr(double dr, double dg, double db)`
    `IStraightenerCurve` | `clr(double dr, double dg, double db, double da)`
    `IStraightenerCurve` | `clr(float fgray)`
    `IStraightenerCurve` | `clr(float fgray, float falpha)`
    `IStraightenerCurve` | `clr(float fr, float fg, float fb)`
    `IStraightenerCurve` | `clr(float fr, float fg, float fb, float fa)`
    `IStraightenerCurve` | `clr(IColor c)` to set an object color
    `IStraightenerCurve` | `clr(IColor c, double alpha)` to set color, with alpha value overwritten
    `IStraightenerCurve` | `clr(IColor c, float alpha)` to set color, with alpha value overwritten
    `IStraightenerCurve` | `clr(IColor c, int alpha)` to set color, with alpha value overwritten
    `IStraightenerCurve` | `clr(int gray)`
    `IStraightenerCurve` | `clr(int gray, int alpha)`
    `IStraightenerCurve` | `clr(int r, int g, int b)`
    `IStraightenerCurve` | `clr(int r, int g, int b, int a)`
    `IStraightenerCurve` | `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.
    `IStraightenerCurve` | `constant(boolean cnst)` if constantTension is true, amount of force is always constant and it's equals to tension.
    `IStraightenerCurve` | `hide()`
    `IStraightenerCurve` | `hsb(double h, double s, double b)`
    `IStraightenerCurve` | `hsb(double h, double s, double b, double a)`
    `IStraightenerCurve` | `hsb(float h, float s, float b)`
    `IStraightenerCurve` | `hsb(float h, float s, float b, float a)`
    `IStraightenerCurve` | `layer(ILayer l)` Set layer by ILayer object
    `IStraightenerCurve` | `layer(java.lang.String l)` Set layer by layer name.
    `double` | `maxTension()` if maxTension is set to be positive number, it limits the force (distance * tension) is cut off at maxTension.
    `IStraightenerCurve` | `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.
    `IStraightenerCurve` | `name(java.lang.String nm)` IObject methods
    `IStraightenerCurve` | `parent(IObject par)`
    `IParticleI` | `particle(int i)` alias of pt(int)
    `IParticleI` | `particle1()` alias of pt1()
    `IParticleI` | `particle2()` alias of pt2()
    `IParticleI` | `particle3()` alias of pt3()
    `IVec` | `pos(int i)` position of particle(i)
    `IVec` | `pos1()` position of particle1()
    `IVec` | `pos2()` position of particle2()
    `IVec` | `pos3()` position of particle3()
    `IParticleI` | `pt(int i)` getting end point.
    `IParticleI` | `pt1()` getting end point1.
    `IParticleI` | `pt2()` getting end point2.
    `IParticleI` | `pt3()` getting end point3.
    `IStraightenerCurve` | `removeTarget(int i)`
    `IStraightenerCurve` | `removeTarget(IObject obj)`
    `IStraightenerCurve` | `setColor(java.awt.Color c)`
    `IStraightenerCurve` | `setColor(java.awt.Color c, int alpha)`
    `IStraightenerCurve` | `setColor(double dgray)`
    `IStraightenerCurve` | `setColor(double dgray, double dalpha)`
    `IStraightenerCurve` | `setColor(double dr, double dg, double db)`
    `IStraightenerCurve` | `setColor(double dr, double dg, double db, double da)`
    `IStraightenerCurve` | `setColor(float fgray)`
    `IStraightenerCurve` | `setColor(float fgray, float falpha)`
    `IStraightenerCurve` | `setColor(float fr, float fg, float fb)`
    `IStraightenerCurve` | `setColor(float fr, float fg, float fb, float fa)`
    `IStraightenerCurve` | `setColor(int gray)`
    `IStraightenerCurve` | `setColor(int gray, int alpha)`
    `IStraightenerCurve` | `setColor(int r, int g, int b)`
    `IStraightenerCurve` | `setColor(int r, int g, int b, int a)`
    `IStraightenerCurve` | `setHSBColor(double h, double s, double b)`
    `IStraightenerCurve` | `setHSBColor(double h, double s, double b, double a)`
    `IStraightenerCurve` | `setHSBColor(float h, float s, float b)`
    `IStraightenerCurve` | `setHSBColor(float h, float s, float b, float a)`
    `IStraightenerCurve` | `show()`
    `IStraightenerCurve` | `target(IObject targetObj)`
    `double` | `tension()` tension is a coefficient to convert distance of two points to amount of force.
    `IStraightenerCurve` | `tension(double tension)` tension is a coefficient to convert distance of two points to amount of force.
    `IStraightenerCurve` | `weight(double w)`
    `IStraightenerCurve` | `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, clr, clr, 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, setColor, setColor, setColor, setColor, setColor, setColor, 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

    - #### straightener

          IStraightener straightener

  - ### Constructor Detail

    - #### IStraightenerCurve

          public IStraightenerCurve(IParticleI p1,
                                    IParticleI p2,
                                    IParticleI p3)

    - #### IStraightenerCurve

          public IStraightenerCurve(IParticleGeo p1,
                                    IParticleGeo p2,
                                    IParticleGeo p3)

    - #### IStraightenerCurve

          public IStraightenerCurve(IVec p1,
                                    IVec p2,
                                    IVec p3)

    - #### IStraightenerCurve

          public IStraightenerCurve(IVecI p1,
                                    IVecI p2,
                                    IVecI p3)

  - ### Method Detail

    - #### tension

          public double tension()

      Description copied from interface: `ITensionI`
      tension is a coefficient to convert distance of two points to amount of force.
      Specified by:
        `tension` in interface `ITensionI`

    - #### tension

          public IStraightenerCurve tension(double tension)

      Description copied from interface: `ITensionI`
      tension is a coefficient to convert distance of two points to amount of force.
      Specified by:
        `tension` in interface `ITensionI`

    - #### constant

          public boolean constant()

      Description copied from interface: `ITensionI`
      if constantTension is true, amount of force is always constant and it's equals to tension. Only direction of force changes. But if the distance is zero, force is also zero.
      Specified by:
        `constant` in interface `ITensionI`

    - #### constant

          public IStraightenerCurve constant(boolean cnst)

      Description copied from interface: `ITensionI`
      if constantTension is true, amount of force is always constant and it's equals to tension. Only direction of force changes. But if the distance is zero, force is also zero.
      Specified by:
        `constant` in interface `ITensionI`

    - #### maxTension

          public 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.
      Specified by:
        `maxTension` in interface `ITensionI`

    - #### maxTension

          public IStraightenerCurve 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.
      Specified by:
        `maxTension` in interface `ITensionI`

    - #### pt

          public IParticleI pt(int i)

      getting end point. i==0 or i==1 or i==2
      Specified by:
        `pt` in interface `ITensionI`

    - #### particle

          public IParticleI particle(int i)

      alias of pt(int)
      Specified by:
        `particle` in interface `ITensionI`

    - #### pos

          public IVec pos(int i)

      position of particle(i)
      Specified by:
        `pos` in interface `ITensionI`

    - #### pt1

          public IParticleI pt1()

      getting end point1.
      Specified by:
        `pt1` in interface `ITensionI`

    - #### particle1

          public IParticleI particle1()

      alias of pt1()
      Specified by:
        `particle1` in interface `ITensionI`

    - #### pos1

          public IVec pos1()

      position of particle1()
      Specified by:
        `pos1` in interface `ITensionI`

    - #### pt2

          public IParticleI pt2()

      getting end point2.
      Specified by:
        `pt2` in interface `ITensionI`

    - #### particle2

          public IParticleI particle2()

      alias of pt2()
      Specified by:
        `particle2` in interface `ITensionI`

    - #### pos2

          public IVec pos2()

      position of particle2()
      Specified by:
        `pos2` in interface `ITensionI`

    - #### pt3

          public IParticleI pt3()

      getting end point3.
      Specified by:
        `pt3` in interface `IStraightenerI`

    - #### particle3

          public IParticleI particle3()

      alias of pt3()
      Specified by:
        `particle3` in interface `IStraightenerI`

    - #### pos3

          public IVec pos3()

      position of particle3()
      Specified by:
        `pos3` in interface `IStraightenerI`

    - #### parent

          public IStraightenerCurve parent(IObject par)

    - #### target

          public IStraightenerCurve target(IObject targetObj)

    - #### removeTarget

          public IStraightenerCurve removeTarget(int i)

    - #### removeTarget

          public IStraightenerCurve removeTarget(IObject obj)

    - #### name

          public IStraightenerCurve name(java.lang.String nm)

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

    - #### layer

          public IStraightenerCurve layer(ILayer l)

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

    - #### layer

          public IStraightenerCurve 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 IStraightenerCurve attr(IAttribute at)

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

    - #### hide

          public IStraightenerCurve hide()

      Overrides:
        `hide` in class `ICurve`

    - #### show

          public IStraightenerCurve show()

      Overrides:
        `show` in class `ICurve`

    - #### clr

          public IStraightenerCurve clr(IColor c)

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

    - #### clr

          public IStraightenerCurve clr(IColor c,
                                        int alpha)

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

    - #### clr

          public IStraightenerCurve clr(IColor c,
                                        float alpha)

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

    - #### clr

          public IStraightenerCurve clr(IColor c,
                                        double alpha)

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

    - #### clr

          public IStraightenerCurve clr(IObject o)

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

    - #### clr

          public IStraightenerCurve clr(java.awt.Color c)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

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

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStraightenerCurve clr(int gray)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStraightenerCurve clr(float fgray)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStraightenerCurve clr(double dgray)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStraightenerCurve clr(int gray,
                                        int alpha)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStraightenerCurve clr(float fgray,
                                        float falpha)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

          public IStraightenerCurve clr(double dgray,
                                        double dalpha)

      Overrides:
        `clr` in class `ICurve`

    - #### clr

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

      Overrides:
        `clr` in class `ICurve`

    - #### clr

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

      Overrides:
        `clr` in class `ICurve`

    - #### clr

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

      Overrides:
        `clr` in class `ICurve`

    - #### clr

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

      Overrides:
        `clr` in class `ICurve`

    - #### clr

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

      Overrides:
        `clr` in class `ICurve`

    - #### clr

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

      Overrides:
        `clr` in class `ICurve`

    - #### hsb

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

      Overrides:
        `hsb` in class `ICurve`

    - #### hsb

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

      Overrides:
        `hsb` in class `ICurve`

    - #### hsb

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

      Overrides:
        `hsb` in class `ICurve`

    - #### hsb

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

      Overrides:
        `hsb` in class `ICurve`

    - #### setColor

          public IStraightenerCurve setColor(java.awt.Color c)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

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

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStraightenerCurve setColor(int gray)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStraightenerCurve setColor(float fgray)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStraightenerCurve setColor(double dgray)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStraightenerCurve setColor(int gray,
                                             int alpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStraightenerCurve setColor(float fgray,
                                             float falpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

          public IStraightenerCurve setColor(double dgray,
                                             double dalpha)

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

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

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

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

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

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

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

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

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

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

      Overrides:
        `setColor` in class `ICurve`

    - #### setColor

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

      Overrides:
        `setColor` in class `ICurve`

    - #### setHSBColor

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

      Overrides:
        `setHSBColor` in class `ICurve`

    - #### setHSBColor

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

      Overrides:
        `setHSBColor` in class `ICurve`

    - #### setHSBColor

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

      Overrides:
        `setHSBColor` in class `ICurve`

    - #### setHSBColor

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

      Overrides:
        `setHSBColor` in class `ICurve`

    - #### weight

          public IStraightenerCurve weight(double w)

      Overrides:
        `weight` in class `ICurve`

    - #### weight

          public IStraightenerCurve weight(float w)

      Overrides:
        `weight` in class `ICurve`