21 #include <QApplication>
23 #include <QSharedPointer>
57 return QString::number(
index, 10);
62 if (entityCenterPoint) {
65 return QString(
"Point #") + pointTag;
67 return QString(
"Point@Tri#") + pointTag;
78 if (entityCenterPoint) {
79 return cloud->getOwnBB().getCenter();
81 P = *cloud->getPointPersistentPtr(index);
84 if (entityCenterPoint) {
85 return mesh->getOwnBB().getCenter();
87 mesh->computePointPosition(index,
uv, P);
97 if (cloud)
return cloud->getUniqueID();
98 if (mesh)
return mesh->getUniqueID();
105 if (cloud)
return cloud;
106 if (mesh)
return mesh->getAssociatedCloud();
113 if (cloud)
return cloud;
114 if (mesh)
return mesh;
154 QString sfVal = QString::number(info.
sfValue,
'f', precision);
157 QString(
" (shifted: %1)").arg(sfVal);
178 title = QString(
"%1 = %2").arg(info.
sfName, sfVal);
180 }
else if (
count == 2) {
185 title = QString(
"Distance: %1").arg(dist, 0,
'f', precision);
186 }
else if (
count == 3) {
190 title = QString(
"Area: %1").arg(info.
area, 0,
'f', precision);
197 QString processedName =
m_name;
222 return processedName;
231 int x,
int y,
int dx,
int dy,
int screenWidth,
int screenHeight) {
232 assert(screenHeight > 0 && screenWidth > 0);
234 m_screenPos[0] +=
static_cast<float>(dx) / screenWidth;
235 m_screenPos[1] +=
static_cast<float>(dy) / screenHeight;
244 if (ignoreDependencies) {
267 for (
int i = 0; i < 3; ++i) {
306 if (!ignoreCaption) {
321 bool updateScreen ) {
330 bool updateScreen ) {
342 size_t pointsToRemove = 0;
348 if (pointsToRemove == 0)
return;
402 bool entityCenter ) {
403 if (!cloud || pointIndex >= cloud->
size())
return false;
407 pp.
index = pointIndex;
414 unsigned triangleIndex,
417 if (!mesh || triangleIndex >= mesh->
size())
return false;
421 pp.
index = triangleIndex;
435 }
catch (
const std::bad_alloc&) {
455 assert(out.isOpen() && (out.openMode() & QIODevice::WriteOnly));
456 if (dataVersion < 50) {
468 for (std::vector<PickedPoint>::const_iterator it =
m_pickedPoints.begin();
471 uint32_t index = (uint32_t)it->index;
472 if (out.write((
const char*)&index, 4) < 0)
return WriteError();
475 uint32_t cloudID = (uint32_t)it->cloud->getUniqueID();
476 if (out.write((
const char*)&cloudID, 4) < 0)
return WriteError();
480 if (out.write((
const char*)
m_screenPos,
sizeof(
float) * 2) < 0)
488 if (out.write((
const char*)&
m_dispIn2D,
sizeof(
bool)) < 0)
505 return std::max(
static_cast<short>(50),
522 for (uint32_t i = 0; i <
count; ++i) {
525 if (in.read((
char*)&index, 4) < 0)
return ReadError();
528 uint32_t cloudID = 0;
529 if (in.read((
char*)&cloudID, 4) < 0)
return ReadError();
534 pp.
index = (unsigned)index;
535 *(uint32_t*)(&pp.
cloud) = cloudID;
546 if (dataVersion > 20) {
555 if (dataVersion > 48) {
571 QString pointName = QString()) {
576 QString coordStr = QString(
"P#%0:").arg(pointIndex);
577 if (!pointName.isEmpty())
578 coordStr = QString(
"%1 (%2)").arg(pointName, coordStr);
581 coordStr = QString(
" [shifted]");
584 coordStr += QString(
" (%1;%2;%3)")
585 .arg(P->
x, 0,
'f', precision)
586 .arg(P->
y, 0,
'f', precision)
587 .arg(P->
z, 0,
'f', precision);
592 QString globCoordStr = QString(
" [original] (%1;%2;%3)")
593 .arg(Pg.
x, 0,
'f', precision)
594 .arg(Pg.
y, 0,
'f', precision)
595 .arg(Pg.
z, 0,
'f', precision);
596 body << globCoordStr;
656 info.
diff = *P2 - *P1;
706 body <<
"Deprecated";
713 if (!info.
cloud)
break;
721 QString(
"Normal: (%1;%2;%3)")
722 .arg(info.
normal.
x, 0,
'f', precision)
723 .arg(info.
normal.
y, 0,
'f', precision)
724 .arg(info.
normal.
z, 0,
'f', precision);
729 QString colorStr = QString(
"Color: (%1;%2;%3)")
738 QString sfStr = QString(
"%1 = %2").arg(info.
sfName, sfVal);
756 QString(
"X: %1\t").arg(info.
diff.
x, 0,
'f', precision) +
758 QString(
"Y: %1\t").arg(info.
diff.
y, 0,
'f', precision) +
760 QString(
"Z: %1").arg(info.
diff.
z, 0,
'f', precision);
772 QString(
"XY: %1\t").arg(dXY, 0,
'f', precision) +
774 QString(
"XZ: %1\t").arg(dXZ, 0,
'f', precision) +
776 QString(
"ZY: %1").arg(dZY, 0,
'f', precision);
790 QString(
"Area = %1").arg(info.
area, 0,
'f', precision);
802 QString normStr = QString(
"Normal: (%1;%2;%3)")
803 .arg(info.
normal.
x, 0,
'f', precision)
804 .arg(info.
normal.
y, 0,
'f', precision)
805 .arg(info.
normal.
z, 0,
'f', precision);
810 QString(
"Angles: A=%1 - B=%2 - C=%3 deg.")
811 .arg(info.
angles.
u[0], 0,
'f', precision)
812 .arg(info.
angles.
u[1], 0,
'f', precision)
813 .arg(info.
angles.
u[2], 0,
'f', precision);
817 QString edgesStr = QString(
"Edges: AB=%1 - BC=%2 - CA=%3")
818 .arg(info.
edges.
u[0], 0,
'f', precision)
819 .arg(info.
edges.
u[1], 0,
'f', precision)
820 .arg(info.
edges.
u[2], 0,
'f', precision);
833 if (button == Qt::MiddleButton) {
887 if (entityPickingMode) {
902 m_polyVertices->
resize(3);
967 ->getPointPersistentPtr(0));
970 ->getPointPersistentPtr(1));
973 ->getPointPersistentPtr(2));
1003 const float c_sizeFactor = 4.0f;
1008 :
context.labelDefaultMarkerCol
1010 float lineWidth = c_sizeFactor *
context.renderZoom;
1020 LineWidget(*lineSt, *lineEd, lineWidth, lineColor));
1030 new ccSphere(1.0f, 0,
"PointMarker", 12));
1054 context.labelDefaultMarkerCol);
1058 for (
size_t i = 0; i <
count; i++) {
1063 viewportParams.
zFar > 0) {
1084 double unitD = viewportParams.
zFar / 2;
1085 scale =
static_cast<float>(scale * sqrt(d / unitD));
1144 return blockCol * 2;
1153 for (
int i = 0; i <
colCount; ++i) {
1155 for (
int j = 0; j <
colContent[i].size(); ++j) {
1156 #if (QT_VERSION <= QT_VERSION_CHECK(5, 0, 0))
1157 maxWidth = std::max(maxWidth, fm.width(
colContent[i][j]));
1159 maxWidth = std::max(maxWidth,
1164 totalWidth += maxWidth;
1210 if (!entityPickingMode) {
1218 for (
size_t i = 0; i <
count; i++) {
1227 size_t visibleCount = 0;
1228 for (
unsigned j = 0; j <
count; ++j) {
1239 GetTextDisplayFont());
1243 static const QChar ABC[3] = {
'A',
'B',
'C'};
1246 for (
size_t j = 0; j <
count; j++) {
1251 else if (
count == 3)
1260 context.labelMarkerTextShift_pix,
1262 context.labelMarkerTextShift_pix,
1265 &font, this->getViewId());
1281 const int precision =
context.dispNumberPrecision;
1282 QString title =
getTitle(precision);
1284 #define DRAW_CONTENT_AS_TAB
1285 #ifdef DRAW_CONTENT_AS_TAB
1300 int titleHeight = 0;
1301 QFont bodyFont, titleFont;
1302 if (!entityPickingMode) {
1307 titleFont = bodyFont;
1315 int currentSize = titleFont.pointSize();
1316 float scaleFactor = 1.0f;
1323 QScreen* screen =
nullptr;
1329 screen = win->screen();
1331 screen = QApplication::primaryScreen();
1333 dpiScale = win->devicePixelRatio();
1335 screen = QApplication::primaryScreen();
1339 QSize screenSize = screen->size();
1340 int screenWidth = screenSize.width();
1341 int screenHeight = screenSize.height();
1342 int screenDPI = screen->physicalDotsPerInch();
1346 if (screenWidth >= 3840 || screenHeight >= 2160) {
1348 scaleFactor = 1.95f;
1349 }
else if (screenWidth >= 2560 || screenHeight >= 1440) {
1351 scaleFactor = 2.25f;
1352 }
else if (screenWidth >= 1920 && screenHeight >= 1080) {
1365 if (dpiScale >= 2) {
1367 scaleFactor *= 0.85f;
1368 }
else if (dpiScale > 1) {
1370 scaleFactor *= (1.0f - (dpiScale - 1.0f) * 0.15f);
1375 if (screenDPI > 150) {
1376 scaleFactor *= 0.95f;
1377 }
else if (screenDPI < 100) {
1378 scaleFactor *= 1.05f;
1383 int newSize =
static_cast<int>(currentSize * scaleFactor);
1384 titleFont.setPointSize(newSize);
1388 QFontMetrics titleFontMetrics(titleFont);
1389 titleHeight = titleFontMetrics.height();
1391 QFontMetrics bodyFontMetrics(bodyFont);
1392 rowHeight = bodyFontMetrics.height();
1406 #ifdef DRAW_CONTENT_AS_TAB
1424 << QString::number(P->
x,
'f', precision);
1427 << QString::number(P->
y,
'f', precision);
1430 << QString::number(P->
z,
'f', precision);
1439 << QString::number(P.
x,
'f', precision);
1442 << QString::number(P.
y,
'f', precision);
1445 << QString::number(P.
z,
'f', precision);
1452 info.
normal.
x,
'f', precision);
1455 info.
normal.
y,
'f', precision);
1458 info.
normal.
z,
'f', precision);
1466 << QString::number(info.
rgb.
r);
1469 << QString::number(info.
rgb.
g);
1472 << QString::number(info.
rgb.
b);
1474 }
else if (
count == 2) {
1484 info.
diff.
x,
'f', precision);
1488 info.
diff.
y,
'f', precision);
1492 info.
diff.
z,
'f', precision);
1509 << QString::number(dXY,
'f', precision);
1513 << QString::number(dXZ,
'f', precision);
1517 << QString::number(dZY,
'f', precision);
1519 }
else if (
count == 3) {
1542 info.
edges.
u[0],
'f', precision);
1545 info.
edges.
u[1],
'f', precision);
1548 info.
edges.
u[2],
'f', precision);
1555 info.
angles.
u[0],
'f', precision);
1558 info.
angles.
u[1],
'f', precision);
1561 info.
angles.
u[2],
'f', precision);
1568 info.
normal.
x,
'f', precision);
1571 info.
normal.
y,
'f', precision);
1574 info.
normal.
z,
'f', precision);
1577 }
catch (
const std::bad_alloc&) {
1579 assert(!entityPickingMode);
1589 dx = std::max(dx, tabWidth);
1591 (rowHeight + 2 * tabMarginY);
1593 dy += std::max(0, (tab.
rowCount / 3) - 1) * margin;
1597 if (!body.empty()) {
1599 for (
int j = 0; j < body.size(); ++j) {
1601 bodyFontMetrics, body[j]));
1627 const int xStart =
static_cast<int>(logicalW *
m_screenPos[0]);
1628 const int yStart =
static_cast<int>(logicalH * (1.0f -
m_screenPos[1]));
1634 bool highlighted = (!entityPickingMode &&
isSelected());
1636 unsigned char alpha =
1637 static_cast<unsigned char>((
context.labelOpacity / 100.0) * 255);
1643 unsigned char halfAlpha =
static_cast<unsigned char>(
1644 (50.0 +
context.labelOpacity / 200.0) * 255);
1645 defaultBorderColor =
1653 if (
context.labelOpacity < 40) {
1655 defaultTextColor =
context.textDefaultCol;
1658 255 -
context.labelDefaultBkgCol.g,
1659 255 -
context.labelDefaultBkgCol.b);
1663 if (!entityPickingMode) {
1669 QFontMetrics bodyFontMetrics(bodyFont);
1671 for (
int r = 0; r < tab.
rowCount; ++r) {
1673 for (
int c = 0; c < tab.
colCount; ++c) {
1676 #if (QT_VERSION <= QT_VERSION_CHECK(5, 0, 0))
1677 int textWidth = bodyFontMetrics.width(cellContent);
1680 bodyFontMetrics.horizontalAdvance(cellContent);
1687 targetWidth += tabMarginX;
1690 int spaceWidth = textWidth < targetWidth
1691 ? targetWidth - textWidth
1693 if (spaceWidth > 0) {
1696 #if (QT_VERSION <= QT_VERSION_CHECK(5, 0, 0))
1697 int spaceCharWidth = bodyFontMetrics.width(
' ');
1699 int spaceCharWidth =
1700 bodyFontMetrics.horizontalAdvance(
' ');
1702 int numSpaces = spaceCharWidth > 0
1703 ? (spaceWidth + spaceCharWidth -
1706 cellContent += QString(numSpaces,
' ');
1718 for (
size_t i = 0; i <
count; ++i) {
1749 float posX =
static_cast<float>(
m_labelROI.x());
1750 float posY =
static_cast<float>(
m_labelROI.y());
1754 posX = std::max(0.0f, std::min(posX, logicalW - 1.0f));
1755 posY = std::max(0.0f, std::min(posY, logicalH - 1.0f));
1767 float vtkY = logicalH - posY;
1770 vtkY = std::max(0.0f, std::min(vtkY, logicalH - 1.0f));
1781 param.
fontSize = bodyFont.pointSize();
1788 int& nearestPointIndex,
1789 double& nearestSquareDist)
const {
1790 nearestPointIndex = -1;
1791 nearestSquareDist = -1.0;
1809 for (
unsigned i = 0; i <
size(); ++i) {
1826 bool insideFrustum =
false;
1828 camera.
project(P, Q2D, &insideFrustum);
1832 camera.
project(P3D, Q2D, &insideFrustum);
1835 if (!insideFrustum) {
1841 double squareDist = (XP - XP.
dot(xy) * xy).norm2();
1845 if (nearestPointIndex < 0 || squareDist < nearestSquareDist) {
1846 nearestSquareDist = squareDist;
1847 nearestPointIndex = i;
1853 return (nearestPointIndex >= 0);
Vector2Tpl< PointCoordinateType > CCVector2
Default 2D Vector.
Vector3Tpl< PointCoordinateType > CCVector3
Default 3D Vector.
float PointCoordinateType
Type of the coordinates of a (N-D) point.
#define QTCOMPAT_FONTMETRICS_WIDTH(fm, text)
void normalize()
Sets vector norm to unity.
double normd() const
Returns vector norm (forces double precision output)
Type dot(const Vector3Tpl &v) const
Dot product.
Type norm() const
Returns vector norm.
Vector3Tpl cross(const Vector3Tpl &v) const
Cross product.
Vector3Tpl< double > toDouble() const
Cast operator to a double vector (explicit call version)
static Vector3Tpl fromArray(const int a[3])
Constructor from an int array.
Type angle_rad(const Vector3Tpl &v) const
Returns the angle to another vector (in radians - in [0, pi].
bool addPickedPoint(ccGenericPointCloud *cloud, unsigned pointIndex, bool entityCenter=false)
Adds a point to this label.
const PickedPoint & getPickedPoint(unsigned index) const
Returns a given point.
float m_screenPos[2]
close button ROI
cc2DLabel(QString name=QString("label"))
Default constructor.
QRect m_labelROI
label ROI
bool m_dispIn2D
Whether to display the label in 2D.
float m_relMarkerScale
Relative marker scale.
virtual bool move2D(int x, int y, int dx, int dy, int screenWidth, int screenHeight) override
Called on mouse move (for 2D interactors)
QString getTitle(int precision) const
Returns the (3D) label title.
bool toFile_MeOnly(QFile &out, short dataVersion) const override
Save own object data.
void getLabelInfo2(LabelInfo2 &info) const
Gets two-points label info.
void clear(bool ignoreDependencies=false, bool ignoreCaption=true)
Clears label.
short minimumFileVersion_MeOnly() const override
virtual bool acceptClick(int x, int y, Qt::MouseButton button) override
Called on mouse click.
int m_lastScreenPos[2]
Label position at last display (absolute)
bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Loads own object data.
unsigned size() const
Returns current size.
virtual void onDeletionOf(const ccHObject *obj) override
This method is called when another object is deleted.
std::vector< PickedPoint > m_pickedPoints
Picked points.
void drawMeOnly2D(CC_DRAW_CONTEXT &context)
Draws the entity only (not its children) - 2D version.
void updateName()
Updates the label 'name'.
QStringList getLabelContent(int precision) const
Gets label content (as it will be displayed)
void getLabelInfo3(LabelInfo3 &info) const
Gets three-points label info.
void setPosition(float x, float y)
Sets relative position.
virtual void drawMeOnly(CC_DRAW_CONTEXT &context) override
Draws the entity only (not its children)
bool m_dispPointsLegend
Whether to display the point(s) legend.
bool pointPicking(const CCVector2d &clickPos, const ccGLCameraParameters &camera, int &nearestPointIndex, double &nearestSquareDist) const
Point (marker) picking.
static QString GetSFValueAsString(const LabelInfo1 &info, int precision)
Returns the SF value as a string.
void update2DLabelView(CC_DRAW_CONTEXT &context, bool updateScreen=true)
void clearLabel(bool ignoreCaption=true)
void update3DLabelView(CC_DRAW_CONTEXT &context, bool updateScreen=true)
void getLabelInfo1(LabelInfo1 &info) const
Returns one-point label info.
void drawMeOnly3D(CC_DRAW_CONTEXT &context)
Draws the entity only (not its children) - 3D version.
QStringList m_historyMessage
bool m_showFullBody
Whether to show full label body or not.
virtual QString getName() const override
Returns object name.
virtual bool isVisible() const
Returns whether entity is visible or not.
virtual bool hasDisplayedScalarField() const
Returns whether an active scalar field is available or not.
virtual bool hasColors() const
Returns whether colors are enabled or not.
virtual void lockVisibility(bool state)
Locks/unlocks visibility.
virtual void setVisible(bool state)
Sets entity visibility.
virtual bool hasNormals() const
Returns whether normals are enabled or not.
virtual bool isSelected() const
Returns whether entity is selected or not.
virtual bool isRedraw() const
Returns whether entity is to be redraw.
static ccFacet * Create(cloudViewer::GenericIndexedCloudPersist *cloud, PointCoordinateType maxEdgeLength=0, bool transferOwnership=false, const PointCoordinateType *planeEquation=nullptr)
Creates a facet from a set of points.
void apply(float vec[3]) const
Applies transformation to a 3D vector (in place) - float version.
Float version of ccGLMatrixTpl.
A 3D cloud interface with associated features (color, normals, octree, etc.)
virtual const CCVector3 & getPointNormal(unsigned pointIndex) const =0
Returns normal corresponding to a given point.
virtual const ecvColor::Rgb & getPointColor(unsigned pointIndex) const =0
Returns color corresponding to a given point.
static ccGenericPointCloud * ToGenericPointCloud(ccHObject *obj, bool *isLockedVertices=nullptr)
Converts current object to 'equivalent' ccGenericPointCloud.
Hierarchical CLOUDVIEWER Object.
bool getAbsoluteGLTransformation(ccGLMatrix &trans) const
virtual short minimumFileVersion_MeOnly() const
virtual bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
Loads own object data.
void addDependency(ccHObject *otherObject, int flags, bool additive=true)
Adds a new dependence (additive or not)
virtual bool toFile_MeOnly(QFile &out, short dataVersion) const
Save own object data.
QString getViewId() const
@ DP_NOTIFY_OTHER_ON_DELETE
virtual void onDeletionOf(const ccHObject *obj)
This method is called when another object is deleted.
bool isA(CV_CLASS_ENUM type) const
virtual void setName(const QString &name)
Sets object name.
virtual void setEnabled(bool state)
Sets the "enabled" property.
virtual bool isEnabled() const
Returns whether the object is enabled or not.
QString m_name
Object name.
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
ccScalarField * getCurrentDisplayedScalarField() const
Returns the currently displayed scalar (or 0 if none)
bool resize(unsigned numberOfPoints) override
Resizes all the active features arrays.
A scalar field associated to display-related parameters.
double getGlobalShift() const
Returns the global shift (if any)
QMultiMap< unsigned, unsigned > LoadedIDMap
Map of loaded unique IDs (old ID --> new ID)
static bool ReadError()
Sends a custom error message (read error) and returns 'false'.
static bool WriteError()
Sends a custom error message (write error) and returns 'false'.
static bool MemoryError()
Sends a custom error message (not enough memory) and returns 'false'.
CCVector3d toGlobal3d(const Vector3Tpl< T > &Plocal) const
Returns the point back-projected into the original coordinates system.
bool isShifted() const
Returns whether the cloud is shifted or not.
virtual unsigned size() const =0
Returns the number of points.
virtual ScalarType getPointScalarValue(unsigned pointIndex) const =0
Returns the ith point associated scalar value.
A generic 3D point cloud with index-based and presistent access to points.
virtual const CCVector3 * getPointPersistentPtr(unsigned index)=0
Returns the ith point as a persistent pointer.
virtual const CCVector3 * getPoint(unsigned index) const =0
Returns the ith point.
virtual unsigned size() const =0
Returns the number of triangles.
const CCVector3 * getPointPersistentPtr(unsigned index) override
const char * getName() const
Returns scalar field name.
static bool ValidValue(ScalarType value)
Returns whether a scalar value is valid or not.
Standard parameters for GL displays/viewports.
bool perspectiveView
Perspective view state.
double zFar
Actual perspective 'zFar' value.
static const char POINT_INDEX_1[]
static const char ENTITY_INDEX_1[]
static const int c_arrowBaseSize
static const char ENTITY_INDEX_0[]
static const QString CENTER_STRING
static const int c_tabMarginY
static const QString MathSymbolDelta
void AddPointCoordinates(QStringList &body, unsigned pointIndex, ccGenericPointCloud *cloud, int precision, QString pointName=QString())
static const ecvColor::Rgb c_darkGreen(0, 200, 0)
static const int c_tabMarginX
static const char POINT_INDEX_0[]
static QSharedPointer< ccFacet > c_unitTriMarker(nullptr)
static QSharedPointer< ccSphere > c_unitPointMarker(nullptr)
static const int c_margin
static const char ENTITY_INDEX_2[]
static const QString SEPARATOR
static const char POINT_INDEX_2[]
#define MACRO_Draw2D(context)
#define MACRO_Draw3D(context)
#define MACRO_Foreground(context)
#define MACRO_VirtualTransEnabled(context)
#define MACRO_FastEntityPicking(context)
#define MACRO_EntityPicking(context)
float RadiansToDegrees(int radians)
Convert radians to degrees.
Rgbaf FromRgbub(const Rgbub &color)
RgbaTpl< unsigned char > Rgbaub
4 components, unsigned byte type
constexpr Rgb white(MAX, MAX, MAX)
constexpr Rgba ored(MAX, 0, 0, OPACITY)
constexpr Rgb red(MAX, 0, 0)
Rgbaf FromRgba(const Rgba &color)
constexpr Rgb darkGrey(MAX/2, MAX/2, MAX/2)
RgbTpl< unsigned char > Rgbub
3 components, unsigned byte type
constexpr Rgb yellow(MAX, MAX, 0)
constexpr Rgbub defaultBkgColor(135, 206, 235)
void swap(cloudViewer::core::SmallVectorImpl< T > &LHS, cloudViewer::core::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.
int maxBlockPerRow
Maximum number of blocks per row.
int add2x3Block()
Adds a 2x3 block (must be filled!)
int colCount
Number of columns.
int updateColumnsWidthTable(const QFontMetrics &fm)
Updates columns width table.
void setMaxBlockPerRow(int maxBlock)
Sets the maximum number of blocks per row.
Tab(int _maxBlockPerRow=2)
Default constructor.
int rowCount
Number of rows.
std::vector< QStringList > colContent
Columns content.
int blockCount
Number of 2x3 blocks.
std::vector< int > colWidth
Columns width.
ccGenericPointCloud * cloud
ccGenericPointCloud * cloud1
ccGenericPointCloud * cloud2
ccGenericPointCloud * cloud1
ccGenericPointCloud * cloud2
ccGenericPointCloud * cloud3
CCVector2d uv
Barycentric coordinates (for triangles)
CCVector3 getPointPosition() const
Returns the point position (3D)
unsigned index
Point/triangle index.
QString itemTitle() const
ccGenericPointCloud * cloudOrVertices() const
Returns the cloud or the mesh vertices.
ccGenericMesh * mesh
Mesh.
bool entityCenterPoint
Entity center mode (index will be invalid)
float markerScale
Last known marker scale.
ccHObject * entity() const
Returns the associated entity (cloud or mesh)
ccGenericPointCloud * cloud
Cloud.
QString prefix(const char *pointTag) const
Returns the point prefix ('Point' or 'Point@Tri' or 'IDXX Center')
unsigned getUniqueID() const
Returns the cloud or the mesh unique ID.
OpenGL camera parameters.
ccGLMatrixd modelViewMat
Model view matrix (GL_MODELVIEW)
bool unproject(const CCVector3d &input2D, CCVector3d &output3D) const
Unprojects a 2D point (+ normalized 'z' coordinate) in 3D.
bool project(const CCVector3d &input3D, CCVector3d &output2D, bool *inFrustum=nullptr) const
Projects a 3D point in 2D (+ normalized 'z' coordinate)
int drawingFlags
Drawing options (see below)