Public Member Functions | |
def | detail |
Measures the detail of the region of the grid between the points corner and corner+dims. | |
def | aproximate |
Aproximates the region of the grid between corner and corner+dims. | |
def | blend |
Blends two node values. | |
def | blend3 |
Blends three node values. |
Definition at line 477 of file quadtree.py.
def quadtree.AbstractMeasure.aproximate | ( | self, | ||
grid, | ||||
corner, | ||||
dims | ||||
) |
Aproximates the region of the grid between corner and corner+dims.
The return type must be the same as the data content type of the tree's node in which this AbstractMeasure is used.
Reimplemented in quadtree.Measure, quadtree_image.ChannelMeasure, and quadtree_image.ImageMeasure.
Definition at line 490 of file quadtree.py.
def quadtree.AbstractMeasure.blend | ( | self, | ||
col1, | ||||
col2, | ||||
ratio | ||||
) |
Blends two node values.
Ratio is a value between 0 and 1. If it is 0, the second value is returned. If it is 1, the first value is returned.
Reimplemented in quadtree.Measure, quadtree_image.ChannelMeasure, and quadtree_image.ImageMeasure.
Definition at line 496 of file quadtree.py.
def quadtree.AbstractMeasure.blend3 | ( | self, | ||
col1, | ||||
col2, | ||||
col3, | ||||
ratio1, | ||||
ratio2, | ||||
ratio3 | ||||
) |
Blends three node values.
The three ratios must add up to 1. If the three ratios are 0 1 0, the result is the same as the second value.
Reimplemented in quadtree.Measure, quadtree_image.ChannelMeasure, and quadtree_image.ImageMeasure.
Definition at line 502 of file quadtree.py.
def quadtree.AbstractMeasure.detail | ( | self, | ||
grid, | ||||
corner, | ||||
dims, | ||||
bias | ||||
) |
Measures the detail of the region of the grid between the points corner and corner+dims.
Returns a value between 0 and 1. (0 is no detail, 1 is full detail). The bias can be ignored - it is the ratio of cells to the entire grid represented by the piece of node.
Reimplemented in quadtree.Measure, quadtree_image.ChannelMeasure, and quadtree_image.ImageMeasure.
Definition at line 484 of file quadtree.py.