|
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 |
| Return 1 if this pixel has duplicates for all its values. More...
|
|
virtual int | GetNumChan ()=0 |
| Return the number of channels in this pixel. More...
|
|
virtual int | GetNumPoints ()=0 |
| Return the number of control points in this pixel. More...
|
|
virtual int | GetPoint (int i, float *z, float *data)=0 |
| Get the i'th control point in the given pixel. More...
|
|
virtual int | SetPoint (int i, float z, float *data)=0 |
| Modify the i'th control point in this pixel. More...
|
|
virtual int | Copy (DeepPixel *src)=0 |
| Copy the source pixel state into ours. More...
|
|
virtual int | Merge (DeepPixel *src)=0 |
| Merge a source pixel's state into ours. More...
|
|
virtual int | Merge (DeepPixel *src, int rgbChannel, int alphaChannel)=0 |
| Merge a source pixel's state into ours, additionally taking into account volume segments in either input. More...
|
|
virtual int | Finish ()=0 |
| If this pixel is in "compress mode" (non-zero compression), this function finished compression and sets compression error to zero. More...
|
|
virtual int | Append (float z, float *data, float tolerance)=0 |
| Add a data point to the end of this pixel. More...
|
|
virtual int | Eval (float z, float *data)=0 |
| Evaluate this pixels texture at depth z and put the result in data. More...
|
|
virtual int | Composite (int rgbChannel, int alphaChannel, float *data)=0 |
| Composite four channel RGBA within the pixel and store the result in data. More...
|
|
virtual int | GetZRange (float *zmin, float *zmax)=0 |
| Computes the range over which the specified pixel is defined. More...
|
|
virtual int | Average (int n, DeepPixel *pixels[], float weights[], float tolerance)=0 |
| Compute the weighted pointwise average of the incoming array of pixels and weights and place the result into this DeepPixel. More...
|
|
virtual int | Compress (DeepPixel *src, float tolerance)=0 |
| Compress a src DeepPixel into this DeepPixel. More...
|
|
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.
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::GetPoint |
( |
int |
i, |
|
|
float * |
z, |
|
|
float * |
data |
|
) |
| |
|
pure virtual |
Get the i'th control point in the given pixel.
If the indicated control point is accessible, z and data are set and k_ErrNOERR is return. If the pixel does not exist, k_ErrNOPOINT is returned and *z and *data are undefined. If the pixel has unresolved compression state, k_ErrUNFINISHED is returned and *z and *data are undefined.
virtual int RixDeepTexture::DeepPixel::GetZRange |
( |
float * |
zmin, |
|
|
float * |
zmax |
|
) |
| |
|
pure virtual |
Computes the range over which the specified pixel is defined.
If the pixel is non-empty, the range is returned in zmin and zmax and the method returns k_ErrNOERR. If this pixel is empty, we return k_ErrEMPTY and *zmin and *zmax are undefined. If this pixel has undefined compression state, k_ErrUNFINISHED is returned and *zmin and *zmax are undefined.
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.
virtual int RixDeepTexture::DeepPixel::SetPoint |
( |
int |
i, |
|
|
float |
z, |
|
|
float * |
data |
|
) |
| |
|
pure virtual |
Modify the i'th control point in this pixel.
If the indicated control point is accessible and if the supplied z is legal, the pixel is modified and kErrNOERR is returned. If the point does not exist, k_ErrNOPOINT is returned. If the pixel has unresolved compression state, k_ErrUNFINISHED is returned.