HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_NanoVDB.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  * COMMENTS:
7  */
8 
9 #ifndef __HOM_NanoVDB_h__
10 #define __HOM_NanoVDB_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_BinaryString.h"
14 #include "HOM_Defines.h"
15 #include "HOM_Errors.h"
16 #include "HOM_IterableList.h"
17 #include "HOM_EnumModules.h"
18 #include "HOM_Matrix4.h"
19 #include <UT/UT_Tuple.h>
20 #include <vector>
21 #include <string>
22 
23 SWIGOUT(%rename(NanoVDB) HOM_NanoVDB;)
24 // Force SWIG to output an __init__ method even though it determines this
25 // class is abstract.
26 SWIGOUT(%feature("notabstract") HOM_NanoVDB;)
27 
29 {
30 public:
31 #ifdef SWIG
32 %extend
33 {
34  HOM_NanoVDB(HOM_NanoVDB *layer=nullptr)
35  { return HOM().newNanoVDB(layer); }
36 }
37 #else
39  { HOM_CONSTRUCT_OBJECT(this) }
41  { HOM_CONSTRUCT_OBJECT(this) }
42 #endif
43  virtual ~HOM_NanoVDB()
44  { HOM_DESTRUCT_OBJECT(this) }
45 
46  virtual std::string __repr__() = 0;
47 
48  virtual HOM_NanoVDB *__enter__() { return this; }
49 
50 #ifdef SWIG
51 %extend
52 {
53  // We can ignore the type, value, and traceback Python objects.
54  SWIGOUT(virtual void __exit__(
55  InterpreterObject type, InterpreterObject value,
56  InterpreterObject traceback)
57  { self->close(); };)
58 }
59 #endif
60 
61  virtual void close() = 0;
62 
63  virtual HOM_EnumValue &vdbType() const = 0;
64  virtual HOM_EnumValue &typeInfo() const = 0;
65 
66  virtual void setTypeInfo(HOM_EnumValue &storagetype) = 0;
67 
68  virtual int64 leafCount() const = 0;
69 
70  virtual bool onCPU() const = 0;
71  virtual bool onGPU() const = 0;
72 
73  virtual HOM_Vector3 voxelSize() const = 0;
74  virtual HOM_Matrix4 indexToWorldTransform() const = 0;
75  virtual HOM_Matrix4 worldToIndexTransform() const = 0;
76 
77  SWIGOUT(%newobject freeze;)
78  virtual HOM_NanoVDB *freeze() const = 0;
79  virtual bool isFrozen() const = 0;
80 
81  virtual std::map<std::string, hboost::any> attributes() const = 0;
82  virtual void setAttributes(const std::map<std::string, hboost::any> &p) = 0;
83  virtual void updateAttributes(const std::map<std::string, hboost::any> &p) = 0;
84 
85  virtual HOM_BinaryString rawNanoVDB() const = 0;
86 
87 #ifdef SWIG
88 %extend
89 {
90  void setFromRawNanoVDB(InterpreterObject values)
91  {
92  HOM_PyBuffer buffer(values);
93  self->opaqueSetFromRawNanoVDB(
94  (const char *)buffer.myData, buffer.myLength);
95  }
96 }
97 #endif
98 
99  SWIGOUT(%ignore opaqueSetFromRawNanoVDB);
100  virtual void opaqueSetFromRawNanoVDB(const char *values, int64 length) = 0;
101 
102 };
103 
104 #endif
virtual HOM_NanoVDB * __enter__()
Definition: HOM_NanoVDB.h:48
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1343
HOM_NanoVDB(const HOM_NanoVDB &)
Definition: HOM_NanoVDB.h:40
GLsizei const GLfloat * value
Definition: glcorearb.h:824
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:312
void close() override
GLuint buffer
Definition: glcorearb.h:660
GLenum GLuint GLint GLint layer
Definition: glcorearb.h:1299
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1342
virtual ~HOM_NanoVDB()
Definition: HOM_NanoVDB.h:43
long long int64
Definition: SYS_Types.h:116
virtual HOM_NanoVDB * newNanoVDB(HOM_NanoVDB *vdb=nullptr)=0
GLenum GLsizei GLsizei GLint * values
Definition: glcorearb.h:1602
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
HOM_API HOM_Module & HOM()