shading
クラス Shading

java.lang.Object
  上位を拡張 shading.Shading
直系の既知のサブクラス:
FlatShading, GouraudShading

public abstract class Shading
extends java.lang.Object

シェーディングの抽象スーパークラス


フィールドの概要
protected  int height
          画面高さ
protected static LightModel LIGHT_MODEL
          光学的モデル
protected  Point3D lightPoint
          光源
protected  boolean perspect
          透視変換をする場合は true
protected  Point3D viewPoint
          視点
protected  int width
          画面幅
 
コンストラクタの概要
protected Shading(int width, int height, Point3D viewPoint, Point3D lightPoint, boolean perspect)
          シェーディングオブジェクトを構築する
 
メソッドの概要
protected  Point3D screen(Point3D p)
          ワールド座標を画面座標に変換する
abstract  void shading(Polygon3D pl, int[] pixel, double[] zbuf)
          ポリゴンのシェーディング描画計算をする
 void shading(PolygonCollection pc, int[] pixel, double[] zbuf)
          ポリゴン集合のシェーディング描画計算をする
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

LIGHT_MODEL

protected static final LightModel LIGHT_MODEL
光学的モデル


width

protected int width
画面幅


height

protected int height
画面高さ


viewPoint

protected Point3D viewPoint
視点


lightPoint

protected Point3D lightPoint
光源


perspect

protected boolean perspect
透視変換をする場合は true

コンストラクタの詳細

Shading

protected Shading(int width,
                  int height,
                  Point3D viewPoint,
                  Point3D lightPoint,
                  boolean perspect)
シェーディングオブジェクトを構築する

パラメータ:
width - 画面幅
height - 画面高さ
viewPoint - 視点
lightPoint - 光源
perspect - 透視変換をする場合は true
メソッドの詳細

shading

public abstract void shading(Polygon3D pl,
                             int[] pixel,
                             double[] zbuf)
ポリゴンのシェーディング描画計算をする

パラメータ:
pl - ポリゴン
pixel - ピクセルデータを格納する配列
zbuf - z 座標のバッファを格納する配列

shading

public void shading(PolygonCollection pc,
                    int[] pixel,
                    double[] zbuf)
ポリゴン集合のシェーディング描画計算をする

パラメータ:
pc - ポリゴン集合
pixel - ピクセルデータを格納する配列
zbuf - z 座標のバッファを格納する配列

screen

protected Point3D screen(Point3D p)
ワールド座標を画面座標に変換する

パラメータ:
p - 変換前の点
戻り値:
変換後の点