add_scene_3d_lightT_add_scene_3d_lightAddScene3dLightAddScene3dLight (Operator)
Name
add_scene_3d_lightT_add_scene_3d_lightAddScene3dLightAddScene3dLight
— Add a light source to a 3D scene.
Signature
Description
add_scene_3d_lightadd_scene_3d_lightAddScene3dLightAddScene3dLightAddScene3dLight
adds a new light source to the scene
Scene3DScene3DScene3DScene3Dscene3D
and returns its index in LightIndexLightIndexLightIndexLightIndexlightIndex
. The kind of
the the light source must be specified in LightKindLightKindLightKindLightKindlightKind
.
For LightKindLightKindLightKindLightKindlightKind
= 'point_light'"point_light""point_light""point_light""point_light", LightPositionLightPositionLightPositionLightPositionlightPosition
is
interpreted as the position of the light source.
For LightKindLightKindLightKindLightKindlightKind
= 'directional_light'"directional_light""directional_light""directional_light""directional_light", LightPositionLightPositionLightPositionLightPositionlightPosition
is interpreted as the vector of the directional light source.
Currently only one light source is supported, such that
add_scene_3d_lightadd_scene_3d_lightAddScene3dLightAddScene3dLightAddScene3dLight
overwrites the existing light source. This may
be changed in future versions.
If no light source is set, a point light source at [-100.0, -100.0, 0.0]
is used.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
Scene3DScene3DScene3DScene3Dscene3D
(input_control) scene_3d →
HScene3D, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the 3D scene.
LightPositionLightPositionLightPositionLightPositionlightPosition
(input_control) real-array →
HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Position of the new light source.
Default value: [-100.0,-100.0,0.0]
LightKindLightKindLightKindLightKindlightKind
(input_control) string →
HTupleHTupleHtuple (string) (string) (HString) (char*)
Type of the new light source.
Default value:
'point_light'
"point_light"
"point_light"
"point_light"
"point_light"
List of values: 'directional_light'"directional_light""directional_light""directional_light""directional_light", 'point_light'"point_light""point_light""point_light""point_light"
LightIndexLightIndexLightIndexLightIndexlightIndex
(output_control) integer →
HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Index of the new light source in the 3D scene.
Result
add_scene_3d_lightadd_scene_3d_lightAddScene3dLightAddScene3dLightAddScene3dLight
returns 2 (H_MSG_TRUE) if all parameters are
correct. If necessary, an exception is raised.
Possible Predecessors
create_scene_3dcreate_scene_3dCreateScene3dCreateScene3dCreateScene3d
Possible Successors
set_scene_3d_light_paramset_scene_3d_light_paramSetScene3dLightParamSetScene3dLightParamSetScene3dLightParam
See also
remove_scene_3d_lightremove_scene_3d_lightRemoveScene3dLightRemoveScene3dLightRemoveScene3dLight
Module
3D Metrology