ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
STLFilter.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include "FileIOFilter.h"
11 
12 class ccMesh;
13 class ccPointCloud;
14 class ccGenericMesh;
15 
17 
20 public:
22 
23  // inherited from FileIOFilter
24  virtual CC_FILE_ERROR loadFile(const QString& filename,
25  ccHObject& container,
26  LoadParameters& parameters) override;
27 
28  virtual bool canSave(CV_CLASS_ENUM type,
29  bool& multiple,
30  bool& exclusive) const override;
32  const QString& filename,
33  const SaveParameters& parameters) override;
34 
35 protected:
38  FILE* theFile,
39  QWidget* parentWidget = 0);
41  FILE* theFile,
42  QWidget* parentWidget = 0);
43 
46  ccMesh* mesh,
47  ccPointCloud* vertices,
48  LoadParameters& parameters);
49 
52  ccMesh* mesh,
53  ccPointCloud* vertices,
54  LoadParameters& parameters);
55 };
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
Definition: CVTypes.h:97
std::string filename
#define CV_IO_LIB_API
Definition: CV_io.h:15
char type
CC_FILE_ERROR
Typical I/O filter errors.
Definition: FileIOFilter.h:20
Generic file I/O filter.
Definition: FileIOFilter.h:46
StereoLithography file I/O filter.
Definition: STLFilter.h:19
CC_FILE_ERROR saveToBINFile(ccGenericMesh *mesh, FILE *theFile, QWidget *parentWidget=0)
virtual bool canSave(CV_CLASS_ENUM type, bool &multiple, bool &exclusive) const override
Returns whether this I/O filter can save the specified type of entity.
CC_FILE_ERROR loadBinaryFile(QFile &fp, ccMesh *mesh, ccPointCloud *vertices, LoadParameters &parameters)
Custom load method for binary files.
virtual CC_FILE_ERROR loadFile(const QString &filename, ccHObject &container, LoadParameters &parameters) override
Loads one or more entities from a file.
CC_FILE_ERROR saveToASCIIFile(ccGenericMesh *mesh, FILE *theFile, QWidget *parentWidget=0)
Custom save method.
virtual CC_FILE_ERROR saveToFile(ccHObject *entity, const QString &filename, const SaveParameters &parameters) override
Saves an entity (or a group of) to a file.
CC_FILE_ERROR loadASCIIFile(QFile &fp, ccMesh *mesh, ccPointCloud *vertices, LoadParameters &parameters)
Custom load method for ASCII files.
Generic mesh interface.
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
Triangular mesh.
Definition: ecvMesh.h:35
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Generic loading parameters.
Definition: FileIOFilter.h:51
Generic saving parameters.
Definition: FileIOFilter.h:84