NAME

cxPyrCompress - makes a compressed copy of a pyramid structure
#include <cx/Pyramid.h>

cxPyramid *cxPyrCompress(cxPyramid *src, cxPyramidDictionary *dict, long layer)
integer function cxPyrCompress(src, dict, layer)
integer src
integer dict
integer layer
src
Input pyramid data structure.
dict
Input pyramid dictionary data structure.
layer
Input layer from which to compress.
The returned value for this function is a pointer to the newly compressed pyramid. cxPyrCompress makes a compressed copy of its input pyramid, replacing all cxConnection structures of the input pyramid from layer layer to the base with a single cxConnection. cxPyrCompress thus makes a new pyramid in which the elements of src at layer are no longer created as hierarchical elements, but rather by reference to a dictionary of canonical elements. Each compressed element lists its vertices by index into the base lattice, along with an index of the dictionary element it resembles. If dict is not null, it is used as the starting dictionary; if it is null the default dictionary for the destination layer is used. The dictionary of reference elements in the output is created as a union of the input dict or default dictionary (see cxPyrDictDefault(3E)) and the other elements found in the src pyramid. The value of layer may range from one up to the number of layers in the pyramid. A compression layer of three is normal, indicating that 3-D elements are to be represented by the canonical reference elements in the pyramid dictionary. Compression at layer three suppresses representation of the internal faces and edges in a pyramid; in a large mesh of a given element type, this suppression can save significant amounts of storage. A compression layer of two indicates that faces are represented by the canonical polygons (triangles, quadrilaterals, and other polygons found in src). While a compression layer of one indicates that lines will be compressed, there is no savings of storage in this case. The storage required to represent a compressed pyramid is often much less than that of the equivalent expanded pyramid, depending on the layer of compression. However, a compression layer other than three or two may actually increase storage requirements. cxPyrCompress can be used to recompress compressed pyramids at a different layer. Recompressing at a higher level may take a long time and is not advised. cxPyrCompress returns a NULL if its input is malformed or if an allocation error occurs. The returned pyramid is a reference counted structure owned by the caller. CompressPyr(1E), cxPyrDup(3E), cxPyrEleDupExpand(3E), cxPyrDictDefault(3E), cxDataRefInc(3E)
Last modified: Mon Nov 6 16:33:43 GMT 2000
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996