HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_CESnippet.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: GU_CESnippet.h ( CE Library, C++)
7  *
8  * COMMENTS: Snippet binding for GU objects into CE_Snippet.
9  */
10 
11 #ifndef __GU_CESnippet__
12 #define __GU_CESnippet__
13 
14 #include "GU_API.h"
15 
16 #include <CE/CE_Snippet.h>
17 
18 class GU_Detail;
19 class GEO_PrimVolume;
20 
22 {
23 public:
24  GU_CESnippetBindOp(GU_Detail *gdp = nullptr)
25  : myGdp(gdp)
26  , myRefVol(nullptr)
27  { }
28 
29  void setGdp(GU_Detail *gdp) { myGdp = gdp; }
30  void setRefVol(const GEO_PrimVolume *vol) { myRefVol = vol; }
31 
32  /// Is this binding optional, and if so, does it exist in the geometry?
33  bool requiresHas(const CE_Snippet::Binding &binding, CE_Precision precision) const;
34 
35  bool operator()(const CE_Snippet::Binding &binding, int p,
36  cl::Kernel &kernel, int &argidx,
38  CE_Precision precision) const;
39 
40 
41 protected:
42  bool setAttribute(const CE_Snippet::Binding &binding, int p,
43  cl::Kernel &kernel, int &argidx,
45  CE_Precision precision) const;
46 
47  bool setVolume(const CE_Snippet::Binding &binding, int p,
48  cl::Kernel &kernel, int &argidx,
50  CE_Precision precision) const;
51 
52  bool setVDB(const CE_Snippet::Binding &binding, int p,
53  cl::Kernel &kernel, int &argidx,
55  CE_Precision precision) const;
56 
59 };
60 
61 #endif
62 
void setGdp(GU_Detail *gdp)
Definition: GU_CESnippet.h:29
const GEO_PrimVolume * myRefVol
Definition: GU_CESnippet.h:58
< returns > If no error
Definition: snippets.dox:2
GU_CESnippetBindOp(GU_Detail *gdp=nullptr)
Definition: GU_CESnippet.h:24
CE_Precision
Definition: CE_Precision.h:16
int setVolume(int speaker, float vol) override
#define GU_API
Definition: GU_API.h:14
GLenum GLint GLint * precision
Definition: glcorearb.h:1925
A global error manager scope.
Kernel interface that implements cl_kernel.
Definition: cl.hpp:2544
void setRefVol(const GEO_PrimVolume *vol)
Definition: GU_CESnippet.h:30
GU_Detail * myGdp
Definition: GU_CESnippet.h:57