Ignition Rendering

API Reference

5.1.0
Node.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 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 IGNITION_RENDERING_NODE_HH_
18 #define IGNITION_RENDERING_NODE_HH_
19 
20 #include <string>
21 #include <ignition/math/Pose3.hh>
23 
24 #include "ignition/rendering/config.hh"
27 #include "ignition/rendering/Export.hh"
28 
29 namespace ignition
30 {
31  namespace rendering
32  {
33  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
34  //
37  class IGNITION_RENDERING_VISIBLE Node :
38  public virtual Object
39  {
41  public: virtual ~Node() { }
42 
45  public: virtual bool HasParent() const = 0;
46 
49  public: virtual NodePtr Parent() const = 0;
50 
53  public: virtual void RemoveParent() = 0;
54 
57  public: virtual math::Pose3d LocalPose() const = 0;
58 
61  public: virtual void SetLocalPose(const math::Pose3d &_pose) = 0;
62 
65  public: virtual math::Vector3d LocalPosition() const = 0;
66 
71  public: virtual void SetLocalPosition(double _x, double _y,
72  double _z) = 0;
73 
76  public: virtual void SetLocalPosition(
77  const math::Vector3d &_position) = 0;
78 
81  public: virtual math::Quaterniond LocalRotation() const = 0;
82 
87  public: virtual void SetLocalRotation(double _r, double _p,
88  double _y) = 0;
89 
95  public: virtual void SetLocalRotation(double _w, double _x, double _y,
96  double _z) = 0;
97 
100  public: virtual void SetLocalRotation(
101  const math::Quaterniond &_rotation) = 0;
102 
105  public: virtual math::Pose3d WorldPose() const = 0;
106 
109  public: virtual void SetWorldPose(const math::Pose3d &_pose) = 0;
110 
113  public: virtual math::Vector3d WorldPosition() const = 0;
114 
119  public: virtual void SetWorldPosition(double _x, double _y,
120  double _z) = 0;
121 
124  public: virtual void SetWorldPosition(
125  const math::Vector3d &_position) = 0;
126 
129  public: virtual math::Quaterniond WorldRotation() const = 0;
130 
135  public: virtual void SetWorldRotation(double _r, double _p,
136  double _y) = 0;
137 
143  public: virtual void SetWorldRotation(double _w, double _x, double _y,
144  double _z) = 0;
145 
148  public: virtual void SetWorldRotation(
149  const math::Quaterniond &_rotation) = 0;
150 
153  public: virtual math::Pose3d WorldToLocal(
154  const math::Pose3d &_pose) const = 0;
155 
158  public: virtual math::Vector3d Origin() const = 0;
159 
165  public: virtual void SetOrigin(double _x, double _y, double _z) = 0;
166 
170  public: virtual void SetOrigin(const math::Vector3d &_origin) = 0;
171 
174  public: virtual math::Vector3d LocalScale() const = 0;
175 
179  public: virtual void SetLocalScale(double _scale) = 0;
180 
185  public: virtual void SetLocalScale(double _x, double _y, double _z) = 0;
186 
189  public: virtual void SetLocalScale(const math::Vector3d &_scale) = 0;
190 
193  public: virtual math::Vector3d WorldScale() const = 0;
194 
198  public: virtual void SetWorldScale(double _scale) = 0;
199 
204  public: virtual void SetWorldScale(double _x, double _y, double _z) = 0;
205 
208  public: virtual void SetWorldScale(const math::Vector3d &_scale) = 0;
209 
213  public: virtual void Scale(double _scale) = 0;
214 
219  public: virtual void Scale(double _x, double _y, double _z) = 0;
220 
223  public: virtual void Scale(const math::Vector3d &_scale) = 0;
224 
227  public: virtual bool InheritScale() const = 0;
228 
231  public: virtual void SetInheritScale(bool _inherit) = 0;
232 
235  public: virtual unsigned int ChildCount() const = 0;
236 
239  public: virtual bool HasChild(ConstNodePtr _child) const = 0;
240 
244  public: virtual bool HasChildId(unsigned int _id) const = 0;
245 
249  public: virtual bool HasChildName(const std::string &_name) const = 0;
250 
255  public: virtual NodePtr ChildById(unsigned int _id) const = 0;
256 
261  public: virtual NodePtr ChildByName(
262  const std::string &_name) const = 0;
263 
268  public: virtual NodePtr ChildByIndex(unsigned int _index) const = 0;
269 
273  public: virtual void AddChild(NodePtr _child) = 0;
274 
279  public: virtual NodePtr RemoveChild(NodePtr _child) = 0;
280 
286  public: virtual NodePtr RemoveChildById(unsigned int _id) = 0;
287 
293  public: virtual NodePtr RemoveChildByName(const std::string &_name) = 0;
294 
300  public: virtual NodePtr RemoveChildByIndex(unsigned int _index) = 0;
301 
304  public: virtual void RemoveChildren() = 0;
305  };
306  }
307  }
308 }
309 #endif
Represents a single posable node in the scene graph.
Definition: Node.hh:37
STL class.
virtual ~Node()
Destructor.
Definition: Node.hh:41
Represents an object present in the scene graph. This includes sub-meshes, materials, render targets, as well as posable nodes.
Definition: Object.hh:34