Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Lamp::Color4f Class Reference

四要素実数カラー More...

#include <Color4f.h>

List of all members.

Public Member Functions

 Color4f ()
 コンストラクタ

 Color4f (float sourceR, float sourceG, float sourceB, float sourceA=1.f)
 コンストラクタ

 Color4f (const Color3c &source)
 コンストラクタ

 Color4f (const Color4c &source)
 コンストラクタ

 Color4f (const Color3f &source)
 コンストラクタ

void set (float sourceR, float sourceG, float sourceB, float sourceA=1.f)
 値の設定

void set (const Color3c &source)
 三要素キャラクタカラーの設定

void set (const Color4c &source)
 四要素キャラクタカラーの設定

void set (const Color3f &source)
 三要素実数カラーの設定

Color4f operator+ (const Color4f &addColor) const
 加算

Color4f operator- (const Color4f &subColor) const
 減算

Color4f operator * (const Color4f &mulColor) const
 乗算

Color4f operator * (float mulValue) const
 乗算

Color4f operator+ () const
 +演算子

Color4f operator- () const
 -演算子

Color4f & operator+= (const Color4f &addColor)
 代入加算

Color4f & operator-= (const Color4f &subColor)
 代入減算

Color4f & operator *= (const Color4f &mulColor)
 代入乗算

Color4f & operator *= (float mulValue)
 代入乗算

Color4f & clamp (float lower=0.f, float upper=1.f)
 クランプ

Color4f & lowerClamp (float lower=0.f)
 下限クランプ

Color4f & upperClamp (float upper=1.f)
 上限クランプ

Color4f & negative ()
 反対色

void setHSV (const Color4f &hsv)
 HSVの設定.

Color4f getHSV () const
 HSVの取得.

float getHue () const
 色相の取得

float getSaturation () const
 彩度の取得

float getValue () const
 明度の取得

float getLuminance () const
 輝度の取得

bool operator== (const Color4f &target) const
 同じ値かどうか

bool epsilonEquals (const Color4f &target, float epsilon) const
 同じ値かどうか

bool operator!= (const Color4f &target) const
 同じ値でないかどうか

bool notEpsilonEquals (const Color4f &target, float epsilon) const
 同じ値でないかどうか

String toString () const
 文字列化


Static Public Member Functions

Color4f lerp (const Color4f &source, const Color4f &target, float alpha)
 色の線形補間


Static Public Attributes

const Color4f white
 白

const Color4f gray
 灰色

const Color4f black
 黒

const Color4f red
 赤

const Color4f green
 緑

const Color4f blue
 青

const Color4f yellow
 黄

const Color4f cyan
 青緑

const Color4f magenta
 赤紫


Friends

Color4f operator * (float mulValue, const Color4f &mulColor)
 乗算


Detailed Description

四要素実数カラー

このクラスは継承しないで下さい。

Definition at line 42 of file Color4f.h.


Constructor & Destructor Documentation

Lamp::Color4f::Color4f (   )  [inline]
 

コンストラクタ

このコンストラクタは初期値の設定を行わないため値は不定です。

Definition at line 115 of file Color4f.h.

Referenced by operator *(), operator+(), and operator-().

Lamp::Color4f::Color4f (  float  sourceR,
float  sourceG,
float  sourceB,
float  sourceA = 1.f
)  [inline]
 

コンストラクタ

Parameters:
sourceR 赤の初期値
sourceG 緑の初期値
sourceB 青の初期値
sourceA アルファの初期値

Definition at line 124 of file Color4f.h.

References a, b, g, and r.

Lamp::Color4f::Color4f (  const Color3c &  source  )  [explicit]
 

コンストラクタ

Parameters:
source 設定する色

Definition at line 65 of file Color4f.cpp.

Lamp::Color4f::Color4f (  const Color4c &  source  )  [explicit]
 

コンストラクタ

Parameters:
source 設定する色

Definition at line 70 of file Color4f.cpp.

Lamp::Color4f::Color4f (  const Color3f &  source  )  [explicit]
 

コンストラクタ

Parameters:
source 設定する色

Definition at line 76 of file Color4f.cpp.


Member Function Documentation

Color4f& Lamp::Color4f::clamp (  float  lower = 0.f,
float  upper = 1.f
)  [inline]
 

クランプ

Parameters:
lower クランプ下限値
upper クランプ上限値
Returns:
クランプされた色

Definition at line 314 of file Color4f.h.

References a, Assert, b, g, and r.

bool Lamp::Color4f::epsilonEquals (  const Color4f &  target,
float  epsilon
)  const [inline]
 

同じ値かどうか

Parameters:
target 比較するカラー
epsilon 誤差
Returns:
誤差の範囲内で同じ値であればtrueを返す

Definition at line 522 of file Color4f.h.

References a, Assert, b, g, and r.

Color4f Lamp::Color4f::getHSV (   )  const [inline]
 

HSVの取得.

Returns:
HSVカラー

Definition at line 401 of file Color4f.h.

References a, b, g, h, r, s, and v.

float Lamp::Color4f::getHue (   )  const [inline]
 

色相の取得

Returns:
色相

Definition at line 438 of file Color4f.h.

References b, g, and r.

float Lamp::Color4f::getLuminance (   )  const [inline]
 

輝度の取得

Returns:
輝度

Definition at line 480 of file Color4f.h.

References b, g, and r.

float Lamp::Color4f::getSaturation (   )  const [inline]
 

彩度の取得

Returns:
彩度

Definition at line 460 of file Color4f.h.

References b, g, and r.

float Lamp::Color4f::getValue (   )  const [inline]
 

明度の取得

Returns:
明度

Definition at line 472 of file Color4f.h.

References b, g, and r.

Color4f Lamp::Color4f::lerp (  const Color4f &  source,
const Color4f &  target,
float  alpha
)  [inline, static]
 

色の線形補間

Parameters:
source 開始色
target 対象色
alpha ブレンド係数
Returns:
線形補間された色

Definition at line 492 of file Color4f.h.

References a, b, g, and r.

Color4f& Lamp::Color4f::lowerClamp (  float  lower = 0.f  )  [inline]
 

下限クランプ

Parameters:
lower クランプ下限値
Returns:
クランプされた色

Definition at line 332 of file Color4f.h.

References a, b, g, and r.

Color4f& Lamp::Color4f::negative (   )  [inline]
 

反対色

アルファ値は変化しません。

Returns:
反転された色

Definition at line 359 of file Color4f.h.

References a, b, g, r, and set().

bool Lamp::Color4f::notEpsilonEquals (  const Color4f &  target,
float  epsilon
)  const [inline]
 

同じ値でないかどうか

Parameters:
target 比較するカラー
epsilon 誤差
Returns:
誤差の範囲内で同じでない値であればtrueを返す

Definition at line 547 of file Color4f.h.

References a, Assert, b, g, and r.

Color4f Lamp::Color4f::operator * (  float  mulValue  )  const [inline]
 

乗算

Parameters:
mulValue 乗算する値
Returns:
乗算された色

Definition at line 221 of file Color4f.h.

References a, b, Color4f(), g, and r.

Color4f Lamp::Color4f::operator * (  const Color4f &  mulColor  )  const [inline]
 

乗算

Parameters:
mulColor 乗算する色
Returns:
乗算された色

Definition at line 211 of file Color4f.h.

References a, b, Color4f(), g, and r.

Color4f& Lamp::Color4f::operator *= (  float  mulValue  )  [inline]
 

代入乗算

Parameters:
mulValue 乗算する値
Returns:
乗算された色

Definition at line 297 of file Color4f.h.

References a, b, g, and r.

Color4f& Lamp::Color4f::operator *= (  const Color4f &  mulColor  )  [inline]
 

代入乗算

Parameters:
mulColor 乗算する色
Returns:
乗算された色

Definition at line 284 of file Color4f.h.

References a, b, g, and r.

bool Lamp::Color4f::operator!= (  const Color4f &  target  )  const [inline]
 

同じ値でないかどうか

Parameters:
target 比較するカラー
Returns:
同じ値でなければtrueを返す

Definition at line 536 of file Color4f.h.

References a, b, g, and r.

Color4f Lamp::Color4f::operator+ (   )  const [inline]
 

+演算子

Returns:
色のコピー

Definition at line 242 of file Color4f.h.

Color4f Lamp::Color4f::operator+ (  const Color4f &  addColor  )  const [inline]
 

加算

Parameters:
addColor 加算する色
Returns:
加算された色

Definition at line 191 of file Color4f.h.

References a, b, Color4f(), g, and r.

Color4f& Lamp::Color4f::operator+= (  const Color4f &  addColor  )  [inline]
 

代入加算

Parameters:
addColor 加算する色
Returns:
加算された色

Definition at line 258 of file Color4f.h.

References a, b, g, and r.

Color4f Lamp::Color4f::operator- (   )  const [inline]
 

-演算子

Returns:
値の符号が反転した色

Definition at line 248 of file Color4f.h.

References a, b, Color4f(), g, and r.

Color4f Lamp::Color4f::operator- (  const Color4f &  subColor  )  const [inline]
 

減算

Parameters:
subColor 減算する色
Returns:
減算された色

Definition at line 201 of file Color4f.h.

References a, b, Color4f(), g, and r.

Color4f& Lamp::Color4f::operator-= (  const Color4f &  subColor  )  [inline]
 

代入減算

Parameters:
subColor 減算する色
Returns:
減算された色

Definition at line 271 of file Color4f.h.

References a, b, g, and r.

bool Lamp::Color4f::operator== (  const Color4f &  target  )  const [inline]
 

同じ値かどうか

Parameters:
target 比較するカラー
Returns:
同じ値であればtrueを返す

Definition at line 511 of file Color4f.h.

References a, b, g, and r.

void Lamp::Color4f::set (  const Color3f &  source  ) 
 

三要素実数カラーの設定

Parameters:
source 設定する色

Definition at line 91 of file Color4f.cpp.

References Lamp::Color3f::b, Lamp::Color3f::g, Lamp::Color3f::r, and set().

void Lamp::Color4f::set (  const Color4c &  source  ) 
 

四要素キャラクタカラーの設定

Parameters:
source 設定する色

Definition at line 86 of file Color4f.cpp.

References Lamp::Color4c::a, Lamp::Color4c::b, Lamp::Color4c::g, Lamp::Color4c::r, and set().

void Lamp::Color4f::set (  const Color3c &  source  ) 
 

三要素キャラクタカラーの設定

Parameters:
source 設定する色

Definition at line 81 of file Color4f.cpp.

References Lamp::Color3c::b, Lamp::Color3c::g, Lamp::Color3c::r, and set().

void Lamp::Color4f::set (  float  sourceR,
float  sourceG,
float  sourceB,
float  sourceA = 1.f
)  [inline]
 

値の設定

Parameters:
sourceR 赤の設定値
sourceG 緑の設定値
sourceB 青の設定値
sourceA アルファの設定値

Definition at line 157 of file Color4f.h.

References a, b, g, and r.

Referenced by negative(), set(), and setHSV().

void Lamp::Color4f::setHSV (  const Color4f &  hsv  )  [inline]
 

HSVの設定.

Parameters:
hsv HSVカラー

Definition at line 369 of file Color4f.h.

References a, h, s, set(), and v.

String Lamp::Color4f::toString (   )  const [inline]
 

文字列化

Returns:
カラーの文字列表記

Definition at line 563 of file Color4f.h.

References a, b, Lamp::String::format(), g, and r.

Color4f& Lamp::Color4f::upperClamp (  float  upper = 1.f  )  [inline]
 

上限クランプ

Parameters:
upper クランプ上限値
Returns:
クランプされた色

Definition at line 345 of file Color4f.h.

References a, b, g, and r.


Friends And Related Function Documentation

Color4f operator * (  float  mulValue,
const Color4f &  mulColor
)  [friend]
 

乗算

Parameters:
mulValue 乗算する値
mulColor 乗算される色
Returns:
乗算された色

Definition at line 232 of file Color4f.h.


The documentation for this class was generated from the following files:
Generated on Wed Mar 16 10:29:45 2005 for Lamp by doxygen 1.3.2