HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
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
19
class
CE_API
CE_VDBGrid
20
{
21
public
:
22
CE_VDBGrid
() {}
23
~CE_VDBGrid
() { releaseBuffer(); };
24
25
/// Return the underlying OpenCL buffer that can be used in kernel
26
/// invocations.
27
const
cl::Buffer
&
buffer
()
const
{
return
myBuffer; }
28
29
/// If the current OpenCL buffer is valid.
30
bool
hasBuffer
()
const
{
return
(myBuffer() != 0);}
31
32
/// Initialize the CE_Grid from the supplied UT_VoxelArray. Note that
33
/// in the case that UT_VoxelArray::isConstant(), this will be very fast
34
/// and avoid allocating any actual GPU memory.
35
void
initFromVDB(
const
openvdb::GridBase &grid);
36
37
protected
:
38
39
void
releaseBuffer();
40
41
cl::Buffer
myBuffer
;
42
};
43
44
#endif
45
CE_API
#define CE_API
Definition:
CE_API.h:10
CE_VDBGrid
Definition:
CE_VDBGrid.h:19
openvdb.h
CE_API.h
CE_VDBGrid::buffer
const cl::Buffer & buffer() const
Definition:
CE_VDBGrid.h:27
CE_VDBGrid::~CE_VDBGrid
~CE_VDBGrid()
Definition:
CE_VDBGrid.h:23
Platform.h
CE_VDBGrid::CE_VDBGrid
CE_VDBGrid()
Definition:
CE_VDBGrid.h:22
CE_VDBGrid::myBuffer
cl::Buffer myBuffer
Definition:
CE_VDBGrid.h:41
cl::Buffer
Memory buffer interface.
Definition:
cl.hpp:1865
CE_VDBGrid::hasBuffer
bool hasBuffer() const
If the current OpenCL buffer is valid.
Definition:
CE_VDBGrid.h:30
CE
CE_VDBGrid.h
Generated on Fri Sep 22 2023 02:48:25 for HDK by
1.8.6