NAME
vtkPiecewiseFunction - Defines a 1D piecewise function.
SYNOPSIS
#include "/opt/vtk-c++/graphics/vtkPiecewiseFunction.h"
class VTK_EXPORT vtkPiecewiseFunction : public vtkObject
vtkPiecewiseFunction();
~vtkPiecewiseFunction();
static vtkPiecewiseFunction *New() {return new vtkPiecewiseFunction;};
const char *GetClassName() {return "vtkPiecewiseFunction";};
void PrintSelf(ostream& os, vtkIndent indent);
int GetSize();
void AddPoint( float x, float val );
void RemovePoint( float x );
void RemoveAllPoints();
void AddSegment( float x1, float val1, float x2, float val2 );
float GetValue( float x );
float *GetDataPointer() {return this->Function;};
float *GetRange();
void GetTable( float x1, float x2, int size, float *table );
void Set Clamping( int );
int Get Clamping();
void ClampingOn();
void ClampingOff();
char *GetType();
float GetFirstNonZeroValue();
DESCRIPTION
SEE ALSO
SUMMARY
void Set Interpolator( vtkInterpolator *)
void Set Interpolator( vtkInterpolator & )
Get the number of points used to specify the function This we will add when we go beyond linear interpolation
void Set Clamping( int )
Add/Remove points to/from the function. If a duplicate point is added then the function value is changed at that location. Removes all points from the function. / Add a line segment to the function. All points defined between the two points specified are removed from the function. Returns the value of the function at the specified location using the specified interpolation. Returns zero if the specified location is outside the min and max points of the function. Returns a pointer to the data stored in the table. Returns the min and max point locations of the function. Fills in an array of function values evaluated at regular intervals When zero range clamping is Off, GetValue() returns 0.0 when a value is requested outside of the points specified. When zero range clamping is On, GetValue() returns the value at the value at the lowest point for a request below all points specified and returns the value at the highest point for a request above all points specified. On is the default.
vtkPiecewiseFunction()
Construct a new vtkPiecewiseFunction with default values
~vtkPiecewiseFunction()
Destruct a vtkPiecewiseFunction
int GetSize()
Return the number of points which specify this function
char *GetType()
void AddPoint( float x, float val )
Adds a point to the function. If a duplicate point is inserted then the function value at that location is set to the new value.
int InsertPoint( float x, float val )
Adds a point to the function and returns the array index of the point.
void MovePoints( int index, int down )
Moves all points to the right of index down or up by one index value depending on the down flag. Assumes that memory for move is already allocated.
void RemovePoint( float x )
Removes a point from the function. If no point is found then function remains the same.
void RemoveAllPoints()
Removes all points from the function.
void AddSegment( float x1, float val1,
float x2, float val2 )
Add in end points of line and remove any points between them
float GetValue( float x )
Return the value of the function at a position
float *GetRange()
Return the smallest and largest position stored in function
void GetTable( float x1, float x2, int size, float* table ) Returns a table of function values evaluated at regular intervals
void IncreaseArraySize()
Increase the size of the array used to store the function
void PrintSelf(ostream& os, vtkIndent indent)
Print method for tkPiecewiseFunction