Closed eglrp closed 2 months ago
Yes, something like this
import pycc
import cccorelib
import numpy as np
CC = pycc.GetInstance()
xs = np.arange(0.0, 5.0, 0.1, pycc.PointCoordinateType)
ys = np.ones(len(xs), pycc.PointCoordinateType) * 18.5
zs = np.ones(len(xs), pycc.PointCoordinateType) * 17.33
pc = pycc.ccPointCloud(xs, ys, zs)
label = pycc.cc2DLabel()
label.addPickedPoint(pc, 0)
label.setName("Hello, World")
label.setVisible(True)
label.setDisplayedIn2D(True)
label.displayPointLegend(True)
label.setPosition(0.1, 0.1)
label.displayPointLegend(False)
pc.addChild(label)
CC.addToDB(pc)
CC.addToDB(label)
display = CC.getActiveGLWindow()
label.setDisplay(display)
does this
good
Can pycc.cc2DLabel achieve the following effect,text label
void Viewer3D::addLabel(QVector3D posc, QString text) {
}
(See https://github.com/CloudCompare/CloudCo ... .cpp#L1021 for instance)
reference https://www.danielgm.net/cc/forum/viewtopic.php?t=3826#