Handedness of Matrix4x4 camera methods
Asked Answered
M

1

6

.NET framework 4.6 instroduced new classes in System.Numerics namespace including Matrix4x4. It also introduced new static helper methods for 3D computer graphics like CreateLookAt or CreatePerspectiveFieldOfView.

Since DirectX and OpenGL differ in "handedness" (DirectX uses lef-handed coordinates while OpenGL right-handed coordinates), usually such APIs are available in both versions and annotated with either RH or LH to prevent confusion. That is not the case with System.Numerics, where we have only one version of each method.

My question is, what is the handedness of new System.Numerics methods?

Modred answered 1/8, 2015 at 17:46 Comment(2)
The native coordinate system in OpenGL is actually left-handed. Most people choose to specify their geometry in a right-handed system, and use a perspective matrix that flips the handedness.Consultation
@RetoKoradi Agreed. In the age of shaders and decline of fixed function pipeline you can do both LH in RH in DirectX and OpenGL. It's just that most tutorials/articles on the web use LH in DirectX and RH in OpenGL, so it's easier to go with it if you are learning 3D graphics.Modred
M
5

Strangely enough, all methods are using right-handed coordinates, contrary to Microsoft's own DirectX.

Modred answered 1/8, 2015 at 17:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.