GEL  2
GEL is a library for Geometry and Linear Algebra
/Users/jab/Documents/Teaching/02585/GEL2_and_demos/GEL/src/Geometry/BoundingINode.h
00001 #ifndef __GEOMETRY_BOUNDINGINODE_H
00002 #define __GEOMETRY_BOUNDINGINODE_H
00003 
00004 #include "Ray.h"
00005 #include "BoundingNode.h"
00006 
00007 namespace Geometry
00008 {
00009 
00012 template<class BoxType>
00013 class BoundingINode: public BoundingNode<BoxType>
00014 {
00015         BoundingNode<BoxType>* left;
00016         BoundingNode<BoxType>* right;
00017  public:
00018 
00019         BoundingINode(const BoxType& box,
00020                                                                 BoundingNode<BoxType>* _left,
00021                                                                 BoundingNode<BoxType>* _right): 
00022                 BoundingNode<BoxType>(box), left(_left), right(_right) {}
00023 
00024         virtual ~BoundingINode() {delete left; delete right;}
00025 
00026         bool intersect(const CGLA::Vec3f&,const CGLA::Vec3f&,float&) const; 
00027         void intersect(Ray&  r) const; 
00028         int intersect_cnt(const CGLA::Vec3f&,const CGLA::Vec3f&) const;
00029  
00030         const BoundingNode<BoxType>* get_left() const {return left;}
00031         const BoundingNode<BoxType>* get_right() const {return right;}
00032 };
00033 
00034 }
00035 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations