set_scene_3d_light_paramT_set_scene_3d_light_paramSetScene3dLightParamSetScene3dLightParamset_scene_3d_light_param (算子)
名称
set_scene_3d_light_paramT_set_scene_3d_light_paramSetScene3dLightParamSetScene3dLightParamset_scene_3d_light_param — 设置三维场景中光源的参数。
签名
void SetScene3dLightParam(const HTuple& Scene3D, const HTuple& LightIndex, const HTuple& GenParamName, const HTuple& GenParamValue)
void HScene3D::SetScene3dLightParam(Hlong LightIndex, const HTuple& GenParamName, const HTuple& GenParamValue) const
void HScene3D::SetScene3dLightParam(Hlong LightIndex, const HString& GenParamName, const HString& GenParamValue) const
void HScene3D::SetScene3dLightParam(Hlong LightIndex, const char* GenParamName, const char* GenParamValue) const
void HScene3D::SetScene3dLightParam(Hlong LightIndex, const wchar_t* GenParamName, const wchar_t* GenParamValue) const
(
Windows only)
描述
set_scene_3d_light_paramset_scene_3d_light_paramSetScene3dLightParamSetScene3dLightParamSetScene3dLightParamset_scene_3d_light_param sets parameters of a light source in the
3D scene Scene3DScene3DScene3DScene3Dscene3Dscene_3d. The name and value of a parameter must be given
in GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value. The following
parameters can be set:
- 'ambient'"ambient""ambient""ambient""ambient""ambient":
-
Ambient part of the light source. Must be given as a tuple of
three numbers.
Default: [0.2, 0.2, 0.2]
- 'diffuse'"diffuse""diffuse""diffuse""diffuse""diffuse":
-
Diffuse part of the light source. Must be given as a tuple of
three numbers.
Default: [0.8, 0.8, 0.8]
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
Scene3DScene3DScene3DScene3Dscene3Dscene_3d (输入控制) scene_3d → HScene3D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
3D 场景的句柄。
LightIndexLightIndexLightIndexLightIndexlightIndexlight_index (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Index of the light source.
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输入控制) string(-array) → HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
通用参数的名称。
默认值:
'ambient'
"ambient"
"ambient"
"ambient"
"ambient"
"ambient"
值列表:
'ambient'"ambient""ambient""ambient""ambient""ambient", 'diffuse'"diffuse""diffuse""diffuse""diffuse""diffuse"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (输入控制) string(-array) → HTupleMaybeSequence[Union[str, int, float]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)
通用参数的值。
默认值:
[0.2,0.2,0.2]
建议值:
[0.2,0.2,0.2]
结果
set_scene_3d_light_paramset_scene_3d_light_paramSetScene3dLightParamSetScene3dLightParamSetScene3dLightParamset_scene_3d_light_param 在所有参数正确时返回 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
add_scene_3d_instanceadd_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceAddScene3dInstanceadd_scene_3d_instance
模块
三维计量