cgma
OctreeIntersectionData.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : OctreeIntersectionData.hpp
00003 //
00004 // Purpose       : Data related to intersection between octree and facets
00005 //
00006 // Creator       : William Roshan Quadros
00007 //
00008 // Creation Date :  08/26/2013
00009 //
00010 // Owner         : 
00011 //-------------------------------------------------------------------------
00012 #ifndef OCTREEINTERSECTIONDATA_H
00013 #define OCTREEINTERSECTIONDATA_H
00014 
00015 #include "CubitVector.hpp"
00016 #include "CubitDefines.h"
00017 
00018 
00019 class RefFace;
00020 
00021 class CubitFacet;
00022 class CubitOctreeNode;
00023 
00024 class OctreeIntersectionData{
00025 
00026 public:
00027   OctreeIntersectionData(const CubitVector &normal, const CubitBoolean half_space, const double &len, RefFace *ptr_face, const CubitVector &closest_point_on_facet, CubitFacet *lp_facet); // SAT constructor
00028   OctreeIntersectionData( CubitOctreeNode *ptr_white_node, CubitVector normal, CubitVector int_point, double len, RefFace *ptr_face);
00029   ~OctreeIntersectionData(){}
00030   inline CubitVector get_normal(void){ return facetNormal; }
00031   inline CubitVector get_int_point(void){return intPoint; }
00032   inline double get_length(void){ return length; }
00033   inline RefFace * get_face(void){ return refFace; }
00034   inline CubitOctreeNode *get_white_node(void){ return whiteNode; }
00035   inline CubitFacet* get_facet_ptr() {return ptrFacet;} // for SAT code
00036   inline CubitBoolean get_halfspace() {return halfSpace;} // for SAT code
00037   inline CubitVector get_facet_normal() {return facetNormal;}
00038 
00039   inline static int compare_function(OctreeIntersectionData *&a, OctreeIntersectionData *&b)
00040   {
00041     if (a->get_length() < b->get_length()) {return -1;}
00042     else if (a->get_length() > b->get_length()) {return 1;}
00043     else {return 0;}
00044   }
00045 
00046   inline CubitBoolean is_merged() {return merged;}
00047   inline void set_merged(const CubitBoolean val) {merged = val;}
00048 
00049  private:
00050   CubitOctreeNode *whiteNode;
00051   CubitVector facetNormal;
00052   CubitVector intPoint;
00053   double length;
00054   RefFace *refFace;
00055   CubitFacet *ptrFacet;
00056   CubitBoolean halfSpace;
00057   CubitBoolean merged;
00058 
00059    
00060 };
00061 #endif
00062 
00063 //EOF
00064 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines