ApplyWrenchVisual.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-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 
18 #ifndef _GAZEBO_APPLYWRENCHVISUAL_HH_
19 #define _GAZEBO_APPLYWRENCHVISUAL_HH_
20 
21 #include <string>
22 
24 
25 namespace gazebo
26 {
27  namespace rendering
28  {
31 
35  {
38  public: enum Mode
39  {
41  NONE = 0,
43  FORCE = 1,
45  TORQUE = 2
46  };
47 
51  public: ApplyWrenchVisual(const std::string &_name, VisualPtr _parentVis);
52 
54  public: virtual ~ApplyWrenchVisual();
55 
56  // Documentation inherited.
57  public: void Load();
58 
59  // Documentation inherited.
60  public: virtual void Fini();
61 
66  public: void SetCoM(const math::Vector3 &_comVector)
67  GAZEBO_DEPRECATED(7.0);
68 
72  public: void SetCoM(const ignition::math::Vector3d &_comVector);
73 
78  public: void SetForcePos(const math::Vector3 &_forcePosVector)
79  GAZEBO_DEPRECATED(7.0);
80 
84  public: void SetForcePos(const ignition::math::Vector3d &_forcePosVector);
85 
91  public: void SetForce(const math::Vector3 &_forceVector,
92  const bool _rotatedByMouse) GAZEBO_DEPRECATED(7.0);
93 
98  public: void SetForce(const ignition::math::Vector3d &_forceVector,
99  const bool _rotatedByMouse);
100 
106  public: void SetTorque(const math::Vector3 &_torqueVector,
107  const bool _rotatedByMouse) GAZEBO_DEPRECATED(7.0);
108 
113  public: void SetTorque(const ignition::math::Vector3d &_torqueVector,
114  const bool _rotatedByMouse);
115 
118  public: void UpdateForceVisual();
119 
122  public: void UpdateTorqueVisual();
123 
125  public: void Resize();
126 
129  public: rendering::VisualPtr GetForceVisual() const;
130 
133  public: rendering::VisualPtr GetTorqueVisual() const;
134 
137  public: rendering::SelectionObjPtr GetRotTool() const;
138 
142  public: void SetMode(Mode _mode);
143 
148  private: ignition::math::Quaterniond QuaternionFromVector(
149  const ignition::math::Vector3d &_dir);
150  };
152  }
153 }
154 #endif
Visualization for the apply wrench GUI.
Definition: ApplyWrenchVisual.hh:34
Forward declarations for the common classes.
Definition: Animation.hh:33
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:48
Mode
Definition: ApplyWrenchVisual.hh:38
A renderable object.
Definition: Visual.hh:59
std::shared_ptr< SelectionObj > SelectionObjPtr
Definition: RenderTypes.hh:188
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:112
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59