QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgspointcloudblock.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspointcloudblock.h
3 ---------------------
4 begin : October 2020
5 copyright : (C) 2020 by Peter Petrik
6 email : zilolv at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSPOINTCLOUDBLOCK_H
19#define QGSPOINTCLOUDBLOCK_H
20
21#include "qgis.h"
22#include "qgis_core.h"
24
25#include <QByteArray>
26#include <QPair>
27#include <QString>
28#include <QVector>
29
38class CORE_EXPORT QgsPointCloudBlock
39{
40 public:
42 QgsPointCloudBlock( int count,
44 const QByteArray &data, const QgsVector3D &scale, const QgsVector3D &offset );
45
46 virtual ~QgsPointCloudBlock() = default;
47
54
56 const char *data() const;
57
59 int pointCount() const;
60
66 int pointRecordSize() const { return mRecordSize; }
67
69 QgsPointCloudAttributeCollection attributes() const;
70
72 QgsVector3D scale() const;
73
75 QgsVector3D offset() const;
76
86 void setPointCount( int size );
87
88 private:
89
90 int mPointCount = 0;
92 int mRecordSize = 0;
93 QByteArray mStorage;
94 QgsVector3D mScale, mOffset;
95};
96
97
98#endif // QGSPOINTCLOUDBLOCK_H
A collection of point cloud attributes.
QgsPointCloudBlock(int count, const QgsPointCloudAttributeCollection &attributes, const QByteArray &data, const QgsVector3D &scale, const QgsVector3D &offset)
Ctor.
virtual ~QgsPointCloudBlock()=default
QgsVector3D scale() const
Returns the custom scale of the block.
const char * data() const
Returns raw pointer to data.
QgsPointCloudAttributeCollection attributes() const
Returns the attributes that are stored in the data block, along with their size.
int pointCount() const
Returns number of points that are stored in the block.
int pointRecordSize() const
Returns the total size of each individual point record.
QgsPointCloudBlock * clone() const
Clones the QgsPointCloudBlock returning a new copy.
QgsVector3D offset() const
Returns the custom offset of the block.
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
Definition qgsvector3d.h:30
#define SIP_FACTORY
Definition qgis_sip.h:84