41 }
catch (
const std::bad_alloc&) {
51 }
catch (
const std::bad_alloc&) {
60 }
catch (
const std::bad_alloc&) {
130 if (entityPickingMode) {
146 unsigned numberOfPoints =
size();
158 QFontMetrics fontMetrics(font);
163 double xpShift = 0.0;
169 double ypShift = 0.0;
177 for (
unsigned i = 0; i < numberOfPoints; i++) {
203 m_labels[i],
static_cast<int>(Q2D.
x + xpShift),
204 static_cast<int>(Q2D.
y + ypShift),
void drawSymbolAt(double xp, double yp, double symbolRadius)
virtual bool isColorOverridden() const
ecvColor::Rgb m_tempColor
Temporary (unique) color.
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
void getDrawingParameters(glDrawParams ¶ms) const override
Returns main OpenGL parameters for this entity.
bool reserve(unsigned numberOfPoints) override
Reserves memory for all the active features.
void clear() override
Clears the entity from all its points and features.
bool resize(unsigned numberOfPoints) override
Resizes all the active features arrays.
const ecvColor::Rgb & getPointColor(unsigned pointIndex) const override
Returns color corresponding to a given point.
bool resizeLabelArray(unsigned count)
Resizes memory for storing per-point labels.
bool m_showSymbols
Whether symbols are shown or not.
QString getLabel(unsigned index) const
Returns a given label.
void addLabel(QString label)
Adds a label.
virtual void clear() override
Clears the entity from all its points and features.
virtual bool reserve(unsigned numberOfPoints) override
inherited from ccPointCloud
virtual bool resize(unsigned numberOfPoints) override
Resizes all the active features arrays.
void setLabel(unsigned index, QString label)
Sets a given label.
unsigned char m_labelAlignFlags
Default label alignment flags.
bool m_showLabels
Whether labels are shown or not.
double m_symbolSize
Symbol size (in pixels)
ccGLCameraParameters m_lastCameraParams
Last 3D rendering parameters.
int m_fontSize
Label font size (in points)
bool reserveLabelArray(unsigned count)
Reserves memory for storing per-point labels.
virtual void drawMeOnly(CC_DRAW_CONTEXT &context) override
Draws the entity only (not its children)
void clearLabelArray()
Clears the label array.
std::vector< QString > m_labels
Labels array.
ccSymbolCloud(QString name=QString())
Default constructor.
std::vector< CCVector3 > m_points
3D Points database
unsigned size() const override
Returns the number of points.
const CCVector3 * getPoint(unsigned index) const override
Returns the ith point.
#define MACRO_Draw2D(context)
#define MACRO_Draw3D(context)
#define MACRO_Foreground(context)
#define MACRO_FastEntityPicking(context)
#define MACRO_EntityPicking(context)
bool project(const CCVector3d &input3D, CCVector3d &output2D, bool *inFrustum=nullptr) const
Projects a 3D point in 2D (+ normalized 'z' coordinate)
Display parameters of a 3D entity.
bool showColors
Display colors.