GpuLaserPrivate.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 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_RENDERING_GPULASER_PRIVATE_HH_
19 #define _GAZEBO_RENDERING_GPULASER_PRIVATE_HH_
20 
21 #include <string>
22 #include <vector>
23 
25 
26 #include "gazebo/common/Event.hh"
27 
28 namespace Ogre
29 {
30  class Camera;
31  class Material;
32  class MovableObject;
33  class RenderTarget;
34  class SceneNode;
35  class Texture;
36  class Viewport;
37 }
38 
39 namespace gazebo
40 {
41  namespace common
42  {
43  class Mesh;
44  }
45 
46  namespace rendering
47  {
51  {
58  public: event::EventT<void(const float *_frame, unsigned int _width,
59  unsigned int _height, unsigned int _depth,
60  const std::string &_format)> newLaserFrame;
61 
63  public: float *laserBuffer;
64 
66  public: float *laserScan;
67 
69  public: Ogre::Material *matFirstPass;
70 
72  public: Ogre::Material *matSecondPass;
73 
75  public: Ogre::Texture *firstPassTextures[3];
76 
78  public: Ogre::Texture *secondPassTexture;
79 
81  public: Ogre::RenderTarget *firstPassTargets[3];
82 
84  public: Ogre::RenderTarget *secondPassTarget;
85 
87  public: Ogre::Viewport *firstPassViewports[3];
88 
90  public: Ogre::Viewport *secondPassViewport;
91 
93  public: unsigned int textureCount;
94 
96  public: double cameraYaws[4];
97 
99  public: Ogre::RenderTarget *currentTarget;
100 
102  public: Ogre::Material *currentMat;
103 
106  public: Ogre::Camera *orthoCam;
107 
109  public: Ogre::SceneNode *pitchNodeOrtho;
110 
114 
116  public: Ogre::MovableObject *object;
117 
119  public: VisualPtr visual;
120 
122  public: unsigned int w2nd;
123 
125  public: unsigned int h2nd;
126 
128  public: double lastRenderDuration;
129 
132  public: std::vector<int> texIdx;
133 
135  public: static int texCount;
136  };
137  }
138 }
139 #endif
A 3D mesh.
Definition: Mesh.hh:44
Ogre::Texture * firstPassTextures[3]
An array of first pass textures.
Definition: GpuLaserPrivate.hh:75
std::vector< int > texIdx
List of texture unit indices used during the second rendering pass.
Definition: GpuLaserPrivate.hh:132
Ogre::Material * matFirstPass
Pointer to Ogre material for the first rendering pass.
Definition: GpuLaserPrivate.hh:69
float * laserBuffer
Raw buffer of laser data.
Definition: GpuLaserPrivate.hh:63
event::EventT< void(const float *_frame, unsigned int _width, unsigned int _height, unsigned int _depth, const std::string &_format)> newLaserFrame
Event triggered when new laser range data are available.
Definition: GpuLaserPrivate.hh:60
Ogre::Camera * orthoCam
Ogre orthorgraphic camera used in the second pass for undistortion.
Definition: GpuLaserPrivate.hh:106
static int texCount
Number of second pass texture units created.
Definition: GpuLaserPrivate.hh:135
Ogre::Viewport * firstPassViewports[3]
First pass viewports.
Definition: GpuLaserPrivate.hh:87
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:112
Ogre::MovableObject * object
Ogre movable object created from the canvas mesh.
Definition: GpuLaserPrivate.hh:116
Ogre::RenderTarget * secondPassTarget
Second pass render target.
Definition: GpuLaserPrivate.hh:84
Ogre::Material * matSecondPass
Pointer to Ogre material for the sencod rendering pass.
Definition: GpuLaserPrivate.hh:72
double lastRenderDuration
Time taken to complete the two rendering passes.
Definition: GpuLaserPrivate.hh:128
common::Mesh * undistMesh
Ogre mesh used to create a canvas for undistorting range values in the second rendering pass...
Definition: GpuLaserPrivate.hh:113
unsigned int textureCount
Number of first pass textures.
Definition: GpuLaserPrivate.hh:93
Ogre::Material * currentMat
Temporary pointer to the current material.
Definition: GpuLaserPrivate.hh:102
Ogre::SceneNode * pitchNodeOrtho
Ogre scenenode where the orthorgraphic camera is attached to.
Definition: GpuLaserPrivate.hh:109
float * laserScan
Outgoing laser data, used by newLaserFrame event.
Definition: GpuLaserPrivate.hh:66
double cameraYaws[4]
A list of camera angles for first pass rendering.
Definition: GpuLaserPrivate.hh:96
Ogre::Texture * secondPassTexture
Second pass texture.
Definition: GpuLaserPrivate.hh:78
Ogre::Viewport * secondPassViewport
Second pass viewport.
Definition: GpuLaserPrivate.hh:90
unsigned int h2nd
Image height.
Definition: GpuLaserPrivate.hh:125
A class for event processing.
Definition: Event.hh:181
VisualPtr visual
Pointer to visual that holds the canvas.
Definition: GpuLaserPrivate.hh:119
Definition: GpuLaserPrivate.hh:50
unsigned int w2nd
Image width.
Definition: GpuLaserPrivate.hh:122
Ogre::RenderTarget * currentTarget
Temporary pointer to the current render target.
Definition: GpuLaserPrivate.hh:99
Ogre::RenderTarget * firstPassTargets[3]
First pass render targets.
Definition: GpuLaserPrivate.hh:81