HyperspaceExplorer 0.7.1
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
RealFunction Class Reference

A RealFunction is a mathematical function $ f: R^3 \rightarrow R $ . More...

#include <RealFunction.h>

Inheritance diagram for RealFunction:
Inheritance graph
[legend]
Collaboration diagram for RealFunction:
Collaboration graph
[legend]

List of all members.

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< ImplpImpl_

Detailed Description

A RealFunction is a mathematical function $ f: R^3 \rightarrow R $ .

The function f is evaluated on a 3-dimensional cartesian grid. The function value constitutes the fourth dimension of the Function object: $ \vec{x} = ( x, y, z, f(x, y, z) ) $.

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.

Author:
Lene Preuss <lene.preuss@gmail.com>

Member Typedef Documentation

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


Constructor & Destructor Documentation

RealFunction::RealFunction ( )

RealFunction c'tor given only a name: All grid values are set to defaults

Todo:
don't initialize the grid!

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 $ R^3 $ (as parameter space)

Parameters:
tminminimal value in t
tmaxmaximal value in t
dtstepsize in t
uminminimal value in u
umaxmaximal value in u
dustepsize in u
vminminimal value in v
vmaxmaximal value in v
dvstepsize in v
parmsfunction parameters

References this.


Member Function Documentation

std::string RealFunction::getFunctionName ( ) const [virtual]
Returns:
The name of the function in cleartext

Implements Displayable.

Reimplemented in CustomFunction, CustomPolarFunction, Hypersphere, Torus1, Torus2, Fr3r, GravitationPotential, Fr3rSin, Fr3rExp, PolarSin, PolarSin2, and PolarR.

References _function.

unsigned int RealFunction::getNumParameters ( ) [virtual]
Returns:
number of parameters for the function
Todo:
get rid of this function.

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.

Parameters:
ttt value
uuu value
vvv value
Returns:
surface normal, normalized

References Displayable::df(), VecMath::vcross(), and VecMath::vnormalize().

Here is the call graph for this function:

Vector< 4 > & RealFunction::operator() ( double  t,
double  u,
double  v 
) [virtual]

Function evaluation operator for three parameters.

Parameters:
tfirst argument, e.g. x or t
usecond argument, e.g. y or u
vthird argument, e.g. z or v
Returns:
f(t, u, v)

Reimplemented from Displayable.

References _function.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:18 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo