|
virtual int | Clear (int numChan)=0 |
|
virtual int | Empty ()=0 |
|
virtual int | SpecifyPixel (int numChan, int numPoints, float *data)=0 |
| Initialize this DeepPixel to the uncompressed values provided. More...
|
|
virtual int | IsMonochrome ()=0 |
|
virtual int | GetNumChan ()=0 |
| Return the number of channels in this pixel. More...
|
|
virtual int | GetNumPoints ()=0 |
|
virtual int | GetPoint (int i, float *z, float *data)=0 |
|
virtual int | SetPoint (int i, float z, float *data)=0 |
|
virtual int | Copy (DeepPixel *src)=0 |
|
virtual int | Merge (DeepPixel *src)=0 |
|
virtual int | Merge (DeepPixel *src, int rgbChannel, int alphaChannel)=0 |
|
virtual int | Finish ()=0 |
|
virtual int | Append (float z, float *data, float tolerance)=0 |
|
virtual int | Eval (float z, float *data)=0 |
|
virtual int | Composite (int rgbChannel, int alphaChannel, float *data)=0 |
|
virtual int | GetZRange (float *zmin, float *zmax)=0 |
|
virtual int | Average (int n, DeepPixel *pixels[], float weights[], float tolerance)=0 |
|
virtual int | Compress (DeepPixel *src, float tolerance)=0 |
|
DeepPixel
Because deep texture pixels are varying in size, a pixel's storage must be dynamically allocated. Th DeepPixel allows users to build and evaluate pixels. The structure is fairly heavyweight because it stores auxiliary information related to compression. We don't recommend allocating an entire image of these structures yourself; keep * a small number of DeepPixels around, and use img->SetPixel to modify a DeepImage.
The following functions let you create, modify, and destroy DeepPixels. Pixels may be cleared with Clear(). New datapoints may be added (in increasing Z order) with Append(). If compression is used, a pixel must be Finish()'ed before lookups can be performed in the pixel.
Definition at line 370 of file RixDeepTexture.h.
virtual int RixDeepTexture::DeepPixel::Composite |
( |
int |
rgbChannel, |
|
|
int |
alphaChannel, |
|
|
float * |
data |
|
) |
| |
|
pure virtual |
Composite four channel RGBA within the pixel and store the result in data. rgbChannel must be the index of the first color channel, with the assumption that all three color channels are contiguous. alphaChannel must be the index of the alpha channel. data must be a buffer of at least four floats. If the pixel is empty, k_errEMPTY is returned and data is filled with zeros. Otherwise, data[0], data[1], and data[2] contain the composited color values and data[3] contains the composited alpha value, and the method returns k_errNOERR.
virtual int RixDeepTexture::DeepPixel::Merge |
( |
DeepPixel * |
src, |
|
|
int |
rgbChannel, |
|
|
int |
alphaChannel |
|
) |
| |
|
pure virtual |
Merge a source pixel's state into ours, additionally taking into account volume segments in either input. Regions of volume are flagged with a negative alpha and extend to the next sample in the pixel. There must be at least one non-volume sample marking the end of chain (which may be completely transparent).
This assumes a four channel RGBA pixel function when splitting and merging volume regions. The rgbChannel must be the index of the first color channel, with the assumption that all three color channels are contiguous. The alphaChannel must be the index of the alpha channel. Any additional channels will be copied unchanged from the most recent volume sample.