Questions tagged [directxmath]

The DirectXMath API provides SIMD-friendly C++ types and functions for common linear algebra and graphics math operations common to DirectX applications.

The DirectXMath API provides SIMD-friendly C++ types and functions for common linear algebra and graphics math operations common to DirectX applications. The library provides optimized versions for Windows 32-bit (x86), Windows 64-bit (x64), Windows RT, and Windows Mobile through SSE and ARM-NEON intrinsics support in the Visual C++ compiler.

Source: MSDN

DirectXMath is also hosted on GitHub

57 questions
0
votes
1 answer

Projection matrix transformation 'wrapping around'

I'm writing some code that has to transform a number of vertex coordinates to clip/projection space on the CPU (to integrate with an existing application; shaders are not an option here as the application provides its own shaders at a later point),…
user223967
0
votes
2 answers

binary '-' : 'DirectX::XMVECTOR' does not define this operator or a conversion (migrating from xnamath to DirectXMath is not so easy)

I have some DirectX C++ code that uses xnamath.h. I wanted to migrate to "brand new" DirectXMath, so I've changed: #include to #include I have also added DirectX namespace, e.g.: DirectX::XMFLOAT3 vector; I was ready…
PolGraphic
  • 3,233
  • 11
  • 51
  • 108
0
votes
1 answer

Unresolved symbols from d3dx10math.h after moving from DX10 to DX11

I have updated my DirectX 10 project to DirectX 11 (using DirectX SDK) and suddenly it fails at linker stage because all methods from d3dx10math header, like D3DXMatrixMultiply() or D3DXVec3TransformCoord(), became unresolved symbols. Some of them…
jaho
  • 4,852
  • 6
  • 40
  • 66
0
votes
1 answer

Use XMVECTOR as a class member

I know XMVECTOR has to be 16-byte-aligned and therefore shouldn't be a member of a class (unless I ensure the alignment). However, can I do sth like this? class A { public: XMVECTOR vect; }; void fun(void) { A a; XMVECTOR localVect…
NPS
  • 6,003
  • 11
  • 53
  • 90
0
votes
0 answers

Can I use memcpy() with XMMATRIX?

I.e. can I do this: XMMATRIX dxMat; Matrix myMat; std::memcpy(&myMat, &dxMat, sizeof(XMMATRIX)); std::memcpy(&dxMat, &myMat, sizeof(XMMATRIX)); Matrix is my own class which contains 16 contiguous float variables. Also can I do the same with my…
NPS
  • 6,003
  • 11
  • 53
  • 90
0
votes
1 answer

Can't properly produce a ViewProjection matrix

I have a camera class that uses the DirectXMath API: __declspec(align(16)) class Camera { public: XMVECTOR Translation; XMMATRIX Rotation; XMVECTOR Scale; XMMATRIX Transform; XMFLOAT3 RotAngles; …
ulak blade
  • 2,515
  • 5
  • 37
  • 81
0
votes
1 answer

DirectXCollision - any way of getting more information about intersection?

I've been doing a simple 3D rigid body simulator and I've come at a point where I need to handle collisions between objects. So far using the new DirectXMath alongside DirectXTK's SimpleMath has been an immense help. I've been using the BoundingBox…
Valentin
  • 1,731
  • 2
  • 19
  • 29
0
votes
2 answers

Optimizing a scanline conversion function for ARM

The code below converts a row from an 8-Bit paletized format to 32-RGBA. Before I trying to implement it, I would like to know if the code below is even suited for being optimized with Direct-Math or alternatively ARM Neon intrinsics or inline…
Oliver Weichhold
  • 10,259
  • 5
  • 45
  • 87
0
votes
2 answers

How to dump XMMATRIX member value?

Is there a any good way to dump XMMATRIX and XMVECTOR ? XMMATRIX mx = XMMatrixScaling(...) * XMMatrixTranslation(...); DumpMatrix(mx); // printf the 4x4 matrix member I want DumpMatrix like function. I checked DirectMath.h. And found typedef…
user2170124
  • 105
  • 2
  • 8
0
votes
1 answer

component-wise multiplication for 3d vectors in windows store app programming

How to do component-wise multiplication of two 3d vector? it seems MS didn't provide such functions in DirectXMath.h, what's Microsoft doing there? in the old SDKs(DX 10/9), I can make a product of two vectors directly as: v3 = v1 * v2; or multiply…
zdd
  • 8,258
  • 8
  • 46
  • 75
-1
votes
2 answers

XMVECTOR in DirectX

Sorry for the dumb question .... but why this does not work ? To show the problem I wrote this simple code: #include #include #include #include using namespace std; using namespace…
cppstudent
  • 23
  • 4
-2
votes
1 answer

No Operator = Matches Operands - DX11

I'm trying to multiply two sets of values together in DX11. void Update() { rot += 0.0005f; if (rot > 6.26f) rot = 0.0f; cube1 = XMMatrixIdentity(); XMVECTOR rotaxis = XMVectorSet(0.0f, 1.0f, 0.0f, 0.0f); Rotation =…
George_H
  • 93
  • 2
  • 14
1 2 3
4