Gazebo Common

API Reference

3.17.0
gz/common/NodeTransform.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef GZ_COMMON_NODE_TRANSFORM_HH_
18 #define GZ_COMMON_NODE_TRANSFORM_HH_
19 #include <memory>
20 #include <string>
21 
22 #include <gz/math/Matrix4.hh>
23 #include <gz/math/Vector3.hh>
24 #include <gz/common/graphics/Export.hh>
25 #include <gz/common/Util.hh>
26 
27 namespace ignition
28 {
29  namespace common
30  {
32  class NodeTransformPrivate;
33 
36  class IGNITION_COMMON_GRAPHICS_VISIBLE NodeTransform
37  {
40  public: explicit NodeTransform(const NodeTransformType _type = MATRIX);
41 
44  public: NodeTransform(const NodeTransform &_other);
45 
48  public: NodeTransform &operator=(const NodeTransform &_other);
49 
54  public: NodeTransform(const math::Matrix4d &_mat,
55  const std::string &_sid = "_default_",
56  const NodeTransformType _type = MATRIX);
57 
59  public: ~NodeTransform();
60 
63  public: void Set(const math::Matrix4d &_mat);
64 
67  public: math::Matrix4d Get() const;
68 
71  public: void SetType(const NodeTransformType _type);
72 
75  public: NodeTransformType Type() const;
76 
79  public: void SetSID(const std::string &_sid);
80 
83  public: std::string SID() const;
84 
88  public: void SetComponent(const unsigned int _idx, const double _value);
89 
92  public: void SetSourceValues(const math::Matrix4d &_mat);
93 
96  public: void SetSourceValues(const math::Vector3d &_vec);
97 
101  public: void SetSourceValues(const math::Vector3d &_axis,
102  const double _angle);
103 
105  public: void RecalculateMatrix();
106 
108  public: void PrintSource() const;
109 
112  public: math::Matrix4d operator()() const;
113 
117  public: math::Matrix4d operator*(const NodeTransform &_t) const;
118 
122  public: math::Matrix4d operator*(const math::Matrix4d &_m) const;
123 
128  };
129  }
130 }
131 #endif
NodeTransformType
Enumeration of the transform types.
Definition: include/gz/common/Util.hh:105
Forward declarations for the common classes.
STL class.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Microsoft Visual Studio does not automatically export the interface information for member variables ...
Definition: gz/common/SuppressWarning.hh:65
@ MATRIX
Definition: include/gz/common/Util.hh:105
A transformation node.
Definition: gz/common/NodeTransform.hh:36
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: gz/common/SuppressWarning.hh:68