submitted 3 years ago* (last edited 3 years ago) by to c/godot@programming.dev
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 3 years ago (1 child)

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").

  • source
  • parent
  • hideshow 1 child comment
  • [–] -1 points 3 years 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 R^3^ are 4x4 (since transformation matrices acting on R^n^ are of dimension n+1 in general), whether they're full rank or not.

  • source
  • parent