9 #ifndef __HOM_ImageLayer_h__
10 #define __HOM_ImageLayer_h__
56 InterpreterObject
type, InterpreterObject
value,
57 InterpreterObject traceback)
62 virtual void close() = 0;
72 virtual int channelCount()
const = 0;
73 virtual void setChannelCount(
int chan) = 0;
75 virtual std::vector<int> bufferResolution()
const = 0;
77 virtual bool onCPU()
const = 0;
78 virtual bool onGPU()
const = 0;
79 virtual bool isConstant()
const = 0;
80 virtual bool storesIntegers()
const = 0;
82 virtual void makeConstant(std::vector<double>
val) = 0;
87 virtual std::vector<double> pixelScale()
const = 0;
89 virtual void setDataWindow(
int x,
int y,
int w,
int h) = 0;
90 virtual void setDisplayWindow(
double x,
double y,
double w,
double h) = 0;
91 virtual void setPixelAspectRatio(
double aspect) = 0;
92 virtual void setPixelScale(std::vector<double>
scale) = 0;
96 virtual double aperture()
const = 0;
97 virtual double focalLength()
const = 0;
98 virtual std::vector<double> cameraPosition()
const = 0;
99 virtual double fStop()
const = 0;
100 virtual std::vector<double> clippingRange()
const = 0;
101 virtual double focusDistance()
const = 0;
102 virtual std::vector<double> shutter()
const = 0;
105 virtual void setAperture(
double aperture) = 0;
106 virtual void setFocalLength(
double focal) = 0;
107 virtual void setCameraPosition(std::vector<double> pos) = 0;
108 virtual void setFStop(
double fstop) = 0;
109 virtual void setClippingRange(std::vector<double>
range) = 0;
110 virtual void setFocusDistance(
double focus) = 0;
111 virtual void setShutter(std::vector<double> shutter) = 0;
113 virtual HOM_Matrix4 projectionTransform()
const = 0;
114 virtual HOM_Matrix4 imageToWorldTransform()
const = 0;
116 virtual std::vector<double> imageToPixelScale()
const = 0;
117 virtual std::vector<double> imageToPixelTranslate()
const = 0;
118 virtual std::vector<double> imageToBufferScale()
const = 0;
119 virtual std::vector<double> imageToBufferTranslate()
const = 0;
121 virtual std::vector<double> bufferToPixelScale()
const = 0;
122 virtual std::vector<double> bufferToPixelTranslate()
const = 0;
124 virtual std::vector<double> textureToBufferScale()
const = 0;
129 virtual std::vector<double> imageToPixel(std::vector<double> p)
const = 0;
130 virtual std::vector<double> imageToBuffer(std::vector<double> p)
const = 0;
131 virtual std::vector<double> imageToTexture(std::vector<double> p)
const = 0;
132 virtual std::vector<double> pixelToImage(std::vector<double> p)
const = 0;
133 virtual std::vector<double> pixelToBuffer(std::vector<double> p)
const = 0;
134 virtual std::vector<double> pixelToTexture(std::vector<double> p)
const = 0;
135 virtual std::vector<double> bufferToPixel(std::vector<double> p)
const = 0;
136 virtual std::vector<double> bufferToImage(std::vector<double> p)
const = 0;
137 virtual std::vector<double> bufferToTexture(std::vector<double> p)
const = 0;
138 virtual std::vector<double> textureToPixel(std::vector<double> p)
const = 0;
139 virtual std::vector<double> textureToImage(std::vector<double> p)
const = 0;
140 virtual std::vector<double> textureToBuffer(std::vector<double> p)
const = 0;
141 virtual std::vector<double> worldToBuffer(std::vector<double> p)
const = 0;
145 virtual std::vector<float> bufferIndexV4(
int x,
int y)
const = 0;
146 virtual int bufferIndexI(
int x,
int y)
const = 0;
152 virtual bool isFrozen()
const = 0;
154 virtual std::map<std::string, hboost::any> attributes()
const = 0;
155 virtual void setAttributes(
const std::map<std::string, hboost::any> &p) = 0;
156 virtual void updateAttributes(
const std::map<std::string, hboost::any> &p) = 0;
164 void setAllBufferElements(InterpreterObject
values)
166 HOM_PyBuffer
buffer(values);
167 self->opaqueSetAllBufferElements(
178 HOM_PyBuffer
buffer(values);
179 self->opaqueSetAllBufferElements(
181 storagetype, channels);
187 virtual void opaqueSetAllBufferElements(
const char *values,
int64 length,
191 virtual void opaqueSetAllBufferElements(
const char *values,
int64 length) = 0;
virtual HOM_ImageLayer * newImageLayer(HOM_ImageLayer *layer=nullptr)=0
#define HOM_DESTRUCT_OBJECT(pointer)
GLsizei const GLfloat * value
GLuint GLsizei GLsizei * length
string __repr__(VtArray< T > const &self)
HOM_ImageLayer(const HOM_ImageLayer &)
GLenum GLuint GLint GLint layer
GA_API const UT_StringHolder scale
GLint GLint GLsizei GLint GLenum GLenum type
bool any(const vbool4 &v)
void ignore(T const &) VULKAN_HPP_NOEXCEPT
#define HOM_CONSTRUCT_OBJECT(pointer)
virtual ~HOM_ImageLayer()
HUSD_API const char * pixelAspectRatio()
GLfloat GLfloat GLfloat GLfloat h
GLint GLint GLsizei GLint border
GLenum GLsizei GLsizei GLint * values
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
GLubyte GLubyte GLubyte GLubyte w
HOM_API HOM_Module & HOM()
virtual HOM_ImageLayer * __enter__()
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)