Skip to main content

look_at_affine3

Function look_at_affine3 

Source
pub fn look_at_affine3(
    eye: DVec3,
    center: DVec3,
    up: DVec3,
    fwd_axis: DVec3,
    up_axis: DVec3,
) -> DAffine3
Expand description

Returns an DAffine3 model transform from eye, focal point, and up.

fwd_axis and up_axis are the object’s local forward and up axes. The rotation maps fwd_axis onto the direction from eye to center and up_axis onto up. The translation of the returned transform is eye.

§Panics

Will panic if up, fwd_axis or up_axis are not normalized, if fwd_axis and up_axis are not perpendicular, or if center is equal to eye, or if the direction from eye to center is parallel to up, when glam_assert is enabled.