Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdFunctionSet Class Reference

A class for holding a set of functions. More...

#include <rdFunctionSet.h>

Inheritance diagram for rdFunctionSet:

rdObjectArray rdObject rdGCVSplineSet List of all members.

Public Member Functions

 rdFunctionSet ()
 Default constructor.

 rdFunctionSet (const char *aFileName)
 Construct a function set from file.

virtual ~rdFunctionSet ()
 Destructor.

void setMinX (double aMinX)
 Set the minimum x independent variable.

double getMinX ()
 Get the minimum x independent variable.

void setMaxX (double aMaxX)
 Set the maximum x independent variable.

double getMaxX ()
 Get the maximum x independent variable.

void setMinY (double aMinY)
 Set the minimum y independent variable.

double getMinY ()
 Get the minimum y independent variable.

void setMaxY (double aMaxY)
 Set the maximum y independent variable.

double getMaxY ()
 Get the maximum y independent variable.

void setMinZ (double aMinZ)
 Set the minimum z independent variable.

double getMinZ ()
 Get the minimum z independent variable.

void setMaxZ (double aMaxZ)
 Set the maximum z independent variable.

double getMaxZ ()
 Get the maximum z independent variable.

rdFunctiongetFunction (int aIndex) const
 Get the function at a specified index.

virtual void updateSetBoundingBox ()
 Update the bounding box for this function set.

virtual void updateBoundingBox ()
 Update the bounding boxes of all functions in the set.

virtual void updateBoundingBox (int aIndex)
 Update the bounding box of a specified function.

virtual double evaluate (int aIndex, int aDerivOrder, double aX=0.0, double aY=0.0, double aZ=0.0)
 Evaluate a function or one of its derivatives.

void updateObject (bool aDeep=true)
 Update this object based on its XML node.

void updateNode (bool aDeep=true)
 Update the XML node representing this object.

void generateNode (IDOM_Element *aParent)
 Generate an XML node representing this object.


Static Public Attributes

const int NUM_TYPES = rdFunctionSet_NUM_TYPES
const char PROP_MIN_X [] = "min_x"
const char PROP_MIN_Y [] = "min_y"
const char PROP_MIN_Z [] = "min_z"
const char PROP_MAX_X [] = "max_x"
const char PROP_MAX_Y [] = "max_y"
const char PROP_MAX_Z [] = "max_z"

Protected Attributes

rdFunction_defaultFunctions [rdFunctionSet_NUM_TYPES]
 Default functions.

double _minX
 Minimum value of the x independent variable.

double _maxX
 Maximum value of the x independent variable.

double _minY
 Minimum value of the y independent variable.

double _maxY
 Maximum value of the y independent variable.

double _minZ
 Minimum value of the z independent variable.

double _maxZ
 Maximum value of the z independent variable.


Private Member Functions

void setNull ()
 Set all member variables to NULL values.

void constructDefaultFunctions ()
 Construct the default functions.


Detailed Description

A class for holding a set of functions.

See also:
rdFunction
Author:
Frank C. Anderson


Constructor & Destructor Documentation

rdFunctionSet::rdFunctionSet  ) 
 

Default constructor.

Parameters:
aName Name of the function set.

rdFunctionSet::rdFunctionSet const char *  aFileName  ) 
 

Construct a function set from file.

Parameters:
aFileName Name of the file.


Member Function Documentation

double rdFunctionSet::evaluate int  aIndex,
int  aDerivOrder,
double  aX = 0.0,
double  aY = 0.0,
double  aZ = 0.0
[virtual]
 

Evaluate a function or one of its derivatives.

Parameters:
aIndex Index of the function to evaluate.
aDerivOrder Order of the derivative to evaluate.
aX Value of the x independent variable.
aY Value of the y independent variable.
aZ Value of the z independent variable.
Returns:
Value of the function. If the function is NULL or undefined, rdMath::NAN is returned.
See also:
rdFunction

void rdFunctionSet::generateNode IDOM_Element *  aParent  )  [virtual]
 

Generate an XML node representing this object.

Parameters:
aParent Intended parent of the node to be generated. If aParent is NULL, the intent is for this object to serve as the root element of a new document.

Reimplemented from rdObject.

rdFunction * rdFunctionSet::getFunction int  aIndex  )  const
 

Get the function at a specified index.

Parameters:
aIndex Index of the desired function: 0 <= aIndex < getFirstEmpty().
Returns:
Function at index aIndex. If aIndex is not value NULL is returned.

double rdFunctionSet::getMaxX  ) 
 

Get the maximum x independent variable.

Returns:
Maximum x.

double rdFunctionSet::getMaxY  ) 
 

Get the maximum y independent variable.

Returns:
Maximum y.

double rdFunctionSet::getMaxZ  ) 
 

Get the maximum z independent variable.

Returns:
Maximum z.

double rdFunctionSet::getMinX  ) 
 

Get the minimum x independent variable.

Returns:
Minimum x.

double rdFunctionSet::getMinY  ) 
 

Get the minimum y independent variable.

Returns:
Minimum y.

double rdFunctionSet::getMinZ  ) 
 

Get the minimum z independent variable.

Returns:
Minimum z.

void rdFunctionSet::setMaxX double  aMaxX  ) 
 

Set the maximum x independent variable.

Parameters:
aMaxX Maximum x.

void rdFunctionSet::setMaxY double  aMaxY  ) 
 

Set the maximum y independent variable.

Parameters:
aMaxY Maximum y.

void rdFunctionSet::setMaxZ double  aMaxZ  ) 
 

Set the maximum z independent variable.

Parameters:
aMaxZ Maximum z.

void rdFunctionSet::setMinX double  aMinX  ) 
 

Set the minimum x independent variable.

Parameters:
aMinX Minimum x.

void rdFunctionSet::setMinY double  aMinY  ) 
 

Set the minimum y independent variable.

Parameters:
aMinY Minimum y.

void rdFunctionSet::setMinZ double  aMinZ  ) 
 

Set the minimum z independent variable.

Parameters:
aMinZ Minimum z.

void rdFunctionSet::updateBoundingBox int  aIndex  )  [virtual]
 

Update the bounding box of a specified function.

Parameters:
aIndex Index of the function for which to update the bounding box.
See also:
rdGCVSplineSet::UpdateBoundingBox()

void rdFunctionSet::updateBoundingBox  )  [virtual]
 

Update the bounding boxes of all functions in the set.

See also:
rdGCVSplineSet::UpdateBoundingBox()

void rdFunctionSet::updateObject bool  aDeep = true  )  [virtual]
 

Update this object based on its XML node.

Parameters:
aDeep If true, update this object and all its child objects (that is, member variables that are rdObject's); if false, update only the member variables that are not rdObject's.

Reimplemented from rdObjectArray.

void rdFunctionSet::updateSetBoundingBox  )  [virtual]
 

Update the bounding box for this function set.

The bounding box is bounding box for all functions. The bounding box is determined by looping through all the functions in this set and querying each for its bounding box. Note that none of the bounding boxes of the functions in this set are changed by this method.

See also:
rdFunction


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:10 2003 for Simulation Software by doxygen1.3