00001
00002
00003
00004
00005 #ifndef __suPointKinematics_h__
00006 #define __suPointKinematics_h__
00007
00008
00009
00010
00011
00012 #include <rdMath.h>
00013 #include <rdTools.h>
00014 #include <rdStorage.h>
00015 #include <rdModel.h>
00016 #include <rdAnalysis.h>
00017 #include "suAnalysesDLL.h"
00018
00019
00020 const int suPointKinematics_NAME_LENGTH = 256;
00021 const int suPointKinematics_BUFFER_LENGTH = 2048;
00022
00023
00024
00032 class SUANALYSES_API suPointKinematics : public rdAnalysis
00033 {
00034
00035
00036
00037 public:
00038 static const int NAME_LENGTH;
00039 static const int BUFFER_LENGTH;
00040 private:
00041 char _buffer[suPointKinematics_BUFFER_LENGTH];
00042 char _tmp[suPointKinematics_BUFFER_LENGTH];
00043 protected:
00044 int _body;
00045 double _point[3];
00046 char _pointName[suPointKinematics_NAME_LENGTH];
00047 double *_dy;
00048 double *_kin;
00049 rdStorage *_pStore;
00050 rdStorage *_vStore;
00051 rdStorage *_aStore;
00052
00053
00054
00055
00056 public:
00057 suPointKinematics(rdModel *aModel);
00058 virtual ~suPointKinematics();
00059 private:
00060 void setNull();
00061 void constructDescription();
00062 void constructColumnLabels();
00063 void allocateStorage();
00064 void deleteStorage();
00065
00066 public:
00067
00068
00069
00070
00071 void setBody(int aBody);
00072 int getBody();
00073
00074 void setPoint(double aPoint[3]);
00075 void getPoint(double rPoint[3]);
00076
00077 void setPointName(const char *aName);
00078 const char* getPointName();
00079
00080 void setStorageCapacityIncrements(int aIncrement);
00081 rdStorage* getAccelerationStorage();
00082 rdStorage* getVelocityStorage();
00083 rdStorage* getPositionStorage();
00084
00085
00086
00087
00088 virtual int
00089 begin(int aStep,double aDT,double aT,double *aX,double *aY,
00090 void *aClientData=NULL);
00091 virtual int
00092 analyze(double *aXPrev,double *aYPrev,
00093 int aStep,double aDT,double aT,double *aX,double *aY,
00094 void *aClientData=NULL);
00095 virtual int
00096 end(int aStep,double aDT,double aT,double *aX,double *aY,
00097 void *aClientData=NULL);
00098 protected:
00099 virtual int
00100 record(double aT,double *aX,double *aY);
00101
00102
00103
00104
00105 public:
00106 virtual int
00107 printResults(char *aBaseName,char *aDir=NULL,double aDT=-1.0,
00108 char *aExtension=".sto");
00109
00110
00111 };
00112
00113
00114
00115
00116 #endif // #ifndef __suPointKinematics_h__