to.tetramorph.starbase.chartparts
クラス Sector

java.lang.Object
  上位を拡張 to.tetramorph.starbase.chartparts.Sector

public class Sector
extends Object

一星座とか一室分とかホロスコープにおける扇形の1区画のShapeを表現する。


フィールドの概要
 Shape inner
          扇形の内側の円弧
 Shape line1
          扇形の始点側の直線
 Shape line2
          扇形の終点側の直線
 Shape outer
          扇形の外側の円弧
 Shape sector
          扇形の全体のパス
 
コンストラクタの概要
Sector()
          Creates a new instance of Sector
Sector(Shape line1, Shape line2, Shape inner, Shape outer, Shape sector)
          オブジェクトを作成する。
 
メソッドの概要
static Sector[] getRing(double x, double y, double w, double r1, double r2, double[] cusps, double asc)
          分割されたドーナッツ円のShape配列を返す。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

line1

public Shape line1
扇形の始点側の直線


line2

public Shape line2
扇形の終点側の直線


outer

public Shape outer
扇形の外側の円弧


inner

public Shape inner
扇形の内側の円弧


sector

public Shape sector
扇形の全体のパス

コンストラクタの詳細

Sector

public Sector()
Creates a new instance of Sector


Sector

public Sector(Shape line1,
              Shape line2,
              Shape inner,
              Shape outer,
              Shape sector)
オブジェクトを作成する。

パラメータ:
sector - 全体を表現したShape
line1 - 始点側の直線
line2 - 終点側の直線
inner - 内側の円弧
outer - 外側の円弧
メソッドの詳細

getRing

public static Sector[] getRing(double x,
                               double y,
                               double w,
                               double r1,
                               double r2,
                               double[] cusps,
                               double asc)
分割されたドーナッツ円のShape配列を返す。 ドーナッツは扇形のShapeから構成されている。扇形のShapeはSectorオブジェクト として管理されていて、扇形の全体を表すShape、外側の円弧、内側の円弧、 両サイドの線、というよう各パーツごとにShapeをもっている。 cusps[]にはドーナッツ円をどこで分割するかを指定する。獣帯リングであれば、 cusps [] = { 0,30d,60d,90d...330d };といった配列を与える。ハウスならもっと 中途半端な値が渡されるだろうし、数だって12個とは限らない。 cuspsの値は、部屋の順番にならんでいなければならない。つまり1室のカスプの次は2室 のカスプが指定されているという前提にたっていて、1室の次に3室を指定したりするこ とはできない。

パラメータ:
asc - 原点角から何度回転させるか。
x - 原点x
y - 原点y
w - 幅(pixcel) 外円の最大直径
r1 - 内円半径(0〜1) 幅(w)に対してのパーセンテージで指定
r2 - 外円半径(0〜1) 幅(w)に対してのパーセンテージで指定
cusps - 分割度数の配列 黄道座標での度数
戻り値:
cusps.lengthと同じサイズのSector配列