Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpPanda3DRGBRenderer.h
1
/*
2
* ViSP, open source Visual Servoing Platform software.
3
* Copyright (C) 2005 - 2024 by Inria. All rights reserved.
4
*
5
* This software is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
* See the file LICENSE.txt at the root directory of this source
10
* distribution for additional information about the GNU GPL.
11
*
12
* For using ViSP with software that can not be combined with the GNU
13
* GPL, please contact Inria about acquiring a ViSP Professional
14
* Edition License.
15
*
16
* See https://visp.inria.fr for more information.
17
*
18
* This software was developed at:
19
* Inria Rennes - Bretagne Atlantique
20
* Campus Universitaire de Beaulieu
21
* 35042 Rennes Cedex
22
* France
23
*
24
* If you have questions regarding the use of this file, please contact
25
* Inria at visp@inria.fr
26
*
27
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29
*/
30
31
#ifndef VP_PANDA3D_RGB_RENDERER_H
32
#define VP_PANDA3D_RGB_RENDERER_H
33
34
#include <visp3/core/vpConfig.h>
35
36
#if defined(VISP_HAVE_PANDA3D)
37
38
#include <visp3/ar/vpPanda3DBaseRenderer.h>
39
#include <visp3/ar/vpPanda3DLight.h>
40
#include <visp3/core/vpImage.h>
41
42
#include "pointerTo.h"
43
44
BEGIN_VISP_NAMESPACE
72
class
VISP_EXPORT
vpPanda3DRGBRenderer
:
public
vpPanda3DBaseRenderer
,
public
vpPanda3DLightableScene
73
{
74
public
:
79
vpPanda3DRGBRenderer
() :
vpPanda3DBaseRenderer
(
"RGB"
), m_showSpeculars(true), m_display2d(nullptr), m_backgroundTexture(nullptr) { }
87
vpPanda3DRGBRenderer
(
bool
showSpeculars) :
vpPanda3DBaseRenderer
(showSpeculars ?
"RGB"
:
"RGB-diffuse"
), m_showSpeculars(showSpeculars) { }
88
89
97
void
getRender(
vpImage<vpRGBa>
&I)
const
;
98
99
void
addNodeToScene
(
const
NodePath &
object
) VP_OVERRIDE;
100
101
void
setBackgroundImage(
const
vpImage<vpRGBa>
&background);
102
103
PointerTo<GraphicsOutput>
getMainOutputBuffer
() VP_OVERRIDE {
return
m_colorBuffer; }
104
105
bool
isShowingSpeculars
()
const
{
return
m_showSpeculars; }
106
107
protected
:
108
void
setupScene
() VP_OVERRIDE;
109
void
setupRenderTarget() VP_OVERRIDE;
110
111
virtual std::
string
makeFragmentShader(
bool
hasTexture,
bool
specular);
112
113
private:
114
bool
m_showSpeculars;
115
PointerTo<Texture> m_colorTexture;
116
PointerTo<GraphicsOutput> m_colorBuffer;
117
static const std::
string
COOK_TORRANCE_VERT;
118
static const std::
string
COOK_TORRANCE_FRAG;
119
120
NodePath m_backgroundImage;
121
PointerTo<DisplayRegion> m_display2d;
122
PointerTo<Texture> m_backgroundTexture;
123
};
124
125
END_VISP_NAMESPACE
126
#endif
//VISP_HAVE_PANDA3D
127
#endif
vpImage
Definition of the vpImage class member functions.
Definition
vpImage.h:131
vpPanda3DBaseRenderer::vpPanda3DBaseRenderer
vpPanda3DBaseRenderer(const std::string &rendererName)
Definition
vpPanda3DBaseRenderer.h:72
vpPanda3DBaseRenderer::setupScene
virtual void setupScene()
Initialize the scene for this specific renderer.
Definition
vpPanda3DBaseRenderer.cpp:130
vpPanda3DBaseRenderer::addNodeToScene
virtual void addNodeToScene(const NodePath &object)
Add a node to the scene. Its pose is set as the identity matrix.
Definition
vpPanda3DBaseRenderer.cpp:347
vpPanda3DLightableScene::vpPanda3DLightableScene
vpPanda3DLightableScene()
Definition
vpPanda3DLight.h:294
vpPanda3DRGBRenderer::isShowingSpeculars
bool isShowingSpeculars() const
Definition
vpPanda3DRGBRenderer.h:105
vpPanda3DRGBRenderer::vpPanda3DRGBRenderer
vpPanda3DRGBRenderer()
Default constructor. Initialize an RGB renderer with the normal rendering behavior showing speculars.
Definition
vpPanda3DRGBRenderer.h:79
vpPanda3DRGBRenderer::vpPanda3DRGBRenderer
vpPanda3DRGBRenderer(bool showSpeculars)
RGB renderer constructor allowing to specify whether specular highlights should be rendered or if onl...
Definition
vpPanda3DRGBRenderer.h:87
vpPanda3DRGBRenderer::getMainOutputBuffer
PointerTo< GraphicsOutput > getMainOutputBuffer() VP_OVERRIDE
Definition
vpPanda3DRGBRenderer.h:103
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
ar
include
visp3
ar
vpPanda3DRGBRenderer.h
Generated by
1.17.0