mbsimflexiblebody  4.0.0
MBSim Flexible Body Module
openmbv_utils.h
1/* Copyright (C) 2004-2016 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 _MBSIMFLEX_OPENMBV_UTILS_H_
21#define _MBSIMFLEX_OPENMBV_UTILS_H_
22
23#include <mbsim/utils/openmbv_utils.h>
24#include <openmbvcppinterface/dynamicpointset.h>
25#include <openmbvcppinterface/dynamicindexedlineset.h>
26#include <openmbvcppinterface/dynamicindexedfaceset.h>
27#include <openmbvcppinterface/dynamicnurbscurve.h>
28#include <openmbvcppinterface/dynamicnurbssurface.h>
29
30namespace MBSimFlexibleBody {
31
33 public:
34 enum ColorRepresentation {
35 none=0,
36 xDisplacement,
37 yDisplacement,
38 zDisplacement,
39 totalDisplacement,
40 xxStress,
41 yyStress,
42 zzStress,
43 xyStress,
44 yzStress,
45 zxStress,
46 equivalentStress
47 };
48 public:
49 OpenMBVFlexibleBody(unsigned int cR=0, double minCol=0, double maxCol=1, const fmatvec::Vec3 &dc="[-1;1;1]", double tp=0, double ps=0, double lw=0);
50 };
51
53 public:
54 enum Visualization {
55 points=0,
56 lines,
57 faces
58 };
59 OpenMBVExternalFlexibleFfrBody(Visualization visu_=points, unsigned int cR=0, double minCol=0, double maxCol=1, const fmatvec::Vec3 &dc="[-1;1;1]", double tp=0, double ps=0, double lw=0) : OpenMBVFlexibleBody(cR,minCol,maxCol,dc,tp,ps,lw), visu(visu_) { }
60 void initializeUsingXML(xercesc::DOMElement *element);
61 std::shared_ptr<OpenMBV::FlexibleBody> createOpenMBV();
62 Visualization getVisualization() const { return visu; }
63 private:
64 Visualization visu;
65 };
66
68 public:
69 OpenMBVDynamicNurbsCurve(const fmatvec::Vec3 &dc="[-1;1;1]", double tp=0, double ps=0, double lw=0) : MBSim::OpenMBVColoredBody(dc,tp,ps,lw) { }
70 std::shared_ptr<OpenMBV::DynamicNurbsCurve> createOpenMBV();
71 };
72
74 public:
75 OpenMBVDynamicNurbsSurface(const fmatvec::Vec3 &dc="[-1;1;1]", double tp=0, double ps=0, double lw=0) : MBSim::OpenMBVColoredBody(dc,tp,ps,lw) { }
76 std::shared_ptr<OpenMBV::DynamicNurbsSurface> createOpenMBV();
77 };
78
79}
80
81#endif
Definition: openmbv_utils.h:67
Definition: openmbv_utils.h:73
Definition: openmbv_utils.h:32