00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _COMPOUND_CONTOUR_H_
00021 #define _COMPOUND_CONTOUR_H_
00022
00023 #include "mbsim/contour.h"
00024 #include "mbsim/contours/contour_interpolation.h"
00025
00026 namespace MBSim {
00027
00033 class CompoundContour : public RigidContour {
00034 public:
00039 CompoundContour(const std::string &name="", Frame *R=0);
00040
00044 ~CompoundContour();
00045
00046
00047 std::string getType() const {
00048 return "CompoundContour";
00049 }
00050 virtual void plot(double t, double dt);
00051 #ifdef HAVE_OPENMBVCPPINTERFACE
00052 OpenMBV::Group* getOpenMBVGrp() { return openMBVGroup; }
00053 #endif
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 void init(InitStage stage);
00068 Contour* getContourElement(int i) {
00069 return element[i];
00070 }
00071 Contour* getContour(int i) { return element[i]; }
00072 void addContour(RigidContour* ce);
00073 void addFrame(FixedRelativeFrame* f);
00074 unsigned int getNumberOfElements() { return element.size(); }
00075
00076 void updateKinematicsForFrame(ContourPointData &cp, Frame::Feature ff);
00077 void updateJacobiansForFrame(ContourPointData &cp);
00078
00079 virtual void updateStateDependentVariables(double t);
00080 virtual void updateJacobians(double t, int j=0);
00081 virtual void updateStateDerivativeDependentVariables(const fmatvec::Vec &ud, double t);
00082
00083 protected:
00087 std::vector<RigidContour*> element;
00088
00092 std::vector<FixedRelativeFrame*> frame;
00093
00097 std::vector<fmatvec::SqrMat3> AIK;
00098
00099 #ifdef HAVE_OPENMBVCPPINTERFACE
00100 OpenMBV::Group* openMBVGroup;
00101 #endif
00102 };
00103 }
00104
00105 #endif
00106