pyvale.render.rasterops module¶
Private rasterisation helpers used by 2D planar deformation renderers.
- calculate_edge_function(point_a, point_b, point_c)[source]¶
Evaluate the signed two dimensional edge function.
- Parameters:
point_a (
np.ndarray) – First vertex coordinate array with shape(2,)and dtypefloat64representing (X, Y).point_b (
np.ndarray) – Second vertex coordinate array with shape(2,)and dtypefloat64representing (X, Y).point_c (
np.ndarray) – Evaluation point coordinate array with shape(2,)or(2, N)and dtypefloat64representing (X, Y).
- Returns:
np.ndarray– Signed edge function value(s) with dtypefloat64.
- calculate_elem_bound_box_high(coord_max, image_px)[source]¶
Calculate upper pixel bounds for an element.
- Parameters:
coord_max (
np.ndarray) – Maximum coordinate array with shape(2,)and dtypefloat64representing (max_x, max_y).image_px (
int) – Maximum image dimension in pixels.
- Returns:
np.ndarray– Upper pixel bounding box array with shape(2,)and dtypeint32clamped toimage_px.
- calculate_elem_bound_box_low(coord_min)[source]¶
Calculate non negative lower pixel bounds for an element.
- Parameters:
coord_min (
np.ndarray) – Minimum coordinate array with shape(2,)and dtypefloat64representing (min_x, min_y).- Returns:
np.ndarray– Lower pixel bounding box array with shape(2,)and dtypeint32clamped to a minimum of 0.