Subversion Repositories gelsvn

Rev

Rev 291 | Rev 324 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef __BOUNDINGINODE_H
#define __BOUNDINGINODE_H

#include "BoundingNode.h"

namespace Geometry
{

/** Interior node of bounding box tree. Contains
                pointers to left and right tree. */
template<class BoxType>
class BoundingINode: public BoundingNode<BoxType>
{
        BoundingNode<BoxType>* left;
        BoundingNode<BoxType>* right;
 public:

        BoundingINode(const BoxType& box,
                                                                BoundingNode<BoxType>* _left,
                                                                BoundingNode<BoxType>* _right): 
                BoundingNode<BoxType>(box), left(_left), right(_right) {}

        ~BoundingINode() {delete left; delete right;}

        bool intersect(const CGLA::Vec3f&,const CGLA::Vec3f&,float&) const; 
        int intersect_cnt(const CGLA::Vec3f&,const CGLA::Vec3f&) const;
 
        const BoundingNode<BoxType>* get_left() const {return left;}
        const BoundingNode<BoxType>* get_right() const {return right;}
};

}
#endif