bcf.geometry
¶
Module Contents¶
- bcf.geometry.camera_vectors_from_element_placement(elem_placement: numpy.typing.NDArray[numpy.float64]) tuple[numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64]] ¶
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.float64], offset: numpy.typing.NDArray[numpy.float64] | None = None) tuple[numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64]] ¶
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.float64]) numpy.typing.NDArray[numpy.float64] ¶
Return the unit vector of a vector.
- Args:
v: vector
- Returns:
unit vector.