bcf.geometry
¶
Module Contents¶
- bcf.geometry.camera_vectors_from_element_placement(elem_placement: numpy.typing.NDArray[numpy.float_]) tuple[numpy.typing.NDArray[numpy.float_], numpy.typing.NDArray[numpy.float_], numpy.typing.NDArray[numpy.float_]] ¶
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
- bcf.geometry.camera_vectors_from_target_position(target_position: numpy.typing.NDArray[numpy.float_], offset: numpy.typing.NDArray[numpy.float_] | None = None) tuple[numpy.typing.NDArray[numpy.float_], numpy.typing.NDArray[numpy.float_], numpy.typing.NDArray[numpy.float_]] ¶
Calculate the vectors of a camera pointing to a target point.
- Args:
target_position: point the camera is pointing to. camera_offset: offset of the camera from the target point.
- Returns:
Camera position, direction and up vectors
- bcf.geometry.unit_vector(v: numpy.typing.NDArray[numpy.float_]) numpy.typing.NDArray[numpy.float_] ¶
Return the unit vector of a vector.
- Args:
v: vector
- Returns:
unit vector.