Voxel
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Macros Pages
octree_node.h
1 #pragma once
2 
3 #ifndef OCTREE_NODE_H
4 #define OCTREE_NODE_H
5 
6 
7 
8 
9 #include "synchronized.h"
10 #include "settings.h"
11 
12 #include <array>
13 
14 #include <stdint.h>
15 
16 
17 
18 
19 /*==============================================================================
20  Node structure
21 ==============================================================================*/
22 
23 
24 namespace Octree {
25 
26 
27 // **TODO: we obviously have to templatize by platform, but could we avoid templatizing by color format? parhaps by adding a base class for the texture-heap smart pointers?
28 template< int t_ColorFormat, int t_Platform >
29 struct Node {
30 
31  typename Synchronized::TextureHeap< t_ColorFormat, t_Platform >::Pointer texture;
32  typename Synchronized::Heap< t_Platform >::template Pointer< Node[] > children;
33 };
34 
35 
36 } // namespace Octree
37 
38 
39 
40 
41 /*==============================================================================
42  OpenCL::Converter specialization for Node< PLATFORM_OPENCL >
43 ==============================================================================*/
44 
45 
46 #if ( SETTING_OPENCL != 0 )
47 
48 
49 #include "opencl_converter.h"
50 
51 #include <CL/cl.h>
52 
53 
54 namespace OpenCL {
55 
56 
57 template< int t_ColorFormat >
58 struct Converter< Octree::Node< t_ColorFormat, PLATFORM_OPENCL > > {
59 
60  struct Type {
61 
64  };
65 
66  static Type Convert( Octree::Node< t_ColorFormat, PLATFORM_OPENCL > const& source ) {
67 
68  Type result;
71  return result;
72  }
73 };
74 
75 
76 } // namespace OpenCL
77 
78 
79 #endif // SETTING_OPENCL
80 
81 
82 
83 
84 #endif // OCTREE_NODE_H