![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 2000 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: tableFn1DReg.h,v $ $Revision: 1.14 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef Dt1DRegularTableFn_H_ 00013 #define Dt1DRegularTableFn_H_ 00014 00015 #include <stdio.h> 00016 #include <vlutil/vlMachineTypes.h> 00017 #include "vrfutil/baseTableFn.h" 00018 #include "vrfutil/rwReal.h" 00019 #include "vrfutil/nLenRealVec.h" 00020 00027 00028 #include "vrfutil/vrfutilDefines.h" 00029 class DT_DLL_vrfutil Dt1DRegularTableFn : public DtBaseTableFunction 00030 { 00031 public: 00032 00034 Dt1DRegularTableFn(); 00035 00037 Dt1DRegularTableFn(const DtString& name, DtReaderWriterRegistry* 00038 parentRegistry = NULL); 00039 Dt1DRegularTableFn(const DtSymbolString& name, DtReaderWriterRegistry* 00040 parentRegistry = NULL); 00041 00043 Dt1DRegularTableFn(const DtReal bottom, 00044 const DtReal top, 00045 const DtReal inc, 00046 const DtReal* data); 00047 00049 virtual ~Dt1DRegularTableFn(); 00050 00052 Dt1DRegularTableFn(const Dt1DRegularTableFn& orig); 00053 00055 Dt1DRegularTableFn(const DtString& name, const Dt1DRegularTableFn& orig, 00056 DtReaderWriterRegistry* parentRegistry = NULL); 00057 Dt1DRegularTableFn(const DtSymbolString& name, const Dt1DRegularTableFn& orig, 00058 DtReaderWriterRegistry* parentRegistry = NULL); 00059 00061 Dt1DRegularTableFn& operator=(const Dt1DRegularTableFn& orig); 00062 00064 virtual bool init(const DtReal value); 00065 00071 virtual bool init(const DtReal bottom, const DtReal top, const DtReal inc, 00072 const DtReal* data); 00073 00075 virtual bool init(const DtReal bottom, const DtReal top, const DtReal inc, 00076 const DtNLengthRealVector& data); 00077 00081 virtual const char* readerWriterType() const; 00082 00083 private: 00086 using DtBaseTableFunction::init; 00087 00088 public: 00089 00091 virtual DtReal lookup(DtReal coordinate1,...) const; 00092 virtual DtReal lookup(const DtReal* coordinates) const; 00093 00095 virtual DtReal integrate(DtReal lower, DtReal upper,...) const; 00096 00098 virtual void getSelf(DtlObjPtr args, const DtFilename& searchPath, 00099 const DtVariableBindingsList& variableBindings); 00100 00102 virtual void putData(FILE* fp, int indentLevel = 0); 00103 virtual DtlObjPtr getData(DtlObjPtr args, const DtFilename& searchPath, 00104 const DtVariableBindingsList& variableBindings); 00105 00107 void putSelf(FILE *fp, int indentLevel = 0, bool writeUnspecified = false, 00108 const DtFilename& path = DtReaderWriter::appPath()); 00109 00110 protected: 00111 00112 DtReal mySpan; 00113 DtRwReal myDomainTop; 00114 DtRwReal myDomainBottom; 00115 DtRwReal myInc; 00116 DtNLengthRealVector myData; 00117 DtReal * myDomain; 00118 DtReal * mySlope; 00119 00120 }; 00121 00122 #endif