Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Visual Computing (Graphics and Gaming)
- Developing Games & Graphics on Intel
- Matrix Math Help - D3DXMatrixLookAtLH

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

stephen-smolley

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-22-2010
09:29 AM

56 Views

Matrix Math Help - D3DXMatrixLookAtLH

Hey there,

I needed some help, please. I need a matrix formula that returns the inverse of what D3DXMatrixLookAtLH normally would.

The inverse of this matrix can be used to transform objects to vEyePt and orient them along vLookAt and vUp if the inverse is used. However, using D3DXMatrixInverse is slow.

Here is the formula MSDN defines for D3DXMatrixLookAtLH.

zaxis = normal(At - Eye)

xaxis = normal(cross(Up, zaxis))

yaxis = cross(zaxis, xaxis)

xaxis.x yaxis.x zaxis.x 0

xaxis.y yaxis.y zaxis.y 0

xaxis.z yaxis.z zaxis.z 0

-dot(xaxis, eye) -dot(yaxis, eye) -dot(zaxis, eye) 1

Thanks in advance!

-Steve

Link Copied

1 Reply

stephen-smolley

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-22-2010
10:17 AM

56 Views

Inverse of D3DXMatrixLookAtLH:

zaxis = normal(At - Eye)

xaxis = normal(cross(Up, zaxis))

yaxis = cross(zaxis, xaxis)

xaxis.x xaxis.y xaxis.z 0

yaxis.x yaxis.y yaxis.z 0

zaxis.x zaxis.y zaxis.z 0

eye.x, eye.y, eye.z, 1

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.