jp.go.ipa.jgcl
クラス JgclPoint1D

java.lang.Object
  |
  +--jp.go.ipa.jgcl.JgclGeometry
        |
        +--jp.go.ipa.jgcl.JgclPoint
              |
              +--jp.go.ipa.jgcl.JgclPoint1D
すべての実装インタフェース:
java.io.Serializable
直系の既知のサブクラス:
JgclCartesianPoint1D, JgclHomogeneousPoint1D, JgclPointOnGeometry1D

public abstract class JgclPoint1D
extends JgclPoint

1次元の点を表す抽象クラス。

バージョン:
$Revision: 1.18 $, $Date: 2000/08/11 06:18:56 $
作成者:
Information-technology Promotion Agency, Japan
関連項目:
JgclVector1D, 直列化された形式

フィールドの概要
static JgclPoint1D origin
          1次元の原点 (0)。
 
コンストラクタの概要
protected JgclPoint1D()
          オブジェクトを構築する。
 
メソッドの概要
 JgclPoint1D add(JgclVector1D vector)
          この点に与えられたベクトルを足した点を返す。
 int dimension()
          次元を返す。
 JgclPoint1D divide(double scale)
          この点を与えられたスケールで割った点を返す。
 boolean identical(JgclPoint1D mate)
          2点の同一性を判定する。
 boolean is1D()
          1次元か否かを返す 常に true を返す。
 JgclPoint1D linearInterpolate(JgclPoint1D mate, double weightForThis)
          この点と与えられた点で線型補間した結果を返す。
 JgclPoint1D midPoint(JgclPoint1D mate)
          この点と与えられた点の中点を返す。
 JgclPoint1D multiply(double scale)
          この点に与えられたスケールを乗じた点を返す。
static JgclCartesianPoint1D of(double x)
          JgclCartesianPoint1D のインスタンスを生成する。
 JgclPoint1D subtract(JgclVector1D vector)
          この点から与えられたベクトルを引いた点を返す。
 JgclVector1D toVector1D()
          この点を1次元のベクトル (JgclVector1D) に変換する。
abstract  double x()
          点の X 座標値を返す抽象メソッド。
 
クラス jp.go.ipa.jgcl.JgclPoint から継承したメソッド
isPoint
 
クラス jp.go.ipa.jgcl.JgclGeometry から継承したメソッド
getClassName, getToleranceForAngle, getToleranceForAngleAsObject, getToleranceForDistance, getToleranceForDistance2, getToleranceForDistanceAsObject, getToleranceForParameter, getToleranceForParameterAsObject, getToleranceForRealNumber, getToleranceForRealNumberAsObject, is2D, is3D, isCurve, isFreeform, isParametric, isPlacement, isSurface, isTransformationOperator, isVector, makeIndent, output, output
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

origin

public static final JgclPoint1D origin
1次元の原点 (0)。
コンストラクタの詳細

JgclPoint1D

protected JgclPoint1D()
オブジェクトを構築する。
メソッドの詳細

dimension

public int dimension()
次元を返す。

常に 1 を返す。

オーバーライド:
クラス JgclGeometry 内の dimension
戻り値:
1次元なので、常に 1

is1D

public boolean is1D()
1次元か否かを返す

常に true を返す。

オーバーライド:
クラス JgclGeometry 内の is1D
戻り値:
1次元なので、常に true

x

public abstract double x()
点の X 座標値を返す抽象メソッド。
戻り値:
点の X 座標値

add

public JgclPoint1D add(JgclVector1D vector)
この点に与えられたベクトルを足した点を返す。
パラメータ:
vector - 点に足すベクトル
戻り値:
与えられたベクトルを足した点 (this + vector)

subtract

public JgclPoint1D subtract(JgclVector1D vector)
この点から与えられたベクトルを引いた点を返す。
パラメータ:
vector - 点から引くベクトル
戻り値:
与えられたベクトルを引いた点 (this - vector)

multiply

public JgclPoint1D multiply(double scale)
この点に与えられたスケールを乗じた点を返す。
パラメータ:
scale - スケール
戻り値:
(this * scale)

divide

public JgclPoint1D divide(double scale)
この点を与えられたスケールで割った点を返す。
パラメータ:
scale - スケール
戻り値:
(this / scale)

linearInterpolate

public JgclPoint1D linearInterpolate(JgclPoint1D mate,
                                     double weightForThis)
この点と与えられた点で線型補間した結果を返す。
パラメータ:
mate - 線形補間の相手となる点
weightForThis - 自身に対する重み (相手に対する重みは 1 - weightForThis)
戻り値:
線形補間した結果の点 (weightForThis * this + (1 - weightForThis) * mate)

midPoint

public JgclPoint1D midPoint(JgclPoint1D mate)
この点と与えられた点の中点を返す。
パラメータ:
mate - 中点を求める相手となる点
戻り値:
中点 (0.5 * this + 0.5 * mate)

identical

public boolean identical(JgclPoint1D mate)
2点の同一性を判定する。
パラメータ:
mate - 判定の対象となる点
戻り値:
this と mate が「距離の許容誤差」以内で 同一の点であるとみなせれば true、さもなくば false
関連項目:
JgclConditionOfOperation

toVector1D

public JgclVector1D toVector1D()
この点を1次元のベクトル (JgclVector1D) に変換する。
戻り値:
原点からのベクトルとみなしたベクトル

of

public static JgclCartesianPoint1D of(double x)
JgclCartesianPoint1D のインスタンスを生成する。
パラメータ:
x - X 成分
戻り値:
JgclCartesianPoint1D のインスタンス