mbsim  4.0.0
MBSim Kernel
compound_contour.h
1 /* Copyright (C) 2004-2009 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: martin.o.foerg@googlemail.com
18  */
19 
20 #ifndef _COMPOUND_CONTOUR_H_
21 #define _COMPOUND_CONTOUR_H_
22 
23 #include "mbsim/contours/rigid_contour.h"
24 
25 namespace MBSim {
26 
27  class FixedRelativeFrame;
28 
34  class CompoundContour : public RigidContour {
35  public:
40  CompoundContour(const std::string &name="", Frame *R=nullptr);
41 
45  ~CompoundContour() override;
46 
47  /* INHERITED INTERFACE OF ELEMENT */
48  void plot() override;
49  std::shared_ptr<OpenMBV::Group> getOpenMBVGrp() override { return openMBVGroup; }
50  /***************************************************/
51 
52  void init(InitStage stage, const InitConfigSet &config) override;
53  Contour* getContourElement(int i) {
54  return element[i];
55  }
56  Contour* getContour(int i) { return element[i]; }
57  void addContour(RigidContour* c);
58  void addFrame(FixedRelativeFrame* f);
59  unsigned int getNumberOfElements() { return element.size(); }
60 
61  void resetUpToDate() override;
62 
63  protected:
67  std::vector<RigidContour*> element;
68 
72  std::vector<FixedRelativeFrame*> frame;
73 
77  std::vector<fmatvec::SqrMat3> AIK;
78 
79  std::shared_ptr<OpenMBV::Group> openMBVGroup;
80  };
81 }
82 
83 #endif /* _COMPOUND_CONTOUR_H_ */
84 
basic class for rigid contours
Definition: rigid_contour.h:37
contour consisting of primitive contour elements
Definition: compound_contour.h:34
void plot() override
plots time dependent data
Definition: compound_contour.cc:46
cartesian frame on rigid bodies
Definition: fixed_relative_frame.h:31
~CompoundContour() override
destructor
Definition: compound_contour.cc:34
basic class for contour definition for rigid (which do not know about their shape) and flexible (they...
Definition: contour.h:40
std::vector< fmatvec::SqrMat3 > AIK
Orientations of the single elements in the contour frame.
Definition: compound_contour.h:77
std::vector< RigidContour * > element
list of all subelements
Definition: compound_contour.h:67
CompoundContour(const std::string &name="", Frame *R=nullptr)
constructor
Definition: compound_contour.cc:31
InitStage
The stages of the initialization.
Definition: element.h:62
std::vector< FixedRelativeFrame * > frame
List of all frames on the contour.
Definition: compound_contour.h:72
std::string name
name of element
Definition: element.h:235
cartesian frame on bodies used for application of e.g. links and loads
Definition: frame.h:39
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: compound_contour.cc:57
Frame * R
coordinate system of contour
Definition: rigid_contour.h:130
namespace MBSim
Definition: eigenanalyzer.cc:47