worldmap.map
クラス WorldMap

java.lang.Object
  上位を拡張 worldmap.map.WorldMap
すべての実装されたインタフェース:
java.lang.Cloneable
直系の既知のサブクラス:
AEPMap, ECPMap, GlobeMap, MollweideMap

public abstract class WorldMap
extends java.lang.Object
implements java.lang.Cloneable

地図クラス


フィールドの概要
 java.awt.Color bgColor
          背景色
 int column
          データの列の数
 int cx
          画面中心のx座標
 int cy
          画面中心のy座標
 int height
          画面高さ
static double INV_360
          360 の逆数
static double INV_PI
          πの逆数
static int OUT
          地図の領域外を表す整数
protected  int[] point
          地図データを格納した配列
 int radius
          地球儀半径
 int row
          データの行の数
static double TOLERANCE
          公差
protected  double vx
          x 軸方向の回転速度係数
protected  double vy
          y 軸方向の回転速度係数
 int width
          画面幅
 
コンストラクタの概要
protected WorldMap(int row, int column, int[] point, java.awt.Color bgColor)
          地図オブジェクトを構築する
protected WorldMap(WorldMap map)
          地図オブジェクトを構築する
 
メソッドの概要
 int[] calcMapPixel(Region[] region, java.awt.geom.Point2D theta)
          地図画像のピクセルを返す
 java.lang.Object clone()
          オブジェクトのコピーを返す
 boolean equals(java.lang.Object obj)
          オブジェクトの等価判定をする
 java.awt.Color getBackgroundColor()
          背景色を返す
abstract  int getPoint(int x, int y, java.awt.geom.Point2D theta)
          画面上の点から地図上の位置を取り出す
 int getRegion(int pointer)
          領域インデックスを返す
 int getRegion(int x, int y, java.awt.geom.Point2D theta)
          領域種類を返す
abstract  java.awt.Point getViewPoint(int point, java.awt.geom.Point2D theta)
          地図上の位置に対応する画面上の点を取り出す
 int hashCode()
          オブジェクトのハッシュコード値を返す
 java.awt.geom.Point2D rotate(int dtheta, int dphy)
          回転角度を返す
 void setBackgroundColor(java.awt.Color bgColor)
          背景色を設定する
 void setRadius(int radius)
          半径を設定する
 void setSize(int width, int height)
          サイズを設定する
 
クラス java.lang.Object から継承されたメソッド
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

OUT

public static final int OUT
地図の領域外を表す整数

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

TOLERANCE

public static final double TOLERANCE
公差

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

INV_360

public static final double INV_360
360 の逆数

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

INV_PI

public static final double INV_PI
πの逆数

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

width

public int width
画面幅


height

public int height
画面高さ


cx

public int cx
画面中心のx座標


cy

public int cy
画面中心のy座標


radius

public int radius
地球儀半径


row

public int row
データの行の数


column

public int column
データの列の数


point

protected int[] point
地図データを格納した配列


bgColor

public java.awt.Color bgColor
背景色


vx

protected double vx
x 軸方向の回転速度係数


vy

protected double vy
y 軸方向の回転速度係数

コンストラクタの詳細

WorldMap

protected WorldMap(int row,
                   int column,
                   int[] point,
                   java.awt.Color bgColor)
地図オブジェクトを構築する

パラメータ:
row - データの行の数
column - データの列の数
point - 地図領域インデックスを格納した配列
bgColor - 背景色

WorldMap

protected WorldMap(WorldMap map)
地図オブジェクトを構築する

パラメータ:
map - パラメータを取得する地図オブジェクト
メソッドの詳細

getPoint

public abstract int getPoint(int x,
                             int y,
                             java.awt.geom.Point2D theta)
画面上の点から地図上の位置を取り出す

パラメータ:
x - 画面上の点の x 座標
y - 画面上の点の y 座標
theta - 地図の回転角度
戻り値:
地図上の位置を表す整数

getViewPoint

public abstract java.awt.Point getViewPoint(int point,
                                            java.awt.geom.Point2D theta)
地図上の位置に対応する画面上の点を取り出す

パラメータ:
point - 地図上の位置を表す整数
theta - 地図の回転角度
戻り値:
画面上の点

setSize

public void setSize(int width,
                    int height)
サイズを設定する

パラメータ:
width - 表示パネルの幅
height - 表示パネルの高さ

setRadius

public void setRadius(int radius)
半径を設定する

パラメータ:
radius - 半径

getBackgroundColor

public java.awt.Color getBackgroundColor()
背景色を返す

戻り値:
背景色

setBackgroundColor

public void setBackgroundColor(java.awt.Color bgColor)
背景色を設定する

パラメータ:
bgColor - 背景色

getRegion

public int getRegion(int x,
                     int y,
                     java.awt.geom.Point2D theta)
領域種類を返す

パラメータ:
x - 画面上の点の x 座標
y - 画面上の点の y 座標
theta - 地図の回転角度
戻り値:
領域を表す整数

getRegion

public int getRegion(int pointer)
領域インデックスを返す

パラメータ:
pointer - 画面上の点のポインタ
戻り値:
指定された位置の領域インデックス

rotate

public java.awt.geom.Point2D rotate(int dtheta,
                                    int dphy)
回転角度を返す

パラメータ:
dtheta - 画面上での移動量の x 成分
dphy - 画面上での移動量の y 成分

calcMapPixel

public int[] calcMapPixel(Region[] region,
                          java.awt.geom.Point2D theta)
地図画像のピクセルを返す

パラメータ:
region - 領域を格納した配列
theta - 地図の回転角度
戻り値:
画面ピクセルの配列

clone

public java.lang.Object clone()
オブジェクトのコピーを返す

オーバーライド:
クラス java.lang.Object 内の clone
戻り値:
このインスタンスの複製

hashCode

public int hashCode()
オブジェクトのハッシュコード値を返す

オーバーライド:
クラス java.lang.Object 内の hashCode
戻り値:
オブジェクトのハッシュコード値

equals

public boolean equals(java.lang.Object obj)
オブジェクトの等価判定をする

オーバーライド:
クラス java.lang.Object 内の equals
パラメータ:
obj - 比較対象のオブジェクト
戻り値:
比較対象のオブジェクトが同じクラスに属し 同じ値を持つ場合は true