<light> 要素
<light> 要素は、<lightscene> 要素の子です。<light> 要素はライティング設定の 1 つのライトのタイプ、色、および方向を定義します。
<light> 構文
<light name="Light Name" type="[direct|spot|point]" relative="[view|scene]">
<color />
<position />
<direction />
<angle>
<exponent>
</light>
<light> 属性
name
(文字列) 光源の名前を指定します。
type
(文字列) 光源のタイプを direct (デフォルト)、spot、または point と指定します。
相対
(文字列) 光源の相対元が view (デフォルト) か scene かを指定します。
* 
正投影で <light> 属性を type="spot" または type="point" に設定した場合、属性 relative="scene" のみを設定します。relative="view" を設定した場合、予期しない結果が得られる可能性があります。
<light> 子要素
<color/>
アンビエント、拡散、およびスペキュラの各ライティング設定の色強度を指定します(<color> 要素 を参照)。
<position/>
spot 光源および point 光源のみ - 光源が無限遠でないと仮定して、点光源またはスポット光源の位置の XYZ 座標を指定します(<position> 要素 を参照)。
<direction/>
direct 光源および spot 光源のみ - 直接光源またはスポット光源の方向の XYZ ベクトルを指定します(<direction> 要素 を参照)。
<angle>
spot 光源のみ - スポット光源のカットオフ角度を指定します(<angle> 要素 を参照)。
<exponent>
spot 光源のみ - スポット光源の指数を指定します(<exponent> 要素 を参照)。
<light> 例
この例は、シーンに配置されたスポット光源のライティング要素を示しています。
<light name="back" type="spot" relative="scene">
<color ambient="#0A0A0A" diffuse="#FFB669" specular="#E0E0E0"/>
<position x="71.00" y="66.00" z="24.00"/>
<direction x="-60.00" y="60.00" z="-20.00"/>
<angle>10.00</angle>
<exponent>128</exponent>
</light>
これは役に立ちましたか?