VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
spatialSubdivisionIntersector.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
6 #pragma once
7 
8 // \file spatialSubdivisionIntersector.h
9 // \ingroup geometry
10 
12 #include <geometry/ssFunctor.h>
13 #include <geometry/extent.h>
14 
15 #include <vlutil/vlConfig.h>
16 
21 template <typename T>
23 {
24 public:
27  {
28 
29  };
30 
33  {
34 
35  };
36 
40  virtual bool intersect(T element,
41  DtSpatialSubdivision<T>& spatialSubdivision) const
42  {
43  bool retVal = false;
44 
45  DtSsExtentIntersector<T> extentIntersector;
46 
47  if (extentIntersector.intersect(
48  element->extent(), spatialSubdivision))
49  {
50  // Found an intersection
51  retVal = true;
52  }
53  else
54  {
55  DtVerbose("Warning: DtSpatialSubdivisionIntersector::intersect - "
56  "The specified node does not intersect the spatial subdivision.\n");
57  }
58 
59  return retVal;
60  };
61 
67  virtual bool intersect(T element,
68  DtSpatialSubdivision<T>& spatialSubdivision,
70  {
71  bool retVal = false;
72 
73  DtSsExtentIntersector<T> extentIntersector;
74  if (extentIntersector.intersect(element, spatialSubdivision, functor))
75  {
76  // Found an intersection
77  retVal = true;
78  }
79  else
80  {
81  DtVerbose("Warning: DtSpatialSubdivisionIntersector::intersect - "
82  "The specified node does not intersect the spatial subdivision.\n");
83  }
84 
85  return retVal;
86  };
87 
88 protected:
92 
93 private:
94 
95 };

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)