pyvista.Light.world_focal_point#
- property Light.world_focal_point[ソース]#
ライトのワールド空間焦点を返します.
ワールド空間の焦点は,存在する場合,ライトの変換行列によって変換される
focal_point
プロパティです.この読み取り専用プロパティの値は,vtk.vtkLight.GetTransformedFocalPoint()
メソッドに対応します.例
Create a light with a transformation matrix that corresponds to a 90-degree rotation around the z-axis and a shift by (0, 0, -1), and check that the light's focal point transforms as expected.
>>> import numpy as np >>> import pyvista as pv >>> light = pv.Light(focal_point=(1, 0, 3)) >>> trans = np.zeros((4, 4)) >>> trans[:-1, :-1] = [[0, -1, 0], [1, 0, 0], [0, 0, 1]] >>> trans[:-1, -1] = [0, 0, -1] >>> light.transform_matrix = trans >>> light.focal_point (1.0, 0.0, 3.0) >>> light.world_focal_point (0.0, 1.0, 2.0)