Skip to main content

apply_affine_transform

Function apply_affine_transform 

Source
pub fn apply_affine_transform(
    points: &[[f64; 3]],
    affine_weights: &[[f64; 4]; 4],
) -> Result<Vec<[f64; 3]>>
Expand description

Apply an affine transformation to a set of 3D points.

§Arguments

  • points: A vector of points in 3D space, represented as arrays [x, y, z].
  • affine_weights: A 4x4 array representing the affine transformation weights.

§Returns

  • Result<Vec<[f64; 3]>>: A Result containing either: A vector of transformed points (Ok) An error if something goes wrong (Err)