![]() |
Springhead
An open source physics engine for virtual reality, haptics and motion generation.
|
光源
#include <SprGRRender.h>

Public メソッド | |
| SPR_DESCDEF (GRLight) | |
Public 変数 | |
| Vec4f | ambient |
| 環境光 | |
| Vec4f | diffuse |
| 拡散光 | |
| Vec4f | specular |
| 鏡面光 | |
| Vec4f | position |
| 光源位置(w=1.0で点光源、w=0.0で平行光源) | |
| float | range |
| 光が届く範囲(deviceがDirectXの場合のみ利用可能) | |
| Vec3f | spotDirection |
| スポットライトの向き | |
| float | spotFalloff |
| スポットライトの円錐内での減衰率(大きいほど急峻) 0..∞ | |
| float | spotInner |
| スポットライトの中心部分(内部コーン)(deviceがDirectXの場合のみ利用可能) 0..spotCutoff | |
| float | spotCutoff |
| スポットライトの広がり角度(度)(外部コーン) 0..π(pi) | |
減衰パラメータ | |
これらを設定することで光の減衰を表現できる。 | |
| float | attenuation0 |
| 一定減衰率 | |
| float | attenuation1 |
| 線形減衰率 | |
| float | attenuation2 |
| 2次減衰率 | |