Gazebo Rendering

API Reference

8.2.1
BaseSensor.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 #ifndef GZ_RENDERING_BASE_BASESENSOR_HH_
18 #define GZ_RENDERING_BASE_BASESENSOR_HH_
19 
20 #include "gz/rendering/Sensor.hh"
21 
22 namespace gz
23 {
24  namespace rendering
25  {
26  inline namespace GZ_RENDERING_VERSION_NAMESPACE {
27  //
28  template <class T>
29  class BaseSensor :
30  public virtual Sensor,
31  public virtual T
32  {
33  protected: BaseSensor();
34 
35  public: virtual ~BaseSensor();
36 
37  // Documentation inherited.
38  public: virtual void SetVisibilityMask(uint32_t _mask) override;
39 
40  // Documentation inherited.
41  public: virtual uint32_t VisibilityMask() const override;
42 
44  protected: uint32_t visibilityMask = GZ_VISIBILITY_ALL;
45  };
46 
48  template <class T>
50  {
51  }
52 
54  template <class T>
56  {
57  }
58 
60  template <class T>
61  void BaseSensor<T>::SetVisibilityMask(uint32_t _mask)
62  {
63  this->visibilityMask = _mask;
64  }
65 
67  template <class T>
69  {
70  return this->visibilityMask;
71  }
72  }
73  }
74 }
75 #endif