Skip to content

Commit

Permalink
fix loading of classes
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk authored and nyalldawson committed Oct 26, 2020
1 parent a3da3b3 commit 9563158
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/3d/qgspointcloudlayerchunkloader_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void QgsPointCloud3DGeometry::makeVertexBuffer( const QgsPointCloud3DSymbolHandl
vertexBufferData.resize( data.positions.size() * 4 * sizeof( float ) );
float *rawVertexArray = reinterpret_cast<float *>( vertexBufferData.data() );
int idx = 0;
int i = 0;
Q_ASSERT( data.positions.count() == data.classes.count() );
for ( int i = 0; i < data.positions.size(); ++i )
{
rawVertexArray[idx++] = data.positions.at( i ).x();
Expand Down
2 changes: 1 addition & 1 deletion src/3d/shaders/pointcloud.frag
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void main(void)
else if ( abs( clsid - 12 ) < 0.1 ) // overlaps
{
color = vec4(1,0,0,1);
//discard;
discard; // skip overlaps
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgspointclouddecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ QVector<char> QgsPointCloudDecoder::decompressBinaryClasses( const QString &file
// qint32 z = *(double*)(ptData+16);
char cls = bytes[30];
// vertices.push_back( Point3D( x, y, z ) );
classes.push_back( cls );
classes[i] = cls;
//++count;
}
return classes;
Expand Down

0 comments on commit 9563158

Please sign in to comment.