11 #ifndef __PXL_DeepPixel__
12 #define __PXL_DeepPixel__
54 return myPixel->samplez(*
this) < myPixel->samplez(src);
55 return myId < src.myId;
57 int getId()
const {
return myId; }
58 int offset()
const {
return myOffset; }
66 int sample_lists_per_pixel);
70 bool isOpen()
const {
return myX >= 0; }
75 bool isMipStyle()
const {
return myMipCount.relaxedLoad() > 0; }
79 bool isRawStyle()
const {
return mySampleLists.size() > 0; }
89 void startPixel(
int x,
int y,
bool precomposted);
110 void store(
float zfront,
float zback,
const float *channel_data,
111 int flags,
int sample_id);
120 int x()
const {
return myX; }
121 int y()
const {
return myY; }
127 UT_ASSERT(off >= 0 && off < mySampleLists.size());
128 return myFloats[off*myFloatCount];
130 void dump(
const char *msg=
"")
const;
136 float zfront(
int off)
const
138 UT_ASSERT_P(myFloats && !myMipCount.relaxedLoad());
139 UT_ASSERT(off >= 0 && off < mySampleLists.size());
140 off = mySampleLists(off).offset();
141 return myFloats[off*myFloatCount];
143 float zback(
int off)
const
145 UT_ASSERT_P(myFloats && !myMipCount.relaxedLoad());
146 UT_ASSERT(off >= 0 && off < mySampleLists.size());
147 off = mySampleLists(off).offset();
148 return myFloats[off*myFloatCount+1];
150 const float *
data(
int off)
const
152 UT_ASSERT_P(myFloats && !myMipCount.relaxedLoad());
153 UT_ASSERT(off >= 0 && off < mySampleLists.size());
154 off = mySampleLists(off).offset();
155 return myFloats + off*myFloatCount + 2;
157 int getId(
int off)
const
159 return mySampleLists(off).getId();
171 int mySampleListsPerPixel;
175 bool myPrecomposited;
float samplez(const SampleKey &k) const
bool operator<(const SampleKey &src) const
OIIO_FORCEINLINE bool extract(const vbool4 &a)
bool isOpen() const
Test whether the pixel is accepting samples.
UT_SharedPtr< PXL_DeepCompressor > PXL_DeepCompressorPtr
void sort(I begin, I end, const Pred &pred)
const PXL_DeepChannelListPtr & channels() const
Return channel list passed into the c-tor.
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)
SampleKey(const PXL_DeepPixel *pixel=0, int id=-1, int off=-1)