23 #include <QCoreApplication>
68 params.drawBackgroundGradient =
false;
69 params.decimateMeshOnMove =
false;
70 params.displayCross =
false;
71 params.colorScaleUseShader =
false;
83 auto layout =
new QHBoxLayout;
85 layout->setContentsMargins(0, 0, 0, 0);
87 QWidget* widget =
new QWidget();
88 layout->addWidget(widget);
90 parentFrame->setLayout(layout);
95 unsigned& gridHeight)
const {
110 unsigned gridWidth = 0, gridHeight = 0;
112 return QObject::tr(
"invalid grid box");
115 return QString(
"%1 x %2").arg(gridWidth).arg(gridHeight);
132 static const int screnMargin = 20;
139 if (
static_cast<int>(
m_grid.
width) < screenWidth &&
141 int vPointSize =
static_cast<int>(
143 int hPointSize =
static_cast<int>(
145 pointSize =
std::min(vPointSize, hPointSize);
148 if (pointSize > 10) {
156 realGridWidth / screenWidth, realGridHeight / screenHeight));
175 const std::vector<ccRasterGrid::ExportableFields>& exportedFields,
178 bool resampleInputCloudXY,
179 bool resampleInputCloudZ,
182 double emptyCellsHeight,
183 bool exportToOriginalCS)
const {
194 resampleInputCloudXY, resampleInputCloudZ, inputCloud, Z, box,
195 fillEmptyCells, emptyCellsHeight, exportToOriginalCS);
199 QComboBox* comboBox)
const {
205 switch (comboBox->currentIndex()) {
cmdLineReadable * params[]
static Vector3Tpl fromArray(const int a[3])
Constructor from an int array.
virtual ccBBox getCustomBBox() const
Returns custom bbox.
ccRasterGrid::EmptyCellFillOption getFillEmptyCellsStrategy(QComboBox *comboBox) const
Returns the empty cell strategy (for a given combo-box)
ccBoundingBoxEditorDlg * m_bbEditorDlg
Associated dialog.
void createBoundingBoxEditor(const ccBBox &gridBBox, QWidget *parent)
Creates the bounding-box editor.
virtual void gridIsUpToDate(bool state)=0
Declares whether the grid is up-to-date or not.
virtual unsigned char getProjectionDimension() const =0
Returns projection dimension.
ccPointCloud * convertGridToCloud(const std::vector< ccRasterGrid::ExportableFields > &exportedFields, bool interpolateSF, bool interpolateColors, bool resampleInputCloudXY, bool resampleInputCloudZ, ccGenericPointCloud *inputCloud, bool fillEmptyCells, double emptyCellsHeight, bool exportToOriginalCS) const
Shortcut to ccRasterGrid::convertToCloud.
ccRasterGrid m_grid
Raster grid.
virtual void update2DDisplayZoom(ccBBox &box)
Updates the 2D display zoom.
virtual double getGridStep() const =0
Returns projection grid step.
cc2Point5DimEditor()
Default constructor.
ccPointCloud * m_rasterCloud
'Raster' cloud
virtual bool showGridBoxEditor()
Show grid box editor and update.
virtual QString getGridSizeAsString() const
Returns the grid size as a string.
void create2DView(QFrame *parentFrame)
Creates the 2D view.
virtual bool getGridSize(unsigned &width, unsigned &height) const
Returns the grid size.
virtual ~cc2Point5DimEditor()
Destructor.
Dialog to define the extents of a 3D box.
const ccBBox & getBox() const
Returns bounding box.
void set2DMode(bool state, unsigned char dim)
Sets 2D mode (the line 'dim' will be hidden)
void setBaseBBox(const ccBBox &box, bool isMinimal=true)
Sets the (minimal) base box.
A 3D cloud interface with associated features (color, normals, octree, etc.)
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Vector3Tpl< T > getCenter() const
Returns center.
bool isValid() const
Returns whether bounding box is valid or not.
Standard parameters for GL displays/viewports.
bool interpolateColors(const ccHObject::Container &selectedEntities, QWidget *parent)
Interpolate colors from on entity and transfer them to another one.
MiniVec< float, N > ceil(const MiniVec< float, N > &a)
constexpr Rgb black(0, 0, 0)
constexpr Rgb white(MAX, MAX, MAX)
double gridStep
Grid step ('pixel' size)
unsigned height
Number of rows.
static bool ComputeGridSize(unsigned char Z, const ccBBox &box, double gridStep, unsigned &width, unsigned &height)
Computes the raster size for a given bounding-box.
ccPointCloud * convertToCloud(const std::vector< ExportableFields > &exportedFields, bool interpolateSF, bool interpolateColors, bool resampleInputCloudXY, bool resampleInputCloudZ, ccGenericPointCloud *inputCloud, unsigned char Z, const ccBBox &box, bool fillEmptyCells, double emptyCellsHeight, bool exportToOriginalCS) const
Converts the grid to a cloud with scalar field(s)
bool isValid() const
Returns whether the grid is 'valid' or not.
unsigned width
Number of columns.
EmptyCellFillOption
Option for handling empty cells.