figure
クラス Rotate

java.lang.Object
  上位を拡張 figure.Rotate
すべての実装されたインタフェース:
PolygonCollection

public class Rotate
extends java.lang.Object
implements PolygonCollection

回転面クラス


フィールドの概要
protected  Vector3D axis
          中心軸方向ベクトル
protected  int n
          面の数
protected  Polygon3D[] pl
          ポリゴンを格納する配列
static int THETA
          回転方向の面の分割数
 
コンストラクタの概要
Rotate(Point3D org, Vector3D axis, int n, double[] x, double[] y)
          回転面オブジェクトを作成する
 
メソッドの概要
protected  void createCylinder(double x1, double y1, double x2, double y2, double vx1, double vy1, double vx2, double vy2, int beginIndex, int n, double dtheta)
          台形回転面を作成する
protected  void createLwrCorn(double y, double x1, double x2, double vx1, double vy1, double vx2, double vy2, int beginIndex, int n, double dtheta)
          頂点が下にある円錐面を作成する
protected  void createUprCorn(double y, double x1, double x2, double vx1, double vy1, double vx2, double vy2, int beginIndex, int n, double dtheta)
          頂点が上にある円錐面を作成する
 int getCount()
          ポリゴンの数を返す
 Polygon3D getPolygon(int index)
          ポリゴンを返す
 void setColor(java.awt.Color color)
          表示色を設定する
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

THETA

public static final int THETA
回転方向の面の分割数

関連項目:
定数フィールド値

axis

protected Vector3D axis
中心軸方向ベクトル


n

protected int n
面の数


pl

protected Polygon3D[] pl
ポリゴンを格納する配列

コンストラクタの詳細

Rotate

public Rotate(Point3D org,
              Vector3D axis,
              int n,
              double[] x,
              double[] y)
回転面オブジェクトを作成する

パラメータ:
org - 原点
axis - 回転軸方向ベクトル
n - 回転させる関数のデータ点の数
x - 関数の x 座標を格納した配列
y - 関数の y 座標を格納した配列
メソッドの詳細

createUprCorn

protected void createUprCorn(double y,
                             double x1,
                             double x2,
                             double vx1,
                             double vy1,
                             double vx2,
                             double vy2,
                             int beginIndex,
                             int n,
                             double dtheta)
頂点が上にある円錐面を作成する

パラメータ:
y - 底面の半径
x1 - 頂点の座標
x2 - 底面の座標
vx1 - 頂点の法線ベクトルの x 成分
vy1 - 頂点の法線ベクトルの y 成分
vx2 - 底面の法線ベクトルの x 成分
vy2 - 底面の法線ベクトルの y 成分
beginIndex - ポリゴンを格納する配列の開始インデックス
n - 回転方向の面の分割数
dtheta - 1つの面の角度

createLwrCorn

protected void createLwrCorn(double y,
                             double x1,
                             double x2,
                             double vx1,
                             double vy1,
                             double vx2,
                             double vy2,
                             int beginIndex,
                             int n,
                             double dtheta)
頂点が下にある円錐面を作成する

パラメータ:
y - 底面の半径
x1 - 底面の座標
x2 - 頂点の座標
vx1 - 底面の法線ベクトルの x 成分
vy1 - 底面の法線ベクトルの y 成分
vx2 - 頂点の法線ベクトルの x 成分
vy2 - 頂点の法線ベクトルの y 成分
beginIndex - ポリゴンを格納する配列の開始インデックス
n - 回転方向の面の分割数
dtheta - 1つの面の角度

createCylinder

protected void createCylinder(double x1,
                              double y1,
                              double x2,
                              double y2,
                              double vx1,
                              double vy1,
                              double vx2,
                              double vy2,
                              int beginIndex,
                              int n,
                              double dtheta)
台形回転面を作成する

パラメータ:
x1 - 頂面の x 座標
y1 - 頂面の y 座標
x2 - 底面の x 座標
y2 - 底面の y 座標
vx1 - 頂面の法線ベクトルの x 成分
vy1 - 頂面の法線ベクトルの y 成分
vx2 - 底面の法線ベクトルの x 成分
vy2 - 底面の法線ベクトルの y 成分
beginIndex - ポリゴンを格納する配列の開始インデックス
n - 回転方向の面の分割数
dtheta - 1つの面の角度

setColor

public void setColor(java.awt.Color color)
表示色を設定する

パラメータ:
color - 設定する表示色

getCount

public int getCount()
ポリゴンの数を返す

定義:
インタフェース PolygonCollection 内の getCount
戻り値:
ポリゴンの数

getPolygon

public Polygon3D getPolygon(int index)
ポリゴンを返す

定義:
インタフェース PolygonCollection 内の getPolygon
パラメータ:
index - ポリゴンを取り出すインデックス
戻り値:
指定された位置のポリゴン