Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpMbtPolygon.h
1/*
2 * ViSP, open source Visual Servoing Platform software.
3 * Copyright (C) 2005 - 2025 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 * Description:
31 * Implements a polygon of the model used by the model-based tracker.
32 */
33
38
39#ifndef vpMbtPolygon_HH
40#define vpMbtPolygon_HH
41
42#include <visp3/core/vpConfig.h>
43#include <visp3/core/vpMeterPixelConversion.h>
44#include <visp3/core/vpPixelMeterConversion.h>
45#include <visp3/core/vpPoint.h>
46#include <visp3/core/vpPolygon3D.h>
47
48#include <vector>
49
71class VISP_EXPORT vpMbtPolygon : public vpPolygon3D
72{
73public:
76 int index;
83 bool useLod;
91 std::string name;
95
96public:
98 vpMbtPolygon(const vpMbtPolygon &mbtp);
99
105 inline int getIndex() const { return index; }
106
112 inline std::string getName() const { return name; }
113
114 inline bool isAppearing() const { return isappearing; }
115 inline bool isPolygonOriented() { return hasOrientation; }
116 virtual bool isVisible(const vpHomogeneousMatrix &cMo, double alpha, const bool &modulo = false,
117 const vpCameraParameters &cam = vpCameraParameters(), unsigned int width = 0,
118 unsigned int height = 0);
119 bool isVisible() const { return isvisible; }
120
121 vpMbtPolygon &operator=(const vpMbtPolygon &mbtp);
122
128 virtual inline void setIndex(int i) { index = i; }
129
130 // Due to a doxygen warning include the sample code in the doc, we remove
131 // the inline and put the doc in the *.cpp file
132 void setLod(bool use_lod);
145 inline void setMinLineLengthThresh(double min_line_length) { this->minLineLengthThresh = min_line_length; }
156 inline void setMinPolygonAreaThresh(double min_polygon_area) { this->minPolygonAreaThresh = min_polygon_area; }
157
163 inline void setName(const std::string &face_name) { this->name = face_name; }
164
170 inline void setIsPolygonOriented(const bool &oriented) { this->hasOrientation = oriented; }
171};
172END_VISP_NAMESPACE
173#endif
Generic class defining intrinsic camera parameters.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a polygon of the model used by the model-based tracker.
void setMinPolygonAreaThresh(double min_polygon_area)
bool isvisible
flag to specify whether the face is visible or not
std::string getName() const
bool isAppearing() const
void setName(const std::string &face_name)
bool hasOrientation
double minLineLengthThresh
virtual void setIndex(int i)
double minPolygonAreaThresh
void setMinLineLengthThresh(double min_line_length)
bool isappearing
flag to specify whether the face is appearing or not
std::string name
Name of the polygon.
bool isPolygonOriented()
void setIsPolygonOriented(const bool &oriented)
bool isVisible() const
int getIndex() const
vpPolygon3D & operator=(const vpPolygon3D &mbtp)