You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Dr.Fred
Post
by Dr.Fred » Tue Oct 14, 2003 8:44 pm
Everytime I call this funktion:
Code: Select all
int PortalSceneNode::cullBoxAgainsView (const core::aabbox3d<f32>& box, const scene::SViewFrustrum* View)
{
bool clipped = false;
for (s32 i=0; i<6; ++i)
switch(box.classifyPlaneRelation(View->planes[i]))
{
case core::ISREL3D_FRONT:
return 0; //compleatly outside
case core::ISREL3D_CLIPPED:
return 2; //partly inside
}
return 1; //compleatly inside
}
I get a AccessViolantion, after the "classifyPlaneRelation" call.
Guest
Post
by Guest » Tue Oct 14, 2003 8:49 pm
Ohh, I forgot to enter the rest of the title.
niko
Site Admin
Posts: 1759 Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:
Post
by niko » Wed Oct 15, 2003 1:43 pm
maybe View is null?
Dr.Fred
Post
by Dr.Fred » Wed Oct 15, 2003 5:13 pm
nope
Saalen
Posts: 51 Joined: Thu Sep 04, 2003 7:49 am
Location: Germany
Contact:
Post
by Saalen » Wed Oct 15, 2003 6:38 pm
What about planes? This smells like a pointer messed up.
Guest
Post
by Guest » Sun Oct 19, 2003 2:51 pm
++i or i++?
Dr. Fred
Post
by Dr. Fred » Mon Oct 20, 2003 2:44 pm
@guest
it's the same
@Saalen
I think that is ok.
hearsedriver
Posts: 81 Joined: Fri Aug 22, 2003 12:06 pm
Location: Germany
Contact:
Post
by hearsedriver » Mon Oct 20, 2003 3:17 pm
Dr. Fred wrote: @guest
it's the same
No, it's not. But I don't want to do nitpicking here.
Cheers.
saigumi
Posts: 921 Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:
Post
by saigumi » Mon Oct 20, 2003 4:14 pm
Is View->planes[] a 0 or 1 based array?
If your compiler doesn't allow breakpoints and debugging, try adding output statements to figure out where and on what loop iteration exactly it is blowing up.
To me, it seems like what Saalen stated, a pointer problem of trying to access an element in the array that doesn't exist.
Crud, how do I do this again?