Modify matWorldViewProj

Posted By: Puppeteer

Modify matWorldViewProj - 08/29/10 10:18

I am currently working on wii VR headtracking and in order to simulate it correctly i have to mutiply the projection matrix with an additional matrix i created in order to create the final projection matrix.

But i have no idea how to do it or if that is even possible.
Has anyone any hints ideas or does even now a solution?

Thanks
Posted By: Henning

Re: Modify matWorldViewProj - 09/01/10 08:46

Hello Puppeteer,

it is possible, but the number of columns of the left matrix need to be the same than the number of rows at the right one. Or you can use
mat_multiply(float* matrix1,float* matrix2).

look here:
http://de.wikipedia.org/wiki/Matrix_%28Mathematik%29#Matrizenmultiplikation (german)

or here:
http://en.wikipedia.org/wiki/Matrix_%28mathematics%29#Matrix_multiplication.2C_linear_equations_and_linear_transformations
(english)
Posted By: Puppeteer

Re: Modify matWorldViewProj - 09/01/10 22:15

Thank you.
My question more directed into "how do i access the projection matrix?" because the only method i could think of before was using a shader. But i already found a better solution:
Use a material for the view with an event that modifies the matProj with the help of the functions inluded with the d3d9.h and set the material flag ENABLE_RENDER
The event will be called right after the matrices are calculated so i can change them.

[Problem solved]
© 2024 lite-C Forums