Матрица Представления XNA - Поиск объяснения

Вот другая интерпретация Вашего вопроса (подсказка: это неопределенно). Возможно, что Вы ищете что-то вроде этого:

def parseIntOrFloat( aString ):
    return eval( aString )

Это работает как это...

>>> parseIntOrFloat("545.2222")
545.22220000000004
>>> parseIntOrFloat("545")
545
<час>

Теоретически, существует инжекционная уязвимость. Строка могла, например, быть "import os; os.abort()". Без любого фона на том, куда строка прибывает из, однако, возможность является теоретическим предположением. Так как вопрос неопределенен, нисколько не ясно, существует ли эта уязвимость на самом деле или нет.

6
задан Skurmedel 20 August 2009 в 22:26
поделиться

3 ответа

The view matrix is transforming the scene into view space. In view space the virtual camera is at the origin and is looking in the positive z-direction. There are different ways to achieve this, but most commonly the view matrix consists of a translation and three rotations around each axis.

Transform = Translate * RotationZ * RotationY * RotationX

5
ответ дан 8 December 2019 в 02:53
поделиться

составление двух отражений дает одно вращение, если я помню моя геометрия правильно.

1
ответ дан 8 December 2019 в 02:53
поделиться

There are three types of transforms you need to understand: world, view and projection.

The world transform changes your models coordinates from model space into world space. When you define the vertices of a model, you define them relative to the origin of that model. The world transform transforms those vertices so they are relative to an origin shared by all objects in the scene, i.e. world space.

The view transform then transforms these vertices into view space. The viewer/camera has a position and orientation in view space, and this is used to create the view matrix which you apply to all objects in the scene. In view space the viewer/camera is at the origin, so the view matrix translates and rotates all objects to place them in view space.

Finally the projection transform determines what type of "lens" the camera uses. So far we've only translated and rotated objects, there's no sense of scale or perspective. The projection transform creates a viewing frustum and transforms vertices into this viewport.

Now for your question. You reflect the coordinate system about the x-axis, then the z-axis and finally you translate it. This happens to yield the same result as the lookat matrix because the position is on the xz- and yz-plane, but notice what happens if you move the position one unit up the y-axis. Then the two matricies will not be equal

22
ответ дан 8 December 2019 в 02:53
поделиться
Другие вопросы по тегам:

Похожие вопросы: