И всё-таки она Правая!
Aug. 26th, 2006 07:33http://blogs.msdn.com/xna/archive/2006/08/25/724607.aspx
Math
Our Math API provides the types often used for game programming such as Vector2, Vector3, Vector4, Matrix, Plane, and Ray. We also include bounding volume types including BoundingBox, BoundingSphere and BoundingFrustum. Our bounding volume types include methods for doing intersection and containment tests. One thing to note is that our math libraries are right-handed by default. What I mean by that is on our Matrix, for example, we provide a CreateLookAt method, which provides a right-handed view matrix instead of offering a CreateLookAtLH and a CreateLookAtRH. The reason we’ve decided on going with this is to ease integration in both content and middleware components. If everyone can agree on the coordinate system, then it makes it much easier to use content or APIs from outside of the XNA Framework. I say “by default” because there is nothing that requires a right-handed system. So if you absolutely need to be left-handed (or something else) you can do so, you’ll just need to do some of the calculations yourself.
Коллеги из Microsoft как-то неправильно (читай - не посоветовавшись с дядей Димой) назвали вектора, матрицы, плоскости, лучи и ббоксы. Впрочем, я надеюсь, что скоро кое-кто из наших проделает с ними необходимую разъяснительную работу.
Но несомненно другое.
Как и следовало ожидать, Единственно Правильной Координатной СистемойTM советского геймдева будет Правая Координатная Система (как в OpenGL), а вовсе не какая-то левая "Левая" (как у Шодана).
Ура, товарищи!
Точное направление осей, впрочем, пока неизвестно.
Оставайтесь с нами.
no subject
Date: Aug. 26th, 2006 08:52 (UTC)Во-вторых. Почему бы не предоставить разработчикам выбор? Хотя бы вот так в Microsoft-style
#ifdef RIGHT_HANDED
#define CreateLookAt CreateLookAtRH
#else
#define CreateLookAt CreateLookAtLH
#endif
и т.д.
no subject
Date: Aug. 26th, 2006 08:58 (UTC)no subject
Date: Aug. 26th, 2006 09:05 (UTC)no subject
Date: Aug. 26th, 2006 09:09 (UTC)в любом API интерфейс должен быть инвариантным.
no subject
Date: Aug. 26th, 2006 09:11 (UTC)#ifdef MICROSOFTISH_CONVENTION
typedef detail::brutal_vector<3,float> Vector3;
#elseif DDIMA_CONVENTION
typedef detail::brutal_vector<3,float> CVec3;
#elseif HLSL_STYLE
typedef detail::brutal_vector<3,float> float3;
#elseif GLSL_STYLE
typedef detail::brutal_vector<3,float> vec3;
#endif
и так во всём )
no subject
Date: Aug. 26th, 2006 09:11 (UTC)Поэтому настраивать будет реализацию.
То есть тех, кому не нравиццо CVec3 ;)
no subject
Date: Aug. 26th, 2006 09:14 (UTC)вектора суть матрицы столбцы или матрицы строки?
то есть row-major vs col-major!
+1
Date: Aug. 26th, 2006 09:20 (UTC)Ты хитрый!
Ты - первый, кто об этом спросил публично!
У тебя еще есть шанс повлиять на мажорность совецкого геймдева!
Дерзай!
Re: +1
Date: Aug. 26th, 2006 12:02 (UTC)Re: +1
Date: Aug. 26th, 2006 15:28 (UTC)Re: +1
Date: Aug. 26th, 2006 16:33 (UTC)no subject
Date: Aug. 26th, 2006 10:40 (UTC)no subject
Date: Aug. 26th, 2006 10:46 (UTC)no subject
Date: Aug. 26th, 2006 10:59 (UTC)no subject
Date: Aug. 26th, 2006 11:01 (UTC)no subject
Date: Aug. 26th, 2006 11:04 (UTC)no subject
Date: Aug. 26th, 2006 11:36 (UTC)no subject
Date: Aug. 26th, 2006 13:30 (UTC)no subject
Date: Aug. 26th, 2006 15:29 (UTC)no subject
Date: Aug. 27th, 2006 04:28 (UTC)no subject
Date: Aug. 26th, 2006 09:03 (UTC)И мы предоставим.
Вот такой, цитирую:
[...] There is nothing that requires a right-handed system.
So if you absolutely need to be left-handed (or something else) you can do so, you’ll just need to do some of the calculations yourself.
И вообще - если ты говоришь, что разницы нет никакой - и я с тобой согласен! - так зачем же ты так волнуешься? :)
no subject
Date: Aug. 26th, 2006 09:06 (UTC)но есть много людей, для которых разницо есть!
насчёт do some of the calculations yourself это не выбор. зачем делать лишние телодвижения, если от них можно избавиться?
хотя левостороняя система сакс. но это уже религиозно-идеологические соображения :)
no subject
Date: Aug. 26th, 2006 09:10 (UTC)Рассказывай за соображения уже!
А кроме людей, для которых разница есть и хочется "левого", в совецком геймдеве есть много неосвоенных земель. Там даже зарплаты чуть выше ;)
no subject
Date: Aug. 26th, 2006 09:12 (UTC)no subject
Date: Aug. 26th, 2006 09:15 (UTC)no subject
Date: Aug. 26th, 2006 09:22 (UTC)Поэтому и поставил в скобочках "(как в OpenGL)"! ;)
А сентиментальность и рефлексия - это иногда хорошо.
Если в разумных дозах.
И если не противоречит линии партии и правительства!
no subject
Date: Aug. 26th, 2006 19:44 (UTC)чуть
:)
no subject
Date: Aug. 26th, 2006 19:48 (UTC)no subject
Date: Aug. 26th, 2006 20:50 (UTC)