ApplyWrenchVisual.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 
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 
65  public: void SetCoM(const ignition::math::Vector3d &_comVector);
66 
70  public: void SetForcePos(const ignition::math::Vector3d &_forcePosVector);
71 
76  public: void SetForce(const ignition::math::Vector3d &_forceVector,
77  const bool _rotatedByMouse);
78 
83  public: void SetTorque(const ignition::math::Vector3d &_torqueVector,
84  const bool _rotatedByMouse);
85 
88  public: void UpdateForceVisual();
89 
92  public: void UpdateTorqueVisual();
93 
95  public: void Resize();
96 
99  public: rendering::VisualPtr GetForceVisual() const;
100 
103  public: rendering::VisualPtr GetTorqueVisual() const;
104 
107  public: rendering::SelectionObjPtr GetRotTool() const;
108 
112  public: void SetMode(Mode _mode);
113  };
115  }
116 }
117 #endif
Visualization for the apply wrench GUI.
Definition: ApplyWrenchVisual.hh:34
Mode
Definition: ApplyWrenchVisual.hh:38
A renderable object.
Definition: Visual.hh:60
std::shared_ptr< SelectionObj > SelectionObjPtr
Definition: RenderTypes.hh:190
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:114
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59