Help needed urgently guys!

The Partridge Family were neither partridges nor a family. Discuss.
S_Dass
Posts: 23
Joined: July 31st, 2012, 11:33 pm

Help needed urgently guys!

Post by S_Dass » August 13th, 2012, 1:23 pm

I've been awake for over 24hours trying to get this ray cast function to work and im nearly there so can someone please help me :) i've attached the source code file. the screen shot shows what output im getting compared with what i should be getting if anyone out there can please help me it would mean a lot to me i dont know where its going wrong but it must one of the calculations that is casuing the horrible output
Attachments
raycasting_textured.png
(290.42 KiB) Downloaded 97 times
ENGINE.CPP
(25.36 KiB) Downloaded 168 times

Craigspaz
Posts: 33
Joined: June 9th, 2012, 12:23 am

Re: Help needed urgently guys!

Post by Craigspaz » August 13th, 2012, 1:53 pm

Can you post all of your code it is hard to tell the problem from only one file.
CraigSpaz

S_Dass
Posts: 23
Joined: July 31st, 2012, 11:33 pm

Re: Help needed urgently guys!

Post by S_Dass » August 13th, 2012, 2:07 pm

ok mate here it is :)
Attachments
RayCast Wk 2.zip
(151.25 KiB) Downloaded 163 times

S_Dass
Posts: 23
Joined: July 31st, 2012, 11:33 pm

Re: Help needed urgently guys!

Post by S_Dass » August 13th, 2012, 2:18 pm

this file i just uploaded is a powerpoint presentation that i have been foloowing to solve this task it should help understand what i've been doing and where i have gone wrong
Attachments
RayCast.zip
(8.01 MiB) Downloaded 154 times

Craigspaz
Posts: 33
Joined: June 9th, 2012, 12:23 am

Re: Help needed urgently guys!

Post by Craigspaz » August 13th, 2012, 3:17 pm

I noticed a few things in your code the first thing is that in your DXHarness.cpp I can't find the file d3dx9.h. I think it should be d3d9.h. When running your code in debug mode then it says that your typcode and pNext variable could not be evaluated and so I think that the problem is somewhere in your texture code. You should take another look at it.
CraigSpaz

S_Dass
Posts: 23
Joined: July 31st, 2012, 11:33 pm

Re: Help needed urgently guys!

Post by S_Dass » August 13th, 2012, 3:27 pm

Hi CraigSpaz
both #include <d3d9.h>
#include <d3dX9.h> are in the DXHarness.cpp file you need to make that you have the sdk installed on your PC and included in the project

S_Dass
Posts: 23
Joined: July 31st, 2012, 11:33 pm

Re: Help needed urgently guys!

Post by S_Dass » August 13th, 2012, 3:33 pm

to include the sdk library in the project you need to go on project properties. I recomend downloading the june 2010 sdk. once this is done go onto project properties (or RayCast properties after selecting the project tab on the toolbar) once a menu appears click on configuration properties drop down menu and click on the C/C++ drop down menu, after that click on general and there will be a menu of options, one called AdditionalIncludeDirectories. Click on this and browse for the sdk folder downloaded and that will get rid of #include <d3dX9.h> error

Craigspaz
Posts: 33
Joined: June 9th, 2012, 12:23 am

Re: Help needed urgently guys!

Post by Craigspaz » August 13th, 2012, 3:43 pm

Thanks
CraigSpaz

Craigspaz
Posts: 33
Joined: June 9th, 2012, 12:23 am

Re: Help needed urgently guys!

Post by Craigspaz » August 13th, 2012, 4:58 pm

Did you copy the code from somewhere of did you write this yourself?
CraigSpaz

S_Dass
Posts: 23
Joined: July 31st, 2012, 11:33 pm

Re: Help needed urgently guys!

Post by S_Dass » August 13th, 2012, 5:12 pm

I only wrote the code that is commented with the steps in the void view::RayCast so steps 1 to 7 everything else was provided for me

Post Reply