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

  • SEARCH
  • Home
  • 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 7898457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:26:19+00:00 2026-06-03T08:26:19+00:00

Im currently implementing an Octree for my bachelor thesis project. My Octree takes a

  • 0

Im currently implementing an Octree for my bachelor thesis project.
My Octree takes a std::vector as argument:

octree::Octree::Octree(std::vector<const D3DXVECTOR3*> vec) : 
    m_vertices(std::vector<D3DXVECTOR3*>()),
    m_size(m_vertices.size())
{
    int i=0;
    for(;i<m_size;++i) {
        m_vertices.push_back(new D3DXVECTOR3(*vec.at(i)));
    }
}

Im asking for what is typically used to store the vertices in before rendering them and making any culling test etc to them.

I kept this very simple for now, all i have is a function that renders a grid. Some snippets:

#define GRIDFVF (D3DFVF_XYZ | D3DFVF_DIFFUSE)

struct GridVertex {
    D3DXVECTOR3 position; 
    DWORD color;
};


g_dev->SetTransform(D3DTS_WORLD, &matIdentity);
g_dev->SetStreamSource(0, g_buffer, 0, sizeof(GridVertex));
g_dev->SetTexture(0, NULL);
g_dev->DrawPrimitive(D3DPT_LINELIST, 0, GridSize * 4 + 2);

Now when rendering this i use my custom struct GridVertex, thats saves a D3DXVECTOR9 for pos and a DWORD for the color value and the tell the GPU by setting the flexible vertex format to GRIDFVF.
But in my Octree i only want to store the positions to perform the test if certain vertices are inside nodes within my Octree and so on. Therefore I thought of creating another class called SceneManager and storing all values within an std::vector and finally pass it to my Octree class, that does the test and afterwards pass the checked vertices to the GPU.
Would this be a solid solution or whats common to implement something like this?
Thanks in advance

  • 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-06-03T08:26:21+00:00Added an answer on June 3, 2026 at 8:26 am

    Generally, one does not put the actual render geometry vertices themselves in the octree or whatever spatial partitioning structure one uses. That level of granularity is not useful, because if a set of vertices that make up a model spans partition nodes such that some subset of those vertices would be culled, you couldn’t properly draw the model.

    What you’d typically want to do is have an object representing an entity and its bounds within the world (axis-oriented bounding boxes, or bounding spheres, are simple and efficient bounding volumes, for example). Each entity is also associated with (or can be associated with by some other subsystem) rendering geometry. The entities themselves are sorted within the octree.

    Then, you use your octree to determine which entities are visible, and submit all of their associated render geometry to the card.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently implementing some custom exceptions in a project and can't decide wither to
Im currently implementing a simple Logger for a project due my studies in C++.
I'm currently implementing a project using asp.net, c# and the MVP (Model-View-Presenter) pattern. The
I am currently implementing a push notification feature on my project. I managed to
Im currently implementing an update feature into an app that I'm building. It uses
I'm currently implementing a custom MultiPageEditorPart where I want to have multiple pages when
I'm currently implementing Highcharts to create graphs in my RAILS application. I'm using the
I'm currently implementing functionality in Tridion 2009 SP1 where the user is able to
I'm currently implementing a feature to micropost posting where a user can link to
** I am currently implementing fancy URLs to see if these 'solves' this. eg

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.