GEL  2
GEL is a library for Geometry and Linear Algebra
/Users/jab/Documents/Teaching/02585/GEL2_and_demos/GEL/src/Geometry/BoundingNode.h
00001 #ifndef __GEOMETRY_BOUNDINGNODE_H
00002 #define __GEOMETRY_BOUNDINGNODE_H
00003 
00004 #include <vector>
00005 #include "CGLA/Vec3f.h"
00006 #include "Ray.h"
00007 #include "Triangle.h"
00008 #include "AABox.h"
00009 #include "OBox.h"
00010 
00011 namespace Geometry
00012 {
00013 
00015 template<class BoxType>
00016 class BoundingNode: public BoxType
00017 {
00018  public:
00019         
00020         BoundingNode(const BoxType& box): BoxType(box) {}
00021         virtual ~BoundingNode() {}
00022 
00024         virtual int intersect_cnt(const CGLA::Vec3f&,const CGLA::Vec3f&) const=0;
00025 
00027         virtual bool intersect(const CGLA::Vec3f&,const CGLA::Vec3f&,float&) const=0;
00028 
00029         virtual void intersect(Ray& r) const = 0;
00030 
00034         virtual void sq_distance(const CGLA::Vec3f&, float&, float&, float&) const;
00035         
00036         static BoundingNode* build(std::vector<Triangle>& triangles);
00037 };
00038 
00039 }
00040 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations