#include <TeLinearFilter.h>
Inheritance diagram for TeLinearFilter:
This generator represents simple linear filter that can be used to smooth values stored in the TeHeightMap object.
In one cycle, the filter goes through the data in all rows and columns in both directions and changes the values according to the neighbours and filtration coefficient TeLinearFilter::coef. This value should be between (0.0f-1.0f). When large - smaller changes, when small - huge filtering will be done.
This cycle will be done TeLinearFilter::times -times.
Public Member Functions | |
TeLinearFilter () | |
virtual void | setDefaults () |
virtual void | updateParams () |
virtual void | generate () |
virtual SbBool | genStep () |
Public Attributes | |
int | times |
float | coef |
Private Attributes | |
int | _times |
float | _coef |
|
Constructor. Sets default generator parameters and resets the step counter. |
|
In-One-Step generation. The whole generation will be done in one function call. Calling updateParams() should be the first thing done here. It calls original TeHeightMap::filter_Linear() method. Implements TeGenerator. |
|
One step of the generation algorithm. Calling updateParams() should be the first thing done in the first run. reset() and TeHeightMap::resetFlags() should be called before returning TRUE.
Implements TeGenerator. |
|
Sets default generator parameters.
Implements TeGenerator. |
|
Updates private parameters to fit theirs public images. I call this "delayed setting". It ensures, that correct attributes are used for the current task (the private ones). When the task is done, private attributes are updated to match the public ones and then will be used for the next task. User doesn't need to worry about this, because this method is called internally from generate() and genStep() functions.
Implements TeGenerator. |
|
Private attribute used by generator.
|
|
Private attribute used by generator.
|
|
Filtration coefficient. This value should be between (0.0f-1.0f). When large - smaller changes, when small - huge filtering will be done. Set this one to modify its private image.
|
|
How many times the filtration to be performed. Set this one to modify its private image.
|