matrix4::buildProjectionMatrixPerspectiveFovLH

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
neojzs

matrix4::buildProjectionMatrixPerspectiveFovLH

Post 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..
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post 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?
Kjac
Posts: 1
Joined: Tue Jul 06, 2004 6:30 pm

Post by Kjac »

hey.

First post and already complaing :P , 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

Code: Select all

2*zNear/h"
and

Code: Select all

2*zNear/w
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.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

ok :)
Post Reply