HyperspaceExplorer 0.7.1
|
A RealFunction is a mathematical function . More...
#include <RealFunction.h>
Classes | |
class | Impl |
Public Types | |
typedef VecMath::Vector< 4 > & | function_type (double, double, double) |
typedef VecMath::Vector< 4 > | raw_function_type (double, double, double) |
the real, raw type of the function used to generate values | |
Public Member Functions | |
RealFunction () | |
RealFunction (ParametricFunction< 4, 3 > *function) | |
RealFunction (double tmin, double tmax, double dt, double umin, double umax, double du, double vmin, double vmax, double dv, ParameterMap _parms=ParameterMap()) | |
virtual void | ReInit (double tmin, double tmax, double dt, double umin, double umax, double du, double vmin, double vmax, double dv) |
Re-initialize a RealFunction if the definition set has changed. | |
virtual std::string | getFunctionName () const |
VecMath::Vector< 4 > & | operator() (double t, double u, double v) |
Function evaluation operator for three parameters. | |
virtual unsigned | getNumParameters () |
Protected Member Functions | |
VecMath::Vector< 4 > & | normal (double t, double u, double v) |
Calculate normal to function at a given point in definition set. | |
virtual void | Initialize (void) |
Allocate and initialize X[][][] with values of f(). | |
Protected Attributes | |
std::shared_ptr < ParametricFunction< 4, 3 > > | _function |
Pointer to the actual ParametricFunction doing all the work. | |
Private Attributes | |
std::unique_ptr< Impl > | pImpl_ |
A RealFunction is a mathematical function .
The function f is evaluated on a 3-dimensional cartesian grid. The function value constitutes the fourth dimension of the Function object: .
The parent class Function provides the evaluation on the grid, together with methods to rotate and translate the grid in 4-space, to project the transformed grid onto 3-space, and to draw the projected grid into an OpenGL display list.
typedef VecMath::Vector<4>& RealFunction::function_type(double, double, double) |
type of the function used to generate values, optimized with a reference as return value
Reimplemented from FunctionHolder< 4, 3, double >.
RealFunction::RealFunction | ( | ) |
RealFunction c'tor given only a name: All grid values are set to defaults
References this.
RealFunction::RealFunction | ( | double | tmin, |
double | tmax, | ||
double | dt, | ||
double | umin, | ||
double | umax, | ||
double | du, | ||
double | vmin, | ||
double | vmax, | ||
double | dv, | ||
ParameterMap | parms = ParameterMap() |
||
) |
RealFunction c'tor given a definition set in (as parameter space)
tmin | minimal value in t |
tmax | maximal value in t |
dt | stepsize in t |
umin | minimal value in u |
umax | maximal value in u |
du | stepsize in u |
vmin | minimal value in v |
vmax | maximal value in v |
dv | stepsize in v |
parms | function parameters |
References this.
std::string RealFunction::getFunctionName | ( | ) | const [virtual] |
Implements Displayable.
Reimplemented in CustomFunction, CustomPolarFunction, Hypersphere, Torus1, Torus2, Fr3r, GravitationPotential, Fr3rSin, Fr3rExp, PolarSin, PolarSin2, and PolarR.
References _function.
unsigned int RealFunction::getNumParameters | ( | ) | [virtual] |
Reimplemented from FunctionHolder< 4, 3, double >.
Vector< 4 > & RealFunction::normal | ( | double | tt, |
double | uu, | ||
double | vv | ||
) | [protected] |
Calculate normal to function at a given point in definition set.
No further assumption is made than that f () is continuous.
This function is not yet used anywhere, but i like it.
tt | t value |
uu | u value |
vv | v value |
References Displayable::df(), VecMath::vcross(), and VecMath::vnormalize().
Vector< 4 > & RealFunction::operator() | ( | double | t, |
double | u, | ||
double | v | ||
) | [virtual] |
Function evaluation operator for three parameters.
t | first argument, e.g. x or t |
u | second argument, e.g. y or u |
v | third argument, e.g. z or v |
Reimplemented from Displayable.
References _function.