All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AxisVisual.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2012 Nate Koenig
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 /* Desc: 3D Axis Visualization Class
18  * Author: Nate Koenig
19  */
20 
21 #ifndef _AXISVISUAL_HH_
22 #define _AXISVISUAL_HH_
23 
24 #include <string>
25 
26 #include "rendering/Visual.hh"
27 
28 namespace gazebo
29 {
30  namespace rendering
31  {
34 
37  class AxisVisual : public Visual
38  {
42  public: AxisVisual(const std::string &_name, VisualPtr _vis);
43 
45  public: virtual ~AxisVisual();
46 
48  public: virtual void Load();
49 
51  public: void ShowRotation(unsigned int _axis);
52 
55  public: void ScaleXAxis(const math::Vector3 &_scale);
56 
59  public: void ScaleYAxis(const math::Vector3 &_scale);
60 
63  public: void ScaleZAxis(const math::Vector3 &_scale);
64 
68  public: void SetAxisMaterial(unsigned int _axis,
69  const std::string &_material);
70 
71  private: ArrowVisualPtr xAxis;
72  private: ArrowVisualPtr yAxis;
73  private: ArrowVisualPtr zAxis;
74  };
76  }
77 }
78 #endif