Ignition Rendering

API Reference

4.1.0
OgreNode.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_OGRE_OGRENODE_HH_
18 #define IGNITION_RENDERING_OGRE_OGRENODE_HH_
19 
23 
24 namespace Ogre
25 {
26  class SceneNode;
27 }
28 
29 namespace ignition
30 {
31  namespace rendering
32  {
33  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
34  //
35  class IGNITION_RENDERING_OGRE_VISIBLE OgreNode :
36  public BaseNode<OgreObject>
37  {
38  protected: OgreNode();
39 
40  public: virtual ~OgreNode();
41 
42  public: virtual bool HasParent() const override;
43 
44  public: virtual NodePtr Parent() const override;
45 
46  public: virtual Ogre::SceneNode *Node() const;
47 
48  public: virtual void Destroy() override;
49 
50  // Documentation inherited.
51  public: virtual math::Vector3d LocalScale() const override;
52 
53  // Documentation inherited.
54  public: virtual bool InheritScale() const override;
55 
56  // Documentation inherited.
57  public: virtual void SetInheritScale(bool _inherit) override;
58 
59  // Documentation inherited.
60  protected: virtual void SetLocalScaleImpl(
61  const math::Vector3d &_scale) override;
62 
63  protected: virtual NodeStorePtr Children() const override;
64 
65  protected: virtual bool AttachChild(NodePtr _child) override;
66 
67  protected: virtual bool DetachChild(NodePtr _child) override;
68 
69  protected: virtual math::Pose3d RawLocalPose() const override;
70 
71  protected: virtual void SetRawLocalPose(const math::Pose3d &_Pose3d)
72  override;
73 
74  protected: virtual math::Vector3d RawLocalPosition() const;
75 
76  protected: virtual void SetRawLocalPosition(
77  const math::Vector3d &_position);
78 
79  protected: virtual math::Quaterniond RawLocalRotation() const;
80 
81  protected: virtual void SetRawLocalRotation(
82  const math::Quaterniond &_rotation);
83 
84  protected: virtual void SetParent(OgreNodePtr _parent);
85 
86  protected: virtual void Load() override;
87 
88  protected: virtual void Init() override;
89 
90  protected: OgreNodePtr parent;
91 
92  protected: Ogre::SceneNode *ogreNode = nullptr;
93 
95 
96  private: OgreNodePtr SharedThis();
97 
98  // TODO(anyone): remove the need for a visual friend class
99  private: friend class OgreVisual;
100  };
101  }
102  }
103 }
104 #endif
OgreNodePtr parent
Definition: OgreNode.hh:90
OgreNodeStorePtr children
Definition: OgreNode.hh:94
Represents a single posable node in the scene graph.
Definition: Node.hh:37
Definition: OgreCamera.hh:27
Definition: OgreNode.hh:35
Definition: OgreVisual.hh:32
Definition: BaseNode.hh:32