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
25namespace MBSim {
26
27 class FixedRelativeFrame;
28
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 std::shared_ptr<OpenMBV::Group> getContoursOpenMBVGrp() override { return getOpenMBVGrp(); }
51 H5::GroupBase *getContoursPlotGroup() override { return getPlotGroup(); }
52 /***************************************************/
53
54 void init(InitStage stage, const InitConfigSet &config) override;
55 Contour* getContourElement(int i) {
56 return element[i];
57 }
58 Contour* getContour(int i) { return element[i]; }
59 void addContour(RigidContour* c);
60 void addFrame(FixedRelativeFrame* f);
61 unsigned int getNumberOfElements() { return element.size(); }
62
63 void resetUpToDate() override;
64
65 protected:
69 std::vector<RigidContour*> element;
70
74 std::vector<FixedRelativeFrame*> frame;
75
79 std::vector<fmatvec::SqrMat3> AIK;
80
81 std::shared_ptr<OpenMBV::Group> openMBVGroup;
82 };
83}
84
85#endif /* _COMPOUND_CONTOUR_H_ */
86
contour consisting of primitive contour elements
Definition: compound_contour.h:34
void plot() override
plots time dependent data
Definition: compound_contour.cc:46
std::vector< FixedRelativeFrame * > frame
List of all frames on the contour.
Definition: compound_contour.h:74
std::vector< RigidContour * > element
list of all subelements
Definition: compound_contour.h:69
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: compound_contour.cc:57
std::vector< fmatvec::SqrMat3 > AIK
Orientations of the single elements in the contour frame.
Definition: compound_contour.h:79
CompoundContour(const std::string &name="", Frame *R=nullptr)
constructor
Definition: compound_contour.cc: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
InitStage
The stages of the initialization.
Definition: element.h:62
H5::GroupBase * getPlotGroup()
Definition: element.h:139
std::string name
name of element
Definition: element.h:260
cartesian frame on rigid bodies
Definition: fixed_relative_frame.h:31
cartesian frame on bodies used for application of e.g. links and loads
Definition: frame.h:39
basic class for rigid contours
Definition: rigid_contour.h:37
Frame * R
coordinate system of contour
Definition: rigid_contour.h:135
namespace MBSim
Definition: bilateral_constraint.cc:30