44#include <visp3/core/vpConfig.h>
45#include <visp3/core/vpMeterPixelConversion.h>
46#include <visp3/core/vpPixelMeterConversion.h>
47#include <visp3/core/vpPoint.h>
70 } vpPolygon3DClippingType;
91 unsigned int &p1ClippedInfo,
unsigned int &p2ClippedInfo,
const vpColVector &normal,
92 const unsigned int &flag);
95 unsigned int &p1ClippedInfo,
unsigned int &p2ClippedInfo,
const unsigned int &flag,
96 const double &distance);
148 vpPoint &getPoint(
const unsigned int _index);
158 void getRoiClipped(
const vpCameraParameters &cam, std::vector<std::pair<vpImagePoint, unsigned int> > &roi);
160 void getRoiClipped(
const vpCameraParameters &cam, std::vector<std::pair<vpImagePoint, unsigned int> > &roi,
163#ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
168 VP_DEPRECATED void getRoiClipped(std::vector<vpPoint> &points);
172 void getPolygonClipped(std::vector<std::pair<vpPoint, unsigned int> > &poly);
174 void getPolygonClipped(std::vector<vpPoint> &poly);
198 virtual void setNbPoint(
unsigned int nb);
212 static void getClippedPolygon(
const std::vector<vpPoint> &ptIn, std::vector<vpPoint> &ptOut,
215 const double &zfar = 100);
216 static void getMinMaxRoi(
const std::vector<vpImagePoint> &roi,
int &i_min,
int &i_max,
int &j_min,
int &j_max);
221#ifdef VISP_HAVE_NLOHMANN_JSON
222#include VISP_NLOHMANN_JSON(json.hpp)
223#include <visp3/core/vpJsonParsing.h>
225#if defined(__clang__)
228# pragma clang diagnostic push
229# pragma clang diagnostic ignored "-Wexit-time-destructors"
244#if defined(__clang__)
245# pragma clang diagnostic pop
248inline nlohmann::json clippingFlagsToJSON(
const unsigned int flags)
250#ifdef ENABLE_VISP_NAMESPACE
253 constexpr std::array<vpPolygon3D::vpPolygon3DClippingType, 3> specificFlags = {
258 for (
const auto f: specificFlags) {
260 return nlohmann::json::array({ f });
263 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 changeFrame(const vpHomogeneousMatrix &cMo)
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
void computePolygonClipped(const vpCameraParameters &cam=vpCameraParameters())
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.
void addPoint(unsigned int n, const vpPoint &P)
double distFarClip
Distance for near clipping.
unsigned int nbCornersInsidePrev