RenderManAPI
24.0

#include <RixDeepTexture.h>
Public Member Functions  
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" (nonzero 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...  
Protected Member Functions  
virtual  ~DeepPixel () 
Internal only. Use RixDeepTexture::DestroyPixel. More...  
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.

inlineprotectedvirtual 
Internal only. Use RixDeepTexture::DestroyPixel.

pure virtual 
Add a data point to the end of this pixel.
tolerance provides an accuracy hint to compressors. The number of floats provided in data must be equal to the pixel's channel count.

pure virtual 
Compute the weighted pointwise average of the incoming array of pixels and weights and place the result into this DeepPixel.

pure virtual 

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.

pure virtual 

pure virtual 
Copy the source pixel state into ours.
Ensure that our channel and compression state match that of src.

pure virtual 

pure virtual 
Evaluate this pixels texture at depth z and put the result in data.
The amount of float storage in data must be equal to the pixel's channel count.

pure virtual 
If this pixel is in "compress mode" (nonzero compression), this function finished compression and sets compression error to zero.
This must be called before any lookups on the pixel. If the pixel alred has a zero compression error, this method has no effect.

pure virtual 
Return the number of channels in this pixel.

pure virtual 
Return the number of control points in this pixel.
Returns zero if there are no control points, k_ErrERROR if the pixel has unresolved compression state.

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.

pure virtual 
Computes the range over which the specified pixel is defined.
If the pixel is nonempty, 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.

pure virtual 
Return 1 if this pixel has duplicates for all its values.
Return 0 otherwise. If this pixel has no control points, return 1.

pure virtual 
Merge a source pixel's state into ours.
The result is that our pixel will contain all control points in both pixels. The channel count in the source pixel must match our own, and both pixels must not have any incomplete compression state.

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 nonvolume 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.

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.

pure virtual 
Initialize this DeepPixel to the uncompressed values provided.