look_at#

view_transf.look_at(p0: float, p1: float, p2: float) int#

Sets the look_at point for the selected viewport(s).

Since transformations can be different per viewport, this can be set for each viewport, thus a viewport selection is needed if more than one viewport is being used.
Coordinates are in reference to the model coordinate system.
Args:
p0:

‘x_coord’ model x, y, z coordinates of the look_at point

p1:

‘y_coord’ model x, y, z coordinates of the look_at point

p2:

‘z_coord’ model x, y, z coordinates of the look_at point

Examples:
# 
# Selecting two viewports 
# 
ensight.viewport.select_begin(1,3)
# 
# Setting the look_at and look_from points 
# for each of these viewports 
# 
ensight.view_transf.look_at(1.0000e+00,5.0000e-01,1.0000e+00)
ensight.view_transf.look_from(5.0000e-01,5.0000e-01,2.0000e+01)
# 
# Changing the distance between the look_at and the look_from 
# points. The look_at point will not change, but the 
# look_from point will be moved appropriately 
# 
ensight.view_transf.distance(2.5000e+01)
Returns:

zero on success, non-zero on error