44#include <visp3/core/vpMeterPixelConversion.h>
45#include <visp3/core/vpPixelMeterConversion.h>
46#include <visp3/core/vpPoint.h>
67 } vpPolygon3DClippingType;
88 unsigned int &p1ClippedInfo,
unsigned int &p2ClippedInfo,
const vpColVector &normal,
89 const unsigned int &flag);
92 unsigned int &p1ClippedInfo,
unsigned int &p2ClippedInfo,
const unsigned int &flag,
93 const double &distance);
100 void addPoint(
unsigned int n,
const vpPoint &P);
145 vpPoint &getPoint(
const unsigned int _index);
155 void getRoiClipped(
const vpCameraParameters &cam, std::vector<std::pair<vpImagePoint, unsigned int> > &roi);
157 void getRoiClipped(
const vpCameraParameters &cam, std::vector<std::pair<vpImagePoint, unsigned int> > &roi,
160#ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
165 vp_deprecated
void getRoiClipped(std::vector<vpPoint> &points);
169 void getPolygonClipped(std::vector<std::pair<vpPoint, unsigned int> > &poly);
171 void getPolygonClipped(std::vector<vpPoint> &poly);
182 inline void setClipping(
const unsigned int &flags) { clippingFlag = flags; }
195 virtual void setNbPoint(
unsigned int nb);
209 static void getClippedPolygon(
const std::vector<vpPoint> &ptIn, std::vector<vpPoint> &ptOut,
212 const double &zfar = 100);
213 static void getMinMaxRoi(
const std::vector<vpImagePoint> &roi,
int &i_min,
int &i_max,
int &j_min,
int &j_max);
218#ifdef VISP_HAVE_NLOHMANN_JSON
219#include <nlohmann/json.hpp>
220#include <visp3/core/vpJsonParsing.h>
233inline nlohmann::json clippingFlagsToJSON(
const int flags) {
234 constexpr std::array<vpPolygon3D::vpPolygon3DClippingType, 3> specificFlags = {
239 for(
const auto f: specificFlags) {
241 return nlohmann::json::array({ f });
244 return flagsToJSON<vpPolygon3D::vpPolygon3DClippingType>(flags, {
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Definition of the vpImage class member functions.
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
Implements a 3D polygon with render functionalities like clipping.
void setFarClippingDistance(const double &dist)
unsigned int nbpt
Number of points used to define the polygon.
unsigned int getNbPoint() const
void setNearClippingDistance(const double &dist)
double distNearClip
Distance for near clipping.
vpPoint * p
corners in the object frame
double getNearClippingDistance() const
unsigned int getClipping() const
unsigned int getNbCornerInsidePrevImage() const
double getFarClippingDistance() const
unsigned int clippingFlag
Clipping flag.
void setClipping(const unsigned int &flags)
std::vector< std::pair< vpPoint, unsigned int > > polyClipped
Region of interest clipped.
double distFarClip
Distance for near clipping.
unsigned int nbCornersInsidePrev