add_scene_3d_lightT_add_scene_3d_lightAddScene3dLightAddScene3dLightadd_scene_3d_light (Operator)

Name

add_scene_3d_lightT_add_scene_3d_lightAddScene3dLightAddScene3dLightadd_scene_3d_light — Add a light source to a 3D scene.

Signature

add_scene_3d_light( : : Scene3D, LightPosition, LightKind : LightIndex)

Herror T_add_scene_3d_light(const Htuple Scene3D, const Htuple LightPosition, const Htuple LightKind, Htuple* LightIndex)

void AddScene3dLight(const HTuple& Scene3D, const HTuple& LightPosition, const HTuple& LightKind, HTuple* LightIndex)

Hlong HScene3D::AddScene3dLight(const HTuple& LightPosition, const HString& LightKind) const

Hlong HScene3D::AddScene3dLight(const HTuple& LightPosition, const char* LightKind) const

Hlong HScene3D::AddScene3dLight(const HTuple& LightPosition, const wchar_t* LightKind) const   (Windows only)

static void HOperatorSet.AddScene3dLight(HTuple scene3D, HTuple lightPosition, HTuple lightKind, out HTuple lightIndex)

int HScene3D.AddScene3dLight(HTuple lightPosition, string lightKind)

def add_scene_3d_light(scene_3d: HHandle, light_position: Sequence[Union[int, float]], light_kind: str) -> int

Description

add_scene_3d_lightadd_scene_3d_lightAddScene3dLightAddScene3dLightAddScene3dLightadd_scene_3d_light adds a new light source to the scene Scene3DScene3DScene3DScene3Dscene3Dscene_3d and returns its index in LightIndexLightIndexLightIndexLightIndexlightIndexlight_index. The kind of the light source must be specified in LightKindLightKindLightKindLightKindlightKindlight_kind. For LightKindLightKindLightKindLightKindlightKindlight_kind = 'point_light'"point_light""point_light""point_light""point_light""point_light", LightPositionLightPositionLightPositionLightPositionlightPositionlight_position is interpreted as the position of the light source. For LightKindLightKindLightKindLightKindlightKindlight_kind = 'directional_light'"directional_light""directional_light""directional_light""directional_light""directional_light", LightPositionLightPositionLightPositionLightPositionlightPositionlight_position 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_lightAddScene3dLightAddScene3dLightAddScene3dLightadd_scene_3d_light 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

Parameters

Scene3DScene3DScene3DScene3Dscene3Dscene_3d (input_control)  scene_3d HScene3D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 3D scene.

LightPositionLightPositionLightPositionLightPositionlightPositionlight_position (input_control)  real-array HTupleSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Position of the new light source.

Default value: [-100.0,-100.0,0.0]

LightKindLightKindLightKindLightKindlightKindlight_kind (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of the new light source.

Default value: 'point_light' "point_light" "point_light" "point_light" "point_light" "point_light"

List of values: 'directional_light'"directional_light""directional_light""directional_light""directional_light""directional_light", 'point_light'"point_light""point_light""point_light""point_light""point_light"

LightIndexLightIndexLightIndexLightIndexlightIndexlight_index (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Index of the new light source in the 3D scene.

Result

add_scene_3d_lightadd_scene_3d_lightAddScene3dLightAddScene3dLightAddScene3dLightadd_scene_3d_light returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Possible Predecessors

create_scene_3dcreate_scene_3dCreateScene3dCreateScene3dCreateScene3dcreate_scene_3d

Possible Successors

set_scene_3d_light_paramset_scene_3d_light_paramSetScene3dLightParamSetScene3dLightParamSetScene3dLightParamset_scene_3d_light_param

See also

remove_scene_3d_lightremove_scene_3d_lightRemoveScene3dLightRemoveScene3dLightRemoveScene3dLightremove_scene_3d_light

Module

3D Metrology