Visual Servoing Platform  version 3.6.1 under development (2024-11-21)
vpPanda3DRenderParameters Class Reference

#include <visp3/ar/vpPanda3DRenderParameters.h>

Public Member Functions

 vpPanda3DRenderParameters ()
 
 vpPanda3DRenderParameters (const vpCameraParameters &cam, unsigned int h, unsigned int w, double clipNear, double clipFar)
 
const vpCameraParametersgetCameraIntrinsics () const
 
void setCameraIntrinsics (const vpCameraParameters &cam)
 
double getNearClippingDistance () const
 
double getFarClippingDistance () const
 
void setClippingDistance (double nearV, double farV)
 
unsigned int getImageWidth () const
 
unsigned int getImageHeight () const
 
void setImageResolution (unsigned int height, unsigned int width)
 
void setupPandaCamera (Camera *camera)
 

Detailed Description

Rendering parameters for a panda3D simulation.

includes:

  • Camera intrinsics
  • Image resolution
  • Clipping parameters
Examples
tutorial-panda3d-renderer.cpp.

Definition at line 50 of file vpPanda3DRenderParameters.h.

Constructor & Destructor Documentation

◆ vpPanda3DRenderParameters() [1/2]

vpPanda3DRenderParameters::vpPanda3DRenderParameters ( )
inline

Definition at line 53 of file vpPanda3DRenderParameters.h.

◆ vpPanda3DRenderParameters() [2/2]

vpPanda3DRenderParameters::vpPanda3DRenderParameters ( const vpCameraParameters cam,
unsigned int  h,
unsigned int  w,
double  clipNear,
double  clipFar 
)
inline

Definition at line 54 of file vpPanda3DRenderParameters.h.

Member Function Documentation

◆ getCameraIntrinsics()

const vpCameraParameters& vpPanda3DRenderParameters::getCameraIntrinsics ( ) const
inline

Retrieve camera intrinsics.

Returns
const vpCameraParameters&

Definition at line 64 of file vpPanda3DRenderParameters.h.

◆ getFarClippingDistance()

double vpPanda3DRenderParameters::getFarClippingDistance ( ) const
inline

Definition at line 78 of file vpPanda3DRenderParameters.h.

◆ getImageHeight()

◆ getImageWidth()

◆ getNearClippingDistance()

double vpPanda3DRenderParameters::getNearClippingDistance ( ) const
inline

Definition at line 77 of file vpPanda3DRenderParameters.h.

◆ setCameraIntrinsics()

void vpPanda3DRenderParameters::setCameraIntrinsics ( const vpCameraParameters cam)
inline

set camera intrinsics. Only camera intrinsics for a lens without distortion are supported.

Exceptions
ifcamera intrinsics have a distortion model.

Definition at line 69 of file vpPanda3DRenderParameters.h.

References vpException::badValue, vpCameraParameters::get_projModel(), and vpCameraParameters::perspectiveProjWithoutDistortion.

◆ setClippingDistance()

void vpPanda3DRenderParameters::setClippingDistance ( double  nearV,
double  farV 
)
inline

Set the clipping distance. When a panda camera uses these render parameters, objects that are closer than "near" or further than "far" will be clipped.

Parameters
nearVnear clipping distance
farVfar clipping distance

Definition at line 86 of file vpPanda3DRenderParameters.h.

◆ setImageResolution()

void vpPanda3DRenderParameters::setImageResolution ( unsigned int  height,
unsigned int  width 
)
inline

Set the image resolution. When this object is given to a vpPanda3DBaseRenderer, this will be the resolution of the renderer's output images.

Parameters
heightvertical image resolution
widthhorizontal image resolution

Definition at line 106 of file vpPanda3DRenderParameters.h.

◆ setupPandaCamera()

BEGIN_VISP_NAMESPACE void vpPanda3DRenderParameters::setupPandaCamera ( Camera *  camera)

Update a Panda3D camera object to use this objects's parameters.

Parameters
camerathe camera for which to update the rendering parameters
Exceptions
ifgetImageWidth() or getImageHeight() are equal to 0.

Definition at line 39 of file vpPanda3DRenderParameters.cpp.

References vpException::dimensionError, vpCameraParameters::get_px(), vpCameraParameters::get_py(), vpCameraParameters::get_u0(), and vpCameraParameters::get_v0().

Referenced by vpPanda3DBaseRenderer::setRenderParameters(), and vpPanda3DBaseRenderer::setupCamera().