Ignition Rendering

API Reference

0.1.0
RenderTarget.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") = 0;
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_RENDERTARGET_HH_
18 #define IGNITION_RENDERING_RENDERTARGET_HH_
19 
20 #include <string>
21 
22 #include <ignition/math/Color.hh>
23 
27 
28 namespace ignition
29 {
30  namespace rendering
31  {
34  class IGNITION_RENDERING_VISIBLE RenderTarget :
35  public virtual Object
36  {
38  public: virtual ~RenderTarget() { }
39 
42  public: virtual unsigned int Width() const = 0;
43 
46  public: virtual unsigned int Height() const = 0;
47 
50  public: virtual void SetWidth(const unsigned int _width) = 0;
51 
54  public: virtual void SetHeight(const unsigned int _height) = 0;
55 
58  public: virtual PixelFormat Format() const = 0;
59 
62  public: virtual void SetFormat(PixelFormat _format) = 0;
63 
70  public: virtual void Copy(Image &_image) const = 0;
71 
75  public: virtual math::Color BackgroundColor() const = 0;
76  };
77 
82  class IGNITION_RENDERING_VISIBLE RenderTexture :
83  public virtual RenderTarget
84  {
86  public: virtual ~RenderTexture() { }
87  };
88 
93  class IGNITION_RENDERING_VISIBLE RenderWindow :
94  public virtual RenderTarget
95  {
97  public: virtual ~RenderWindow() { }
98 
101  public: virtual std::string Handle() const = 0;
102 
105  public: virtual void SetHandle(const std::string &_handle) = 0;
106 
109  public: virtual double DevicePixelRatio() const = 0;
110 
113  public: virtual void SetDevicePixelRatio(const double _ratio) = 0;
114 
118  public: virtual void OnResize(unsigned int _width,
119  unsigned int _height) = 0;
120 
122  public: virtual void OnMove() = 0;
123  };
124  }
125 }
126 #endif
STL class.
Represents a render-target to which cameras can render images.
Definition: RenderTarget.hh:34
virtual ~RenderTexture()
Deconstructor.
Definition: RenderTarget.hh:86
Encapsulates a raw image buffer and relevant properties.
Definition: Image.hh:30
PixelFormat
Definition: PixelFormat.hh:29
Represents a off-screen render-texture to which cameras can render images.
Definition: RenderTarget.hh:82
Represents a on-screen render-window to which cameras can render images.
Definition: RenderTarget.hh:93
virtual ~RenderTarget()
Deconstructor.
Definition: RenderTarget.hh:38
virtual ~RenderWindow()
Deconstructor.
Definition: RenderTarget.hh:97
Definition: ArrowVisual.hh:22
Represents an object present in the scene graph. This includes sub-meshes, materials, render targets, as well as posable nodes.
Definition: Object.hh:31