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

rdFunctionSet.h

00001 // rdFunctionSet.cpp
00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00003 // Copyright 2002, 2003 Realistic Dynamics, Inc.
00004 // All rights reserved.
00005 //
00006 // Please do not read, copy, distribute, or use without permission.
00007 // Contact: Frank C. Anderson, fca@RealisticDynamics.com
00008 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00009 
00010 
00011 #ifndef __rdFunctionSet_h__
00012 #define __rdFunctionSet_h__
00013 
00014 
00015 // INCLUDES
00016 #include "rdTools.h"
00017 #include "rdObject.h"
00018 #include "rdObjectArray.h"
00019 #include "rdFunction.h"
00020 
00021 
00022 //============================================================================
00023 // CONSTANTS
00024 //============================================================================
00025 const int rdFunctionSet_NUM_TYPES = 1;
00026 
00027 
00028 //=============================================================================
00029 //=============================================================================
00036 class RDTOOLS_API rdFunctionSet : public rdObjectArray
00037 {
00038 //=============================================================================
00039 // DATA
00040 //=============================================================================
00041 public:
00042    static const int NUM_TYPES;
00043    static const char PROP_MIN_X[];
00044    static const char PROP_MIN_Y[];
00045    static const char PROP_MIN_Z[];
00046    static const char PROP_MAX_X[];
00047    static const char PROP_MAX_Y[];
00048    static const char PROP_MAX_Z[];
00049 protected:
00051    rdFunction *_defaultFunctions[rdFunctionSet_NUM_TYPES];
00053    double _minX;
00055    double _maxX;
00057    double _minY;
00059    double _maxY;
00061    double _minZ;
00063    double _maxZ;
00064 
00065 //=============================================================================
00066 // METHODS
00067 //=============================================================================
00068 public:
00069    //--------------------------------------------------------------------------
00070    // CONSTRUCTION
00071    //--------------------------------------------------------------------------
00072    rdFunctionSet();
00073    rdFunctionSet(const char *aFileName);
00074    virtual ~rdFunctionSet();
00075 private:
00076    void setNull();
00077    void constructDefaultFunctions();
00078 
00079    //--------------------------------------------------------------------------
00080    // SET AND GET
00081    //--------------------------------------------------------------------------
00082 public:
00083    void setMinX(double aMinX);
00084    double getMinX();
00085    void setMaxX(double aMaxX);
00086    double getMaxX();
00087    void setMinY(double aMinY);
00088    double getMinY();
00089    void setMaxY(double aMaxY);
00090    double getMaxY();
00091    void setMinZ(double aMinZ);
00092    double getMinZ();
00093    void setMaxZ(double aMaxZ);
00094    double getMaxZ();
00095    rdFunction* getFunction(int aIndex) const;
00096 
00097    //--------------------------------------------------------------------------
00098    // EVALUATION
00099    //--------------------------------------------------------------------------
00100    virtual void updateSetBoundingBox();
00101    virtual void updateBoundingBox();
00102    virtual void updateBoundingBox(int aIndex);
00103    virtual double evaluate(int aIndex,
00104       int aDerivOrder,double aX=0.0,double aY=0.0,double aZ=0.0);
00105 
00106    //--------------------------------------------------------------------------
00107    // XML
00108    //--------------------------------------------------------------------------
00109    void updateObject(bool aDeep=true);
00110    void updateNode(bool aDeep=true);
00111    void generateNode(IDOM_Element *aParent);
00112 
00113 //=============================================================================
00114 }; // END class rdFunctionSet
00115 //=============================================================================
00116 //=============================================================================
00117 
00118 #endif  // __rdFunctionSet_h__

Generated on Wed Aug 20 02:17:06 2003 for Simulation Software by doxygen1.3