9 #ifndef __HOM_Volume_h__
10 #define __HOM_Volume_h__
16 #include <hboost/any.hpp>
41 virtual int channelCount() = 0;
45 virtual double sample(
const std::vector<double> &
position) = 0;
50 virtual double voxel(
const std::vector<int> &
index) = 0;
52 virtual void setVoxel(
const std::vector<int> &
index,
double value) = 0;
54 virtual std::vector<float> allVoxels() = 0;
58 virtual void setAllVoxels(
const std::vector<float> &
values) = 0;
66 void setAllVoxelsFromString(InterpreterObject
values)
68 HOM_PyBuffer
buffer(values);
69 self->opaqueSetAllVoxelsFromString(
75 virtual std::vector<float> voxelSlice(
const char *plane,
int index) = 0;
79 virtual void setVoxelSlice(
80 const std::vector<float> &values,
const char *plane,
int index) = 0;
83 virtual void opaqueSetVoxelSliceFromString(
89 void setVoxelSliceFromString(
90 InterpreterObject values,
const char *plane,
int index)
92 HOM_PyBuffer
buffer(values);
93 self->opaqueSetVoxelSliceFromString(
94 (
const char *)
buffer.myData,
buffer.myLength, plane, index);
101 virtual bool hasWindow() = 0;
102 virtual void clearWindow() = 0;
108 virtual void setDataWindowOffset(
const std::vector<double> &
offset) = 0;
109 virtual void setDisplayWindowOffset(
const std::vector<double> &
offset) = 0;
110 virtual void setDisplayWindowSize(
const std::vector<double> &
size) = 0;
111 virtual void setWindowVoxelScale(
const std::vector<double> &
scale) = 0;
113 SWIGOUT(%newobject indexToPos;)
114 virtual HOM_Vector3 *indexToPos(
const std::vector<int> &index) = 0;
116 virtual std::vector<int> posToIndex(
const std::vector<double> &
position) = 0;
118 virtual bool isValidIndex(
const std::vector<int> &index) = 0;
120 virtual bool isSDF() = 0;
122 virtual bool isHeightField() = 0;
124 virtual hboost::any computeMax(
int channel = 0) = 0;
125 virtual hboost::any computeMin(
int channel = 0) = 0;
126 virtual double computeAverage(
int channel = 0) = 0;
128 virtual hboost::any volumeMax(
int channel = 0) = 0;
129 virtual hboost::any volumeMin(
int channel = 0) = 0;
130 virtual double volumeAverage(
int channel = 0) = 0;
137 virtual double taperX() = 0;
138 virtual double taperY() = 0;
SIM_API const UT_StringHolder vertex
#define HOM_DESTRUCT_OBJECT(pointer)
GLsizei const GLfloat * value
GLuint GLsizei GLsizei * length
string __repr__(VtArray< T > const &self)
GA_API const UT_StringHolder scale
bool any(const vbool4 &v)
void ignore(T const &) VULKAN_HPP_NOEXCEPT
#define HOM_CONSTRUCT_OBJECT(pointer)
HOM_Volume(const HOM_Volume &volume)
HUSD_API const char * resolution()
GA_API const UT_StringHolder transform
GLenum GLsizei GLsizei GLint * values
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
SIM_API const UT_StringHolder position