As in, for any two Transform3D objects A and B i might encounter does Godot (4.1) always return A * B == B * A as true? Alternatively is it approximately commutative, ie (A * B).is_equal_approx(B * A), in case there are situations where floating point imprecision messes the exact equality up.

  • o11c@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    I likewise don’t really use Godot, but for graphics in general, the 4th coordinate is important, even if it is “usually” 1. It’s most obvious to correctly interpolate near the poles of a sphere with a single rectangular texture, but think for a minute what “near” means.

    Back to the main point though: the important things we normally rely on for matrix math are associativity (particularly, for exponentiation!) and anticommutativity (beware definitions that are sloppy about “inverse”).

    • 133arc585@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      arrow-down
      2
      ·
      edit-2
      1 year ago

      but for graphics in general, the 4th coordinate is important, even if it is “usually” 1.

      Who said it isn’t? Transformation matrices acting on R3 are 4x4 (since transformation matrices acting on Rn are of dimension n+1 in general), whether they’re full rank or not.