View unanswered posts | View active topics It is currently Sat Dec 07, 2019 12:16 am



Reply to topic  [ 6 posts ] 
 Space Partitionning using Octree 
Author Message
Site Admin

Joined: Sun Jan 03, 2010 4:27 pm
Posts: 390
 Space Partitionning using Octree
GLC_lib 2.0 will use space partitionning with Octree.
Just a ScreenShot of the visualisation of the octree of a man
Image


Tue Feb 09, 2010 10:23 pm
Profile

Joined: Tue Apr 06, 2010 10:29 am
Posts: 8
Post Re: Space Partitionning using Octree
Hi again,

I am interrested in this feature, any idea on when it will be available ?

Thanks,
Yohann


Fri Apr 09, 2010 11:06 am
Profile
Site Admin

Joined: Sun Jan 03, 2010 4:27 pm
Posts: 390
Post Re: Space Partitionning using Octree
Hi yohann.
It's already available in the development version of GLC_lib and GLC_player. Normally, development version are always compilable. :)
It will be avaliable in the next Alpha version off GLC_lib : Before the end of this month.
And I plan to finish GLC_lib 2.0 on June 2010.


Fri Apr 09, 2010 8:32 pm
Profile

Joined: Tue Apr 06, 2010 10:29 am
Posts: 8
Post Re: Space Partitionning using Octree
Hi,

I have recompiled the latest sources and have been able to draw the partitionning as in your screenshot.
One more question, is there a way to get all objects (GLC_3DViewInstance) in a boundingBox (or an octree node) ?

Thanks a lot.
Yohann


Mon Apr 12, 2010 12:17 pm
Profile
Site Admin

Joined: Sun Jan 03, 2010 4:27 pm
Posts: 390
Post Re: Space Partitionning using Octree
Hi
yohann wrote:
is there a way to get all objects (GLC_3DViewInstance) in a boundingBox (or an octree node) ?


Not before your very good question. But if you get the latest tarBall of GLC_lib you can now do it like this :
Add this code in the method OpenglView::select of GLC_Player : OpenglView.cpp line 984 :
Code:
      if (!m_World.collection()->isSelected(SelectionID))
      {
         m_World.collection()->select(SelectionID, false);
         // Code to add
         if (spacePartitioningIsUsed)
         {

            GLC_BoundingBox objectBox(m_World.collection()->instanceHandle(SelectionID)->boundingBox());
            QList<GLC_3DViewInstance*> list= m_World.collection()->spacePartitioningHandle()->listOfIntersectedInstances(objectBox);
            const int size= list.size();
            qDebug() << "Number of intersected instances = " << size - 1;
            for (int i= 0; i < size; ++i)
            {
               if (list.at(i)->id() != SelectionID)
               {
                  qDebug() << "Id= " << list.at(i)->id() << "  Name= " << list.at(i)->name();
               }
            }
         }
         // Code to add
         updateGL();
         emit updateSelection(m_World.collection()->selection());
      }


Thanks for the idea.
@+


Mon Apr 12, 2010 6:24 pm
Profile
Site Admin

Joined: Sun Jan 03, 2010 4:27 pm
Posts: 390
Post Re: Space Partitionning using Octree
New Screen Shoot of space partitioning of instances of snow speeder :
Attachment:
Octree.JPG
Octree.JPG [ 81.52 KiB | Viewed 9996 times ]


Fri Apr 30, 2010 9:22 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.