Gazebo Rendering

API Reference

6.6.3
gz/rendering/JointVisual.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 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_JOINTVISUAL_HH_
18 #define IGNITION_RENDERING_JOINTVISUAL_HH_
19 
20 #include <string>
21 
22 #include <ignition/math/Vector3.hh>
23 
28 
29 namespace ignition
30 {
31  namespace rendering
32  {
33  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
34  //
36  enum IGNITION_RENDERING_VISIBLE JointVisualType
37  {
39  JVT_NONE = 0,
40 
43 
46 
49 
52 
54  JVT_BALL = 5,
55 
57  JVT_SCREW = 6,
58 
61 
64  };
65 
69  class IGNITION_RENDERING_VISIBLE JointVisual :
70  public virtual Visual
71  {
73  public: virtual ~JointVisual() {}
74 
79  public: virtual void SetAxis(const ignition::math::Vector3d &_axis,
80  bool _useParentFrame = false) = 0;
81 
84  public: virtual ignition::math::Vector3d Axis() const = 0;
85 
92  public: virtual void SetParentAxis(
93  const ignition::math::Vector3d &_axis,
94  const std::string &_parentName,
95  bool _useParentFrame = false) = 0;
96 
99  public: virtual ignition::math::Vector3d ParentAxis() const = 0;
100 
106  public: virtual bool UpdateAxis(const ignition::math::Vector3d &_axis,
107  bool _useParentFrame = false) = 0;
108 
114  public: virtual bool UpdateParentAxis(
115  const ignition::math::Vector3d &_axis,
116  bool _useParentFrame = false) = 0;
117 
120  public: virtual void SetType(const JointVisualType _type) = 0;
121 
124  public: virtual JointVisualType Type() const = 0;
125 
128  public: virtual JointVisualPtr ParentAxisVisual() const = 0;
129 
133  public: virtual ArrowVisualPtr ArrowVisual() const = 0;
134  };
135  }
136  }
137 }
138 #endif
STL class.
STL class.
virtual void SetParentAxis(const ignition::math::Vector3d &_axis, const std::string &_parentName, bool _useParentFrame=false)=0
Create a parent axis for hinge2 and universal joint types and attach it to the joint visual.
virtual ignition::math::Vector3d Axis() const =0
Get axis vector.
Represents a joint visual.
Definition: gz/rendering/JointVisual.hh:69
@ JVT_GEARBOX
Gearbox joint type.
Definition: gz/rendering/JointVisual.hh:60
virtual JointVisualPtr ParentAxisVisual() const =0
Get the JointVisual which is attached to the parent.
@ JVT_BALL
Ball joint type.
Definition: gz/rendering/JointVisual.hh:54
JointVisualType
Enum for JointVisual types.
Definition: gz/rendering/JointVisual.hh:36
@ JVT_REVOLUTE2
Revolute2 joint type.
Definition: gz/rendering/JointVisual.hh:45
@ JVT_FIXED
Fixed joint type.
Definition: gz/rendering/JointVisual.hh:63
virtual void SetAxis(const ignition::math::Vector3d &_axis, bool _useParentFrame=false)=0
Create an axis and attach it to the joint visual.
@ JVT_SCREW
Screw joint type.
Definition: gz/rendering/JointVisual.hh:57
Represents a visual node in a scene graph. A Visual is the only node that can have Geometry and other...
Definition: gz/rendering/Visual.hh:33
virtual ArrowVisualPtr ArrowVisual() const =0
Get the arrow visual which represents the axis attached to the child.
@ JVT_UNIVERSAL
Universal joint type.
Definition: gz/rendering/JointVisual.hh:51
virtual ~JointVisual()
Destructor.
Definition: gz/rendering/JointVisual.hh:73
virtual bool UpdateAxis(const ignition::math::Vector3d &_axis, bool _useParentFrame=false)=0
Update an axis' arrow visual.
@ JVT_PRISMATIC
Prismatic joint type.
Definition: gz/rendering/JointVisual.hh:48
virtual JointVisualType Type() const =0
Get joint visual type.
@ JVT_REVOLUTE
Revolute joint type.
Definition: gz/rendering/JointVisual.hh:42
virtual ignition::math::Vector3d ParentAxis() const =0
Get parent axis vector.
virtual void SetType(const JointVisualType _type)=0
Set type for joint visual.
virtual bool UpdateParentAxis(const ignition::math::Vector3d &_axis, bool _useParentFrame=false)=0
Update the parent axis' arrow visual if it exists.
@ JVT_NONE
No type.
Definition: gz/rendering/JointVisual.hh:39
Represents a arrow composite visual.
Definition: gz/rendering/ArrowVisual.hh:31