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],
)
| 5 | |
| 6 | |
| 7 | def 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 | |
| 23 | def camera_vectors_from_target_position( |
no test coverage detected