Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

supagu

culling issues.... transform frustrum points

This topic is 5205 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

okay im using OGL and my own matrix class.... what i do is extract the 8 points from the frustum, and i want to transform them to worls space.... this is what i do:
	//set world matrix also

	glLoadIdentity();
	LookAt();
	//glTranslatef( position[X], position[Y], position[Z] );

	world.LoadCurrent();
	world = world * projection;

	//Matrix4 rot;

	//rot.RotateY( DtoR(-45) );

	//world = world * rot;

	world.Transpose();


and transform like this:
   
BOUNDS Camera::GetTransformedBounds()
{
	BOUNDS worldBounds;
	
	for( int i = 0 ; i < 8; ++i )
	{
		worldBounds.points[i] = world * frustum.points[i];
	}

	return worldBounds;
}
seems as if the transformation is only working with rotations, leaving the positions/transform out of the multiplication some how :-/ ie. seems as if my frustrum for culling is always situated at 0,0,0 any ideas if this is the troublesome code? [edited by - supagu on March 20, 2004 11:41:34 PM]

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!