mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
* MDAL 0.5.90 : support for custom Logger and 1D meshes * [FEATURE] [MESH] Support rendering of 1D meshes, see https://github.com/qgis/QGIS-Enhancement-Proposals/issues/164 1D mesh consist of edges (edge is straight line segment with 2 vertices) and the data that is defined on either vertices or edges. Such data can be loaded by MDAL and rendered as mesh layer in QGIS.
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
/*
|
|
MDAL - Mesh Data Abstraction Library (MIT License)
|
|
Copyright (C) 2018 Peter Petrik (zilolv at gmail dot com)
|
|
*/
|
|
|
|
#ifndef MDAL_BINARY_DAT_HPP
|
|
#define MDAL_BINARY_DAT_HPP
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <memory>
|
|
#include <iosfwd>
|
|
#include <iostream>
|
|
#include <fstream>
|
|
|
|
#include "mdal_data_model.hpp"
|
|
#include "mdal.h"
|
|
#include "mdal_driver.hpp"
|
|
|
|
namespace MDAL
|
|
{
|
|
|
|
class DriverBinaryDat: public Driver
|
|
{
|
|
public:
|
|
DriverBinaryDat();
|
|
~DriverBinaryDat( ) override;
|
|
DriverBinaryDat *create() override;
|
|
|
|
bool canReadDatasets( const std::string &uri ) override;
|
|
void load( const std::string &datFile, Mesh *mesh ) override;
|
|
bool persist( DatasetGroup *group ) override;
|
|
|
|
private:
|
|
bool readVertexTimestep( const Mesh *mesh,
|
|
std::shared_ptr<DatasetGroup> group,
|
|
std::shared_ptr<DatasetGroup> groupMax,
|
|
RelativeTimestamp time,
|
|
bool hasStatus,
|
|
int sflg,
|
|
std::ifstream &in );
|
|
|
|
std::string mDatFile;
|
|
};
|
|
|
|
} // namespace MDAL
|
|
#endif //MDAL_BINARY_DAT_HPP
|