jp.carabiner.inkpod.pi.shape.line
クラス BezierCurve

java.lang.Object
  上位を拡張 jp.carabiner.inkpod.pi.shape.line.BezierCurve
すべての実装されたインタフェース:
ShapeLine
直系の既知のサブクラス:
ThickBezierCurve

public class BezierCurve
extends java.lang.Object
implements ShapeLine

ベジェ曲線


フィールドの概要
protected  LineSegment[] lines
           
protected  int pointCount
           
protected  float[] x
           
protected  float[] y
           
 
コンストラクタの概要
BezierCurve(java.awt.geom.Point2D[] p)
           
BezierCurve(java.awt.geom.Point2D[] p, int pointCount)
          ベジェ曲線を構築する
 
メソッドの概要
protected  BezierCurve createBezierCurve(java.awt.geom.Point2D[] p, int pointCount)
           
protected  void createLines()
           
protected  void createPoints()
           
 boolean equals(java.lang.Object obj)
           
 java.awt.geom.Rectangle2D getBounds2D()
           
 java.awt.geom.Point2D[] getControlPoints()
           
 int[] getIntPointX()
           
 int[] getIntPointY()
           
 double getLength()
           
 LineSegment[] getLines()
           
 java.awt.geom.Point2D getPoint(double t)
           
 int getPointCount()
           
 float[] getPointX()
           
 float[] getPointY()
           
 int hashCode()
           
protected  void init()
           
 double[] intersectionParameters(Line line)
           
 double[] intersectionParametersCubic(Line line)
           
 double[] intersectionParametersQuad(Line line)
           
 java.awt.geom.Point2D[] intersectionPoints(Line line)
          直線との交点を求める。
 java.awt.geom.Point2D[] intersectionPoints(LineSegment lineSegment)
          線分との交点を求める
 boolean isOver(java.awt.geom.Point2D p)
          点がこのオブジェクトが表現する線の上にあるか調べる。
 java.awt.geom.Point2D[] parametersToPoints(double[] t)
           
 java.awt.geom.Point2D pointOverLine(double lengthFromStartPoint)
           
static java.awt.geom.Point2D smoothCtrlPoint(double x, double y, double ctrlX, double ctrlY, double restrictedCtrlX, double restrictedCtrlY)
           
 BezierCurve[] split(double t)
           
 double splitRatio(Line line)
           
 double splitRatio(LineSegment line)
           
static java.awt.geom.Point2D symmetricCtrlPoint(double x, double y, double ctrlX, double ctrlY)
           
 java.lang.String toString()
           
 
クラス java.lang.Object から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

pointCount

protected int pointCount

x

protected float[] x

y

protected float[] y

lines

protected LineSegment[] lines
コンストラクタの詳細

BezierCurve

public BezierCurve(java.awt.geom.Point2D[] p)

BezierCurve

public BezierCurve(java.awt.geom.Point2D[] p,
                   int pointCount)
ベジェ曲線を構築する

パラメータ:
p - 始点、制御点、終点の配列
pointCount - 曲線の分割数
メソッドの詳細

init

protected void init()

createBezierCurve

protected BezierCurve createBezierCurve(java.awt.geom.Point2D[] p,
                                        int pointCount)

getControlPoints

public java.awt.geom.Point2D[] getControlPoints()

getPointX

public float[] getPointX()

getPointY

public float[] getPointY()

getIntPointX

public int[] getIntPointX()

getIntPointY

public int[] getIntPointY()

getPointCount

public int getPointCount()

createPoints

protected void createPoints()

createLines

protected void createLines()

getLines

public LineSegment[] getLines()

getLength

public double getLength()

getPoint

public java.awt.geom.Point2D getPoint(double t)

pointOverLine

public java.awt.geom.Point2D pointOverLine(double lengthFromStartPoint)

intersectionPoints

public java.awt.geom.Point2D[] intersectionPoints(Line line)
インタフェース ShapeLine の記述:
直線との交点を求める。

定義:
インタフェース ShapeLine 内の intersectionPoints
パラメータ:
line - 交点を求める直線
戻り値:
直線との交点の配列

intersectionParameters

public double[] intersectionParameters(Line line)

parametersToPoints

public java.awt.geom.Point2D[] parametersToPoints(double[] t)

intersectionParametersQuad

public double[] intersectionParametersQuad(Line line)

intersectionParametersCubic

public double[] intersectionParametersCubic(Line line)

intersectionPoints

public java.awt.geom.Point2D[] intersectionPoints(LineSegment lineSegment)
インタフェース ShapeLine の記述:
線分との交点を求める

定義:
インタフェース ShapeLine 内の intersectionPoints
パラメータ:
lineSegment - 交点を求める線分
戻り値:
線分との交点の配列

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D()

isOver

public boolean isOver(java.awt.geom.Point2D p)
インタフェース ShapeLine の記述:
点がこのオブジェクトが表現する線の上にあるか調べる。

定義:
インタフェース ShapeLine 内の isOver
パラメータ:
p - 調べたい点
戻り値:
点が線の上にある場合はtrue

splitRatio

public double splitRatio(LineSegment line)

splitRatio

public double splitRatio(Line line)

split

public BezierCurve[] split(double t)

hashCode

public int hashCode()
オーバーライド:
クラス java.lang.Object 内の hashCode

equals

public boolean equals(java.lang.Object obj)
オーバーライド:
クラス java.lang.Object 内の equals

toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString

symmetricCtrlPoint

public static java.awt.geom.Point2D symmetricCtrlPoint(double x,
                                                       double y,
                                                       double ctrlX,
                                                       double ctrlY)

smoothCtrlPoint

public static java.awt.geom.Point2D smoothCtrlPoint(double x,
                                                    double y,
                                                    double ctrlX,
                                                    double ctrlY,
                                                    double restrictedCtrlX,
                                                    double restrictedCtrlY)