Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6046879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:17:23+00:00 2026-05-23T07:17:23+00:00

I am having trouble getting correct frustum culling to work. I got a great

  • 0

I am having trouble getting correct frustum culling to work. I got a great suggestion from someone about AABB point testing and it works great but I have gotten to the point where a max and a min point testing do not always work because often they won’t be in the frustum but a plane from one of the sides will be. So I need to move onto full bounding box detection. I already have the code which checks the bounding box against the planes of the frustum, just need to set up the bounding box.

Does anyone have a code example or an idea about how to do this. My two points I have with which to create my bounding box are a minimum x y and z and a maximum x y and z.

Thank you! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:17:24+00:00Added an answer on May 23, 2026 at 7:17 am

    You need to have the planes of the frustrum looking inside (their normals must point to the center). Then the rendering discard can be done by checking if the object is completelly outside of one of any of the six planes of the frustrum. You can do that with a sphere or with a AABB, or any other container where you can calculate the distance (and the side) to the plane.

    From my own plane code (so if any plane return -1 discard the rendering), I added some comments so it is easier to understand:

        int Side(const Sphere &e) const {
            float d=Distance(e.center);
            if(d-e.radius>Epsilon) return 1; // inside
            if(d+e.radius<-Epsilon) return -1; // outside
            return 0; // crossing the plane
        }
    
        int Side(const Vector3f &v) const { 
            float d=Distance(v);
            if(d>Epsilon) return 1;
            if(d<-Epsilon) return -1;
            return 0;
        }
    
    
        int Side(const Box3f &c) const {
            Vector3f a,b;
            if(Normal.x>=0.0)  { a.x=c.min.x; b.x=c.max.x; }
                else { b.x=c.min.x; a.x=c.max.x; }
            if(Normal.y>=0.0)  { a.y=c.min.y; b.y=c.max.y; }
                else { b.y=c.min.y; a.y=c.max.y; }
            if(Normal.z>=0.0)  { a.z=c.min.z; b.z=c.max.z; }
                else { b.z=c.min.z; a.z=c.max.z; }
    
            int l1 = Side(a), l2= Side(b);
    
            if(l1==l2) return l1; // both in the same side
            return 0; // we have the object crossing the plane
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble getting a rotary encoder to work properly with AVR micro controllers.
I'm having trouble getting the following to work in SQL Server 2k, but it
Having trouble getting the correct bounds for my iPad application when launching it in
I'm having trouble getting the correct query (oracle) for what I'm looking for. Essentially
I'm having trouble getting the correct signature of filetree. I receive a closure in
I'm having trouble getting my ASPX-App to work on the productive server. As my
I am learning python and am having trouble getting this program to work correctly.
I'm having trouble getting the correct results in my query. I'm using Mysql and
I'm using jQuery 1.3.2. I'm having trouble getting a correct height in Internet Explorer
I am having trouble getting the managed sig correct for this COM interface any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.