aruslan: (Default)
[personal profile] aruslan

http://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 CreateLookAtRHThe 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), а вовсе не какая-то левая "Левая" (как у Шодана).

Ура, товарищи!

Точное направление осей, впрочем, пока неизвестно. 
Оставайтесь с нами.

Date: Aug. 26th, 2006 09:05 (UTC)
From: [identity profile] aruslan.livejournal.com
Ну, цитирую опять:

#ifdef MICROSOFTISH_CONVENTION
  typedef detail::brutal_vector<3,float> Vector3;
#else
  typedef detail::brutal_vector<3,float> CVec3;
#endif

Date: Aug. 26th, 2006 09:09 (UTC)
From: [identity profile] cyberzx.livejournal.com
одно дело настройка реализации, другое - настройка интерфейса
в любом API интерфейс должен быть инвариантным.

Date: Aug. 26th, 2006 09:11 (UTC)
From: [identity profile] cyberzx.livejournal.com
тогда уж лучше сделать так

#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

и так во всём )

Date: Aug. 26th, 2006 09:11 (UTC)
From: [identity profile] aruslan.livejournal.com
Вот и дядя Дима с этим согласен.
Поэтому настраивать будет реализацию.
То есть тех, кому не нравиццо CVec3 ;)

Date: Aug. 26th, 2006 09:14 (UTC)
From: [identity profile] cyberzx.livejournal.com
кстати, есть более важный вопрос.
вектора суть матрицы столбцы или матрицы строки?
то есть row-major vs col-major!

+1

Date: Aug. 26th, 2006 09:20 (UTC)
From: [identity profile] aruslan.livejournal.com
Ха!
Ты хитрый!

Ты - первый, кто об этом спросил публично!
У тебя еще есть шанс повлиять на мажорность совецкого геймдева!
Дерзай!

Re: +1

Date: Aug. 26th, 2006 12:02 (UTC)
From: [identity profile] http://users.livejournal.com/_winnie/
afaik, матрицы как float* везде одинаковые, и в первой любви, и на работе.

Re: +1

Date: Aug. 26th, 2006 15:28 (UTC)
From: [identity profile] aruslan.livejournal.com
Матрицы - да, а вот порядок умножений - нет ;)

Re: +1

Date: Aug. 26th, 2006 16:33 (UTC)
From: [identity profile] http://users.livejournal.com/_winnie/
Подумаешь, справа/налево. Я всегда путаю право и лево. Это просто запись.

Date: Aug. 26th, 2006 10:40 (UTC)
From: [identity profile] sergey-shandar.livejournal.com
смотри, как бы опция настройки не вызвала через некоторое время критику в духе - "я только за чистые компоненты"

Date: Aug. 26th, 2006 10:46 (UTC)
From: [identity profile] aruslan.livejournal.com
Еще никогда не слышал критики из тех мест, куда увезут всех ненастроенных.

Date: Aug. 26th, 2006 10:59 (UTC)
From: [identity profile] sergey-shandar.livejournal.com
не слышал - не значит что ее нет :-)

Date: Aug. 26th, 2006 11:01 (UTC)
From: [identity profile] aruslan.livejournal.com
Кого волнуют неудачники? ;)

Date: Aug. 26th, 2006 11:04 (UTC)
From: [identity profile] sergey-shandar.livejournal.com
никого, до тех пор пока они не делают 1917 год

Date: Aug. 26th, 2006 11:36 (UTC)
From: [identity profile] aruslan.livejournal.com
кажется, я начинаю понимать, почему ты уехал на отдельный континент, а меня тянет в Англию.

Date: Aug. 26th, 2006 13:30 (UTC)
From: [identity profile] sergey-shandar.livejournal.com
поясни :-) а то я человек простой

Date: Aug. 26th, 2006 15:29 (UTC)
From: [identity profile] aruslan.livejournal.com
Ну, лучше быть подальше от эпицентра, когда неудачники будут тренироваться в 1917 году.

Date: Aug. 27th, 2006 04:28 (UTC)
From: [identity profile] sergey-shandar.livejournal.com
Думаешь в Англии неудачников мало?

Profile

aruslan: (Default)
aruslan

January 2014

S M T W T F S
   1234
56789 1011
12131415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 17th, 2026 05:19
Powered by Dreamwidth Studios