Privacy
An open-source, flexible 3D physical simulation framework
utils.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011, 2012, DFKI GmbH Robotics Innovation Center
3  *
4  * This file is part of the MARS simulation framework.
5  *
6  * MARS is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation, either version 3
9  * of the License, or (at your option) any later version.
10  *
11  * MARS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with MARS. If not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 #ifndef MARS_INTERFACES_UTILS_H
22 #define MARS_INTERFACES_UTILS_H
23 
24 
25 
26 #include "MARSDefs.h"
27 #include "sim_common.h"
28 #include "NodeData.h"
29 
30 
31 #include <string>
32 
33 namespace mars {
34 
35  namespace interfaces {
36 
38  void getAbsFromRel(const NodeData &node1, NodeData *node2);
39  void getRelFromAbs(const NodeData &node1, NodeData *node2);
40 
44  JointType getJointType(const std::string &text);
45 
49  const char* getJointTypeString(JointType type);
50 
51  } // end of namespace interfaces
52 
53 } // namespace mars
54 
55 #endif /* MARS_INTERFACES_UTILS_H */
const char * getJointTypeString(JointType type)
Return a string for the joint-type.
Definition: utils.cpp:65
void getAbsFromRel(const NodeData &node1, NodeData *node2)
get the absolute position of a new node by its relative position
Definition: utils.cpp:43
void getRelFromAbs(const NodeData &node1, NodeData *node2)
Definition: utils.cpp:48
Copyright 2012, DFKI GmbH Robotics Innovation Center.
JointType getJointType(const std::string &text)
Helper function to get type-id from string in scene file.
Definition: utils.cpp:77