This class shows which methods a Measure class must implement if it is to be used for a Quadtree. More...

List of all members.

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

## Detailed Description

This class shows which methods a Measure class must implement if it is to be used for a Quadtree.

Definition at line 477 of file quadtree.py.

## Member Function Documentation

 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.

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.

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.

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.

Todo:
Remove bias: can be calculated from grid.dims and dims!