Matrix4x4 - more useful public properties
Forward, Backward, Up, Down, Left, Right public properties for Matrix4x4
I can do this :)
May be it would be better to create, say, GeometricMatrix4x4 for such a purpouse. For example, matrix 4x4 may be electromagnetic field, and there are no notions of "Up" or "Down".
Despite, I not shure that I fully understand, what you mean by "Up" matrix. Is it transformation that moves local coordinates "Up"? Or what?
This makes assumptions about the coordinate system that the transform is in, which could be right-handed or left-handed, with any orientation of the three vectors. I don't think these kinds of constants belong on the Matrix4x4 itself, but a helper class, preferably for the different coordinate system types.
XNA has constants for a right handed coordinate system, but that makes sense because they control the entire pipeline. A generic Matrix type shouldn't make these assumptions.
This is what I'm talking about, @redwyre - the @EmptyKeys does too many assumtions, and even if it would be a helper class, I can't catch his understanding of that assumptions.
You don't have to catch anything. :) This was simple pull request to see if MS want to go this way or not. I'm pretty sure that @mellinoe will not accept this request now after his post in similar topic on Vector3. Anyway I will in future try pull more stuff, which I changed in System.Numerics. It's up to MS guys if they want them or not.
Ah, OK, thank you for explanation, @EmptyKeys , I've thought that it's the proposed change which NEEDS discussing, but it's just the pull-companion issue :).
Anyvay, I don't think that extending changes are nesessary in System.Numerics, it contains pretty base and universal stuff. May be you'd better create extension classes, then extend existing with methods?
Seems like the particular case for putting a coordinate system helper class out there is an argument for a new class, not an extension method package.
@EmptyKeys, does having a CoordinateSystemContext class where you can plug in naming values for Up, Down, Left, Right, et al seem like the way to enrich the framework. Perhaps System.Numerics.Geometry is an appropriate namespace location (but still within System.Numerics for packaging?)
On Tue, Nov 25, 2014 at 11:08 AM, Max [email protected] wrote:
Ah, OK, thank you for explanation, @EmptyKeys https://github.com/EmptyKeys , I've thought that it's the proposed change which NEEDS discussing, but it's just the pull-companion issue :).
Anyvay, I don't think that extending changes are nesessary in System.Numerics, it contains pretty base and universal stuff. May be you'd better create extension classes, then extend existing with methods?
— Reply to this email directly or view it on GitHub https://github.com/dotnet/corefx/issues/118#issuecomment-64423876.
Matrix4x4 already makes assumptions about handedness - several of the Create* methods (CreateOrthographic, CreateLookAt, CreatePerspectiveFieldOfView, etc.) assume right-handedness. So not adding Up, Down, etc., just because they make assumptions about handedness, doesn't make sense, because that's already the case.
Of course, whether these properties are useful additions, is a different matter. (I think they are, but I come from an XNA background, so I'm biased.)
Edit: I just saw the discussion in dotnet/corefx#119 where @mellinoe says:
We want to avoid forcing any particular opinion or interpretation into the data types. We want to keep these types "neutral", so to speak. "Up", "Right", "Forward" automatically force a handedness upon the user.
That makes sense, but these Create* methods on Matrix4x4 already force an opinion / interpretation.
Thanks for waiting, @terrajobst has just posted our API Review process proposal, feel free to comment over here: https://github.com/dotnet/corefx/issues/294.
@EmptyKeys If you are still interested in this, can you take a stab at writing up a speclet for all the new methods you are proposing? We can then start discussing the changes in earnest both on GitHub and eventually in an API review.
Before I close this, I'd like to echo what Matt said above. If you still feel strongly about this, then please open a new issue with a fleshed out speclet following our guidelines. And keep in mind the considerations around handedness, etc. above.