HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CE_VDBGrid.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: CE_VDBGrid.h ( CE Library, C++)
7  *
8  * COMMENTS: Compute Engine Grid.
9  */
10 
11 #ifndef __CE_VDBGrid__
12 #define __CE_VDBGrid__
13 
14 #include "CE_API.h"
15 
16 #include <openvdb/Platform.h>
17 #include <openvdb/openvdb.h>
18 
20 {
21 public:
22  /// Return the underlying OpenCL buffer that can be used in kernel
23  /// invocations.
24  const cl::Buffer &buffer() const { return myBuffer; }
25 
26  /// If the current OpenCL buffer is valid.
27  bool hasBuffer() const {return (myBuffer() != 0);}
28 
29  /// Initialize the CE_Grid from the supplied UT_VoxelArray. Note that
30  /// in the case that UT_VoxelArray::isConstant(), this will be very fast
31  /// and avoid allocating any actual GPU memory.
32  void initFromVDB(const openvdb::GridBase &grid);
33 
34 protected:
35 
37 };
38 
39 #endif
40 
#define CE_API
Definition: CE_API.h:10
const cl::Buffer & buffer() const
Definition: CE_VDBGrid.h:24
cl::Buffer myBuffer
Definition: CE_VDBGrid.h:36
Memory buffer interface.
Definition: cl.hpp:1865
bool hasBuffer() const
If the current OpenCL buffer is valid.
Definition: CE_VDBGrid.h:27