Ignition Rendering

API Reference

5.0.0
Ogre2Node.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 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_OGRE2_OGRE2NODE_HH_
18 #define IGNITION_RENDERING_OGRE2_OGRE2NODE_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  //
36  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2Node :
37  public BaseNode<Ogre2Object>
38  {
40  protected: Ogre2Node();
41 
43  public: virtual ~Ogre2Node();
44 
45  // Documentation inherited.
46  public: virtual bool HasParent() const override;
47 
48  // Documentation inherited.
49  public: virtual NodePtr Parent() const override;
50 
53  public: virtual Ogre::SceneNode *Node() const;
54 
55  // Documentation inherited.
56  public: virtual void Destroy() override;
57 
58  // Documentation inherited.
59  public: virtual math::Vector3d LocalScale() const override;
60 
61  // Documentation inherited.
62  public: virtual bool InheritScale() const override;
63 
64  // Documentation inherited.
65  public: virtual void SetInheritScale(bool _inherit) override;
66 
67  // Documentation inherited.
68  protected: virtual void SetLocalScaleImpl(
69  const math::Vector3d &_scale) override;
70 
71  // Documentation inherited.
72  protected: virtual NodeStorePtr Children() const override;
73 
74  // Documentation inherited.
75  protected: virtual bool AttachChild(NodePtr _child) override;
76 
77  // Documentation inherited.
78  protected: virtual bool DetachChild(NodePtr _child) override;
79 
80  // Documentation inherited.
81  protected: virtual math::Pose3d RawLocalPose() const override;
82 
83  // Documentation inherited.
84  protected: virtual void SetRawLocalPose(const math::Pose3d &_Pose3d)
85  override;
86 
89  protected: virtual math::Vector3d RawLocalPosition() const;
90 
93  protected: virtual void SetRawLocalPosition(
94  const math::Vector3d &_position);
95 
98  protected: virtual math::Quaterniond RawLocalRotation() const;
99 
102  protected: virtual void SetRawLocalRotation(
103  const math::Quaterniond &_rotation);
104 
107  protected: virtual void SetParent(Ogre2NodePtr _parent);
108 
109  // Documentation inherited.
110  protected: virtual void Load() override;
111 
112  // Documentation inherited.
113  protected: virtual void Init() override;
114 
116  private: Ogre2NodePtr SharedThis();
117 
119  protected: Ogre2NodePtr parent;
120 
122  protected: Ogre::SceneNode *ogreNode = nullptr;
123 
126 
127  // TODO(anyone): remove the need for a visual friend class
128  private: friend class Ogre2Visual;
129  };
130  }
131  }
132 }
133 #endif
Ogre2.x implementation of the visual class.
Definition: Ogre2Visual.hh:37
Ogre2.x implementation of the Node class.
Definition: Ogre2Node.hh:36
Represents a single posable node in the scene graph.
Definition: Node.hh:37
Ogre2NodeStorePtr children
A list of child nodes.
Definition: Ogre2Node.hh:125
Ogre2NodePtr parent
Pointer to the parent ogre node.
Definition: Ogre2Node.hh:119
Definition: OgreCamera.hh:27
Definition: BaseNode.hh:32