kGLModel
クラス KGLPoint

java.lang.Object
  上位を拡張 kGLModel.KGLPoint

public class KGLPoint
extends java.lang.Object

float型の頂点関連情報を保持、計算する為のクラス

作成者:
kei

コンストラクタの概要
KGLPoint(int in_num)
          カラデータ作成
KGLPoint(KGLPoint source)
          指定データ配列と同じ内容のデータで作成
 
メソッドの概要
 float A()
          要素Aを取り出す
 KGLPoint add(float[] in)
          このクラスの要素に追加データを足し込む
 KGLPoint add(KGLPoint in)
          このクラスの要素に追加データを足し込む
 float B()
          要素Bを取り出す
static KGLPoint create(float[] in_data)
          指定データ配列と同じ内容のデータで作成
static KGLPoint create(KGLPoint in_data)
          指定データ配列と同じ内容のデータで作成
static KGLPoint createCOLOR(float R, float G, float B)
          指定カラーデータでこのクラスを作成
static KGLPoint createCOLOR(float R, float G, float B, float A)
          指定カラーデータでこのクラスを作成
static KGLPoint createUV(float U, float V)
          指定UVデータでこのクラスを作成
static KGLPoint createXYZ(float X, float Y, float Z)
          指定頂点データでこのクラスを作成
 float G()
          要素Gを取り出す
protected  float[] getData()
          内部データの取り出し
 KGLPoint normalize()
          正規化をする
原点からの距離をもとめて、全要素を距離で割って0〜1の値にする
 float R()
          要素Rを取り出す
 KGLPoint scale(float in)
          このクラスの要素を指定倍する
 KGLPoint set_COLOR(float r, float g, float b)
          カラーデータをこのクラスに設定する
 KGLPoint set_COLOR(float r, float g, float b, float a)
          カラーデータをこのクラスに設定する
 KGLPoint set_UV(float u, float v)
          2次元データをこのクラスに設定する
 KGLPoint set_XYZ(float x, float y, float z)
          3次元データをこのクラスに設定する
 KGLPoint set(float[] src)
          データをこのクラスに設定する
 KGLPoint set(KGLPoint src)
          データをこのクラスに設定する
 java.lang.String toString()
          内部データを文字列にする
 float U()
          要素Uを取り出す
 KGLPoint updateMaximam(KGLPoint in)
          このクラスの要素と比較データを比べて大きければ比較データに置き換える(要素毎)
 KGLPoint updateMinimam(KGLPoint in)
          このクラスの要素と比較データを比べて小さければ比較データに置き換える(要素毎)
 float V()
          要素Vを取り出す
static KGLPoint vector(KGLPoint from, KGLPoint to)
          from地点〜to地点を原点からの点にする
0   from--->to
原点

0--->returan値
 float X()
          要素xを取り出す
 float Y()
          要素Yを取り出す
 float Z()
          要素Zを取り出す
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

KGLPoint

public KGLPoint(int in_num)
カラデータ作成

パラメータ:
in_num - データ数

KGLPoint

public KGLPoint(KGLPoint source)
指定データ配列と同じ内容のデータで作成

パラメータ:
source - 指定データ
メソッドの詳細

create

public static KGLPoint create(KGLPoint in_data)
指定データ配列と同じ内容のデータで作成

パラメータ:
in_data - 指定データ
戻り値:
作成クラス

create

public static KGLPoint create(float[] in_data)
指定データ配列と同じ内容のデータで作成

パラメータ:
in_data - 指定データ
戻り値:
作成クラス

createUV

public static KGLPoint createUV(float U,
                                float V)
指定UVデータでこのクラスを作成

パラメータ:
U -
V -
戻り値:
作成クラス

createXYZ

public static KGLPoint createXYZ(float X,
                                 float Y,
                                 float Z)
指定頂点データでこのクラスを作成

パラメータ:
X -
Y -
Z -
戻り値:
作成クラス

createCOLOR

public static KGLPoint createCOLOR(float R,
                                   float G,
                                   float B)
指定カラーデータでこのクラスを作成

パラメータ:
R -
G -
B -
戻り値:
作成クラス

createCOLOR

public static KGLPoint createCOLOR(float R,
                                   float G,
                                   float B,
                                   float A)
指定カラーデータでこのクラスを作成

パラメータ:
R -
G -
B -
A -
戻り値:
作成クラス

normalize

public KGLPoint normalize()
正規化をする
原点からの距離をもとめて、全要素を距離で割って0〜1の値にする

戻り値:
自分自身

vector

public static KGLPoint vector(KGLPoint from,
                              KGLPoint to)
from地点〜to地点を原点からの点にする
0   from--->to
原点

0--->returan値

パラメータ:
from -
to -
戻り値:
自分自身

getData

protected float[] getData()
内部データの取り出し

戻り値:
内部データ

set

public KGLPoint set(KGLPoint src)
データをこのクラスに設定する

パラメータ:
src - データ
戻り値:
自分自身

set

public KGLPoint set(float[] src)
データをこのクラスに設定する

パラメータ:
src - データ
戻り値:
自分自身

set_XYZ

public KGLPoint set_XYZ(float x,
                        float y,
                        float z)
3次元データをこのクラスに設定する

パラメータ:
x -
y -
z -
戻り値:
自分自身

set_UV

public KGLPoint set_UV(float u,
                       float v)
2次元データをこのクラスに設定する

パラメータ:
u -
v -
戻り値:
自分自身

set_COLOR

public KGLPoint set_COLOR(float r,
                          float g,
                          float b)
カラーデータをこのクラスに設定する

パラメータ:
r -
g -
b -
戻り値:
自分自身

set_COLOR

public KGLPoint set_COLOR(float r,
                          float g,
                          float b,
                          float a)
カラーデータをこのクラスに設定する

パラメータ:
r -
g -
b -
a -
戻り値:
自分自身

add

public KGLPoint add(KGLPoint in)
このクラスの要素に追加データを足し込む

パラメータ:
in - 追加データ
戻り値:
自分自身

add

public KGLPoint add(float[] in)
このクラスの要素に追加データを足し込む

パラメータ:
in - 追加データ
戻り値:
自分自身

scale

public KGLPoint scale(float in)
このクラスの要素を指定倍する

パラメータ:
in - 倍率
戻り値:
自分自身

updateMinimam

public KGLPoint updateMinimam(KGLPoint in)
このクラスの要素と比較データを比べて小さければ比較データに置き換える(要素毎)

パラメータ:
in - 追加データ
戻り値:
自分自身

updateMaximam

public KGLPoint updateMaximam(KGLPoint in)
このクラスの要素と比較データを比べて大きければ比較データに置き換える(要素毎)

パラメータ:
in - 追加データ
戻り値:
自分自身

X

public float X()
要素xを取り出す

戻り値:
指定データ

Y

public float Y()
要素Yを取り出す

戻り値:
指定データ

Z

public float Z()
要素Zを取り出す

戻り値:
指定データ

U

public float U()
要素Uを取り出す

戻り値:
指定データ

V

public float V()
要素Vを取り出す

戻り値:
指定データ

R

public float R()
要素Rを取り出す

戻り値:
指定データ

G

public float G()
要素Gを取り出す

戻り値:
指定データ

B

public float B()
要素Bを取り出す

戻り値:
指定データ

A

public float A()
要素Aを取り出す

戻り値:
指定データ

toString

public java.lang.String toString()
内部データを文字列にする

オーバーライド:
クラス java.lang.Object 内の toString