Ignition Rendering

API Reference

5.1.0
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 IGNITION_RENDERING_BASE_BASESENSOR_HH_
18 #define IGNITION_RENDERING_BASE_BASESENSOR_HH_
19 
21 
22 namespace ignition
23 {
24  namespace rendering
25  {
26  inline namespace IGNITION_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 = IGN_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
#define IGN_VISIBILITY_ALL
Render everything visibility mask.
Definition: RenderTypes.hh:26
Definition: BaseSensor.hh:29
Represents a scene sensor. The most obvious example is a camera, but it can be anything that generate...
Definition: Sensor.hh:32
BaseSensor()
Definition: BaseSensor.hh:49
virtual ~BaseSensor()
Definition: BaseSensor.hh:55
virtual void SetVisibilityMask(uint32_t _mask) override
Set visibility mask.
Definition: BaseSensor.hh:61
virtual uint32_t VisibilityMask() const override
Get visibility mask.
Definition: BaseSensor.hh:68