MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / camera_vectors_from_element_placement

Function camera_vectors_from_element_placement

src/bcf/bcf/geometry.py:7–20  ·  view source on GitHub ↗

Calculate the vectors of a camera pointing to an element. Args: elem_placement: Placement matrix of an element. Returns: Camera position, direction and up vectors

(
    elem_placement: NDArray[np.float64],
)

Source from the content-addressed store, hash-verified

5
6
7def camera_vectors_from_element_placement(
8 elem_placement: NDArray[np.float64],
9) -> tuple[list[float], list[float], list[float]]:
10 """
11 Calculate the vectors of a camera pointing to an element.
12
13 Args:
14 elem_placement: Placement matrix of an element.
15
16 Returns:
17 Camera position, direction and up vectors
18 """
19 target_position = elem_placement[:3, 3]
20 return camera_vectors_from_target_position(target_position)
21
22
23def camera_vectors_from_target_position(

Callers 2

build_cameraFunction · 0.90
build_cameraFunction · 0.90

Tested by

no test coverage detected