Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpPanda3DRenderParameters.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_RENDER_PARAMETERS_H
32
#define VP_PANDA3D_RENDER_PARAMETERS_H
33
34
#include <visp3/core/vpConfig.h>
35
36
#if defined(VISP_HAVE_PANDA3D)
37
#include <visp3/core/vpCameraParameters.h>
38
39
class
Camera;
40
41
BEGIN_VISP_NAMESPACE
57
class
VISP_EXPORT
vpPanda3DRenderParameters
58
{
59
public
:
60
vpPanda3DRenderParameters
() : m_cam(), m_height(0), m_width(0), m_clipNear(0.001), m_clipFar(10.0) { }
61
vpPanda3DRenderParameters
(
const
vpCameraParameters
&cam,
unsigned
int
h,
unsigned
int
w,
62
double
clipNear,
double
clipFar)
63
: m_cam(cam), m_height(h), m_width(w), m_clipNear(clipNear), m_clipFar(clipFar)
64
{ }
65
71
const
vpCameraParameters
&
getCameraIntrinsics
()
const
{
return
m_cam; }
76
void
setCameraIntrinsics
(
const
vpCameraParameters
&cam)
77
{
78
if
(cam.get_projModel() !=
vpCameraParameters::perspectiveProjWithoutDistortion
) {
79
throw
vpException
(
vpException::badValue
,
"Panda3D renderer: only lenses with no distortion are supported"
);
80
}
81
m_cam = cam;
82
}
83
84
double
getNearClippingDistance
()
const
{
return
m_clipNear; }
85
double
getFarClippingDistance
()
const
{
return
m_clipFar; }
86
93
void
setClippingDistance
(
double
nearV,
double
farV)
94
{
95
if
(farV < nearV) {
96
std::swap(nearV, farV);
97
}
98
m_clipNear = nearV;
99
m_clipFar = farV;
100
}
101
102
unsigned
int
getImageWidth
()
const
{
return
m_width; }
103
unsigned
int
getImageHeight
()
const
{
return
m_height; }
104
113
void
setImageResolution
(
unsigned
int
height,
unsigned
int
width)
114
{
115
m_height = height;
116
m_width = width;
117
}
118
126
void
setupPandaCamera(Camera *camera);
127
128
private
:
129
vpCameraParameters
m_cam;
130
unsigned
int
m_height, m_width;
131
double
m_clipNear, m_clipFar;
132
};
133
134
END_VISP_NAMESPACE
135
#endif
136
#endif
vpCameraParameters
Generic class defining intrinsic camera parameters.
Definition
vpCameraParameters.h:311
vpCameraParameters::perspectiveProjWithoutDistortion
@ perspectiveProjWithoutDistortion
Perspective projection without distortion model.
Definition
vpCameraParameters.h:318
vpException
error that can be emitted by ViSP classes.
Definition
vpException.h:60
vpException::badValue
@ badValue
Used to indicate that a value is not in the allowed range.
Definition
vpException.h:73
vpPanda3DRenderParameters::getImageWidth
unsigned int getImageWidth() const
Definition
vpPanda3DRenderParameters.h:102
vpPanda3DRenderParameters::setClippingDistance
void setClippingDistance(double nearV, double farV)
Set the clipping distance. When a panda camera uses these render parameters, objects that are closer ...
Definition
vpPanda3DRenderParameters.h:93
vpPanda3DRenderParameters::setCameraIntrinsics
void setCameraIntrinsics(const vpCameraParameters &cam)
set camera intrinsics. Only camera intrinsics for a lens without distortion are supported.
Definition
vpPanda3DRenderParameters.h:76
vpPanda3DRenderParameters::getImageHeight
unsigned int getImageHeight() const
Definition
vpPanda3DRenderParameters.h:103
vpPanda3DRenderParameters::vpPanda3DRenderParameters
vpPanda3DRenderParameters(const vpCameraParameters &cam, unsigned int h, unsigned int w, double clipNear, double clipFar)
Definition
vpPanda3DRenderParameters.h:61
vpPanda3DRenderParameters::getFarClippingDistance
double getFarClippingDistance() const
Definition
vpPanda3DRenderParameters.h:85
vpPanda3DRenderParameters::getCameraIntrinsics
const vpCameraParameters & getCameraIntrinsics() const
Retrieve camera intrinsics.
Definition
vpPanda3DRenderParameters.h:71
vpPanda3DRenderParameters::vpPanda3DRenderParameters
vpPanda3DRenderParameters()
Definition
vpPanda3DRenderParameters.h:60
vpPanda3DRenderParameters::getNearClippingDistance
double getNearClippingDistance() const
Definition
vpPanda3DRenderParameters.h:84
vpPanda3DRenderParameters::setImageResolution
void setImageResolution(unsigned int height, unsigned int width)
Set the image resolution. When this object is given to a vpPanda3DBaseRenderer, this will be the reso...
Definition
vpPanda3DRenderParameters.h:113
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
ar
include
visp3
ar
vpPanda3DRenderParameters.h
Generated by
1.17.0