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

Lamp::Color3f Class Reference

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

#include <Color3f.h>

List of all members.

Public Member Functions

 Color3f ()
 コンストラクタ

 Color3f (float sourceR, float sourceG, float sourceB)
 コンストラクタ

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

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

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

void set (float sourceR, float sourceG, float sourceB)
 値の設定

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

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

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

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

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

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

Color3f operator * (float mulValue) const
 乗算

Color3f operator+ () const
 +演算子

Color3f operator- () const
 -演算子

Color3foperator+= (const Color3f &addColor)
 代入加算

Color3foperator-= (const Color3f &subColor)
 代入減算

Color3foperator *= (const Color3f &mulColor)
 代入乗算

Color3foperator *= (float mulValue)
 代入乗算

Color3fclamp (float lower=0.f, float upper=1.f)
 クランプ

Color3flowerClamp (float lower=0.f)
 下限クランプ

Color3fupperClamp (float upper=1.f)
 上限クランプ

Color3fnegative ()
 反対色

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

Color3f getHSV () const
 HSVの取得.

float getHue () const
 色相の取得

float getSaturation () const
 彩度の取得

float getValue () const
 明度の取得

float getLuminance () const
 輝度の取得

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

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

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

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

String toString () const
 文字列化


Static Public Member Functions

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


Static Public Attributes

const Color3f white
 

const Color3f gray
 灰色

const Color3f black
 

const Color3f red
 

const Color3f green
 

const Color3f blue
 

const Color3f yellow
 

const Color3f cyan
 青緑

const Color3f magenta
 赤紫


Friends

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


Detailed Description

三要素実数カラー

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

Definition at line 42 of file Color3f.h.


Constructor & Destructor Documentation

Lamp::Color3f::Color3f  )  [inline]
 

コンストラクタ

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

Definition at line 111 of file Color3f.h.

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

Lamp::Color3f::Color3f float  sourceR,
float  sourceG,
float  sourceB
[inline]
 

コンストラクタ

Parameters:
sourceR 赤の初期値
sourceG 緑の初期値
sourceB 青の初期値

Definition at line 119 of file Color3f.h.

References b, g, and r.

Lamp::Color3f::Color3f const Color3c source  )  [explicit]
 

コンストラクタ

Parameters:
source 設定する色

Definition at line 65 of file Color3f.cpp.

Lamp::Color3f::Color3f const Color4c source  )  [explicit]
 

コンストラクタ

Parameters:
source 設定する色

Definition at line 70 of file Color3f.cpp.

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

コンストラクタ

Parameters:
source 設定する色

Definition at line 75 of file Color3f.cpp.


Member Function Documentation

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

クランプ

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

Definition at line 296 of file Color3f.h.

References Assert, b, g, and r.

bool Lamp::Color3f::epsilonEquals const Color3f target,
float  epsilon
const [inline]
 

同じ値かどうか

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

Definition at line 494 of file Color3f.h.

References Assert, b, g, and r.

Color3f Lamp::Color3f::getHSV  )  const [inline]
 

HSVの取得.

Returns:
HSVカラー

Definition at line 376 of file Color3f.h.

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

float Lamp::Color3f::getHue  )  const [inline]
 

色相の取得

Returns:
色相

Definition at line 412 of file Color3f.h.

References b, g, and r.

float Lamp::Color3f::getLuminance  )  const [inline]
 

輝度の取得

Returns:
輝度

Definition at line 454 of file Color3f.h.

References b, g, and r.

Referenced by Lamp::Light::getLuminance().

float Lamp::Color3f::getSaturation  )  const [inline]
 

彩度の取得

Returns:
彩度

Definition at line 434 of file Color3f.h.

References b, g, and r.

float Lamp::Color3f::getValue  )  const [inline]
 

明度の取得

Returns:
明度

Definition at line 446 of file Color3f.h.

References b, g, and r.

Color3f Lamp::Color3f::lerp const Color3f source,
const Color3f target,
float  alpha
[inline, static]
 

色の線形補間

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

Definition at line 466 of file Color3f.h.

References b, g, and r.

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

下限クランプ

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

Definition at line 312 of file Color3f.h.

References b, g, and r.

Color3f& Lamp::Color3f::negative  )  [inline]
 

反対色

Returns:
反転された色

Definition at line 335 of file Color3f.h.

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

bool Lamp::Color3f::notEpsilonEquals const Color3f target,
float  epsilon
const [inline]
 

同じ値でないかどうか

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

Definition at line 517 of file Color3f.h.

References Assert, b, g, and r.

Color3f Lamp::Color3f::operator * float  mulValue  )  const [inline]
 

乗算

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

Definition at line 209 of file Color3f.h.

References b, Color3f(), g, and r.

Color3f Lamp::Color3f::operator * const Color3f mulColor  )  const [inline]
 

乗算

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

Definition at line 200 of file Color3f.h.

References b, Color3f(), g, and r.

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

代入乗算

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

Definition at line 280 of file Color3f.h.

References b, g, and r.

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

代入乗算

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

Definition at line 268 of file Color3f.h.

References b, g, and r.

bool Lamp::Color3f::operator!= const Color3f target  )  const [inline]
 

同じ値でないかどうか

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

Definition at line 507 of file Color3f.h.

References b, g, and r.

Color3f Lamp::Color3f::operator+  )  const [inline]
 

+演算子

Returns:
色のコピー

Definition at line 228 of file Color3f.h.

Color3f Lamp::Color3f::operator+ const Color3f addColor  )  const [inline]
 

加算

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

Definition at line 182 of file Color3f.h.

References b, Color3f(), g, and r.

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

代入加算

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

Definition at line 244 of file Color3f.h.

References b, g, and r.

Color3f Lamp::Color3f::operator-  )  const [inline]
 

-演算子

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

Definition at line 234 of file Color3f.h.

References b, Color3f(), g, and r.

Color3f Lamp::Color3f::operator- const Color3f subColor  )  const [inline]
 

減算

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

Definition at line 191 of file Color3f.h.

References b, Color3f(), g, and r.

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

代入減算

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

Definition at line 256 of file Color3f.h.

References b, g, and r.

bool Lamp::Color3f::operator== const Color3f target  )  const [inline]
 

同じ値かどうか

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

Definition at line 484 of file Color3f.h.

References b, g, and r.

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

四要素実数カラーの設定

Parameters:
source 設定する色

Definition at line 90 of file Color3f.cpp.

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

void Lamp::Color3f::set const Color4c source  ) 
 

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

Parameters:
source 設定する色

Definition at line 85 of file Color3f.cpp.

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

void Lamp::Color3f::set const Color3c source  ) 
 

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

Parameters:
source 設定する色

Definition at line 80 of file Color3f.cpp.

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

void Lamp::Color3f::set float  sourceR,
float  sourceG,
float  sourceB
[inline]
 

値の設定

Parameters:
sourceR 赤の設定値
sourceG 緑の設定値
sourceB 青の設定値

Definition at line 150 of file Color3f.h.

References b, g, and r.

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

void Lamp::Color3f::setHSV const Color3f hsv  )  [inline]
 

HSVの設定.

Parameters:
hsv HSVカラー

Definition at line 345 of file Color3f.h.

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

String Lamp::Color3f::toString  )  const [inline]
 

文字列化

Returns:
カラーの文字列表記

Definition at line 532 of file Color3f.h.

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

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

上限クランプ

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

Definition at line 324 of file Color3f.h.

References b, g, and r.


Friends And Related Function Documentation

Color3f operator * float  mulValue,
const Color3f mulColor
[friend]
 

乗算

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

Definition at line 219 of file Color3f.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