I’m using Matri4x4ces (or whatever the plural form of Matrix4x4 would be) quite a lot in my project. Coming from a SketchUp extension background I’m very used to working in matrices, and they are a very versatile way to express a difference in coordinate system, e.g. for teleportation or a reflective material.
However I’m missing a few attributes. I’d much like to be able to read and set position, forward, right and up.
In addition I’d also prefer to have a * operator for cross multiplication on the Vecto3 class, rather than having to call the static function. It’s really just a cosmetic thing, but I think it would be nice.
I’m completely new to C#. Is there a way for me to implement such functions into the existing classes, those given as return values from the API’s built in functions? In Ruby it would be possible to edit the class directly, with the risk of a collision with another script doing the same, or use refinements for local monkey patching, that doesn’t affect other scripts. Is there something similar in C#?
Btw, as I could neither chose C#, monkey patching or scripting as topic, and there seems to be no way of seeing what topics are available without starting writing them, I just went with whatever random character combination the system accepted.