Page 1 of 1
matrix4::buildProjectionMatrixPerspectiveFovLH
Posted: Tue Jun 08, 2004 4:06 pm
by neojzs
(*this)(0,0) = 2*zNear/w;
(*this)(1,0) = 0;
(*this)(2,0) = 0;
(*this)(3,0) = 0;
(*this)(0,1) = 0;
(*this)(1,1) = 2*zNear/h;
(*this)(2,1) = 0;
(*this)(3,1) = 0;
to
(*this)(0,0) = w;
(*this)(1,0) = 0;
(*this)(2,0) = 0;
(*this)(3,0) = 0;
(*this)(0,1) = 0;
(*this)(1,1) = h;
(*this)(2,1) = 0;
(*this)(3,1) = 0;
refer to D3DXMatrixPerspectiveFovLH..
Posted: Thu Jun 10, 2004 8:00 am
by niko
In the documentation of D3D8 (directx8_c.chm::/directx_cpp/Graphics/Reference/CPP/D3DX/Functions/Math/D3DXMatrixPerspectiveFovLH.htm) its described just as in the file, where do you read the code you wrote?
Posted: Fri Jul 09, 2004 2:29 pm
by Kjac
hey.
First post and already complaing
, no I really like IrrLicht alot.
It's in matrix4::buildProjectionMatrixPerspectiveFovLH and RH in the include\matrix4.h.
according to the Direct X 9 SDK the
and
should be replaced with "w" and "h"
In another post
neojzs mentions the aspect ratio error in CCameraSceneNode.ccp.
Code: Select all
video::IVideoDriver* d = mgr->getVideoDriver();
if (d)
{
screenDim.Width = (f32)d->getScreenSize().Width;
screenDim.Height = (f32)d->getScreenSize().Height;
aspect = screenDim.Height / screenDim.Width;
}
should be
Code: Select all
video::IVideoDriver* d = mgr->getVideoDriver();
if (d)
{
screenDim.Width = (f32)d->getScreenSize().Width;
screenDim.Height = (f32)d->getScreenSize().Height;
aspect = screenDim.Width / screenDim.Height;
}
Edited:
Cheers Kim.
Posted: Mon Jul 12, 2004 6:37 pm
by niko
ok