Commit 33a8ae00 authored by paps's avatar paps
Browse files

No commit message

No commit message
parent dd9fdbec
Loading
Loading
Loading
Loading
+6 −13
Original line number Diff line number Diff line
/**
 * @brief OBJET : represente un octree pour la structure acceleratrice
 * @file LrOctree.h
 * @file LrBinder.h
 * @date Lundi 10 Mars 2008
 * @note 
 * @author Josselin Francois
@@ -19,19 +19,19 @@
#include "LrBinder.h"

LrBinder::LrBinder()
: m_liste_objets(), m_globalOctree(NULL)
: m_liste_objets()
{

}

LrBinder::LrBinder(const LrBinder & source)
:  m_liste_objets(source.m_liste_objets), m_globalOctree(source.m_globalOctree)
:  m_liste_objets(source.m_liste_objets)
{

}

LrBinder::LrBinder(LISTE_OBJETS l, LrVector pos_init, LrVector &taille)
: m_liste_objets(l), m_globalOctree(new LrOctree(NULL, pos_init, taille.getNorme()))
LrBinder::LrBinder(LISTE_OBJETS l)
: m_liste_objets(l)
{

} 
@@ -46,10 +46,3 @@ void LrBinder::initBinder()

} 
void LrBinder::createSubdiv(LrOctree &oct, Real taille)
{
    for(int i=0; i < 8; i++)
    {
        oct.addOctree(new LrOctree(*this,  
    }
}
+9 −8
Original line number Diff line number Diff line
/**
 * @brief OBJET : represente la structure acceleratrice
 * @file LrOctree.h
 * @file LrBinder.h
 * @date Lundi 10 Mars 2008
 * @note 
 * @author Josselin Francois
@@ -17,7 +17,7 @@

#include "LrOctree.h"
#include "LrVecteur.h"
#include "LrObject.h"
#include "LrEntity.h"

#define MAX_DIV 4

@@ -25,19 +25,20 @@ class LrBinder
{
    private :

        LISTE_OBJETS m_liste_objets;//la liste d'objet
        LrOctree *m_globalOctree; //un pointer sur la boite englobante principale
        ListObject m_liste_objets;//la liste d'objet
        

    public :
            typedef list<LrObject *> LISTE_OBJETS;
            typedef list<LrEntity *> ListObject;

            LrBinder();
            LrBinder(const LrBinder & source);
            LrBinder(LISTE_OBJETS l, LrVector pos_init, LrVector &taille);
            LrBinder(ListObject l);
            
            virtual ~LrBinder();
            virtual ~LrBinder() = 0;

            void initBinder(int subdivision);//creation de la structure accélatrice type Grille reguliere
            void initBinder();//creation de la structure accélatrice type Grille reguliere
            virtual bool getIntersection(LrRay &ray, LrHit & hit);
};
#endif
            
 No newline at end of file

LrBinderOct.cpp

0 → 100644
+1 −0
Original line number Diff line number Diff line
 

LrBinderOct.h

0 → 100644
+40 −0
Original line number Diff line number Diff line
/**
 * @brief OBJET : represente la structure acceleratrice
 * @file LrBinderOct.h
 * @date Lundi 10 Mars 2008
 * @note 
 * @author Josselin Francois
 * @author Michael Nauge
 * @author Axel Richard
 * @author Hervé Souchaud
 * @author Emeric Verschuur
 * 
 * Ce fichier contient la classe qui gère la creation d'une structure acceleratrice pour la gestion des objets 3D
 */ 

#ifndef LRBINDEROCT_H
#define LRBINDEROCT_H

#include "LrBinder.h"
#include "LrVecteur.h"



class LrBinderOct : public LrBinder
{
    private :

            LrOctree *m_globalOctree; //un pointer sur la boite englobante principale

    public :

            LrBinderOct();
            LrBinderOct(const LrBinderOct & source);
            LrBinderOct(ListObject l, LrVector pos_init, LrVector &taille);
 
            virtual ~LrBinderOct() = 0;

            virtual void createSubdiv(LrOctree &oct, Real taille);
            virtual bool getIntersection(LrRay &ray, LrHit & hit);
};
#endif

LrBinderOctR.cpp

0 → 100644
+1 −0
Original line number Diff line number Diff line
Loading