80 #include <QHBoxLayout> 82 #include <QPushButton> 84 #include "ui_ptsLoadWidget.h" 91 virtual void clear() = 0;
93 virtual void setNormal(
ACG::Vec3d _normal) = 0;
96 virtual void setPointSize(
float _size ) = 0;
97 virtual void setIndex(
int _index ) = 0;
99 virtual void request_vertex_normals() = 0;
100 virtual void request_vertex_colors() = 0;
101 virtual void request_point_sizes() = 0;
102 virtual void request_indices() = 0;
104 virtual void reserve(
size_t _size) = 0;
114 explicit ptsLoadWiget(QWidget *parent = 0) : QWidget(parent) { setupUi(
this); };
118 enum ReadObject{ PointPos,PointNormal,PointColor,PointSize,PointIndex };
131 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-FilePTS")
136 void openedFile(
int _objectId );
139 void addEmptyObject(
DataType _type,
int &_objectId );
140 void deleteObject (
int _objectId );
141 void updatedObject(
int _objectId,
const UpdateType &_type );
144 void log( QString _message );
145 void log(
Logtype _type, QString _message );
148 void addAboutInfo(QString _text, QString _tabName);
153 void initializePlugin();
154 void noguiSupported() { }
163 QString
name() {
return QString(
"FilePTS" ); }
164 QString
description( ) {
return QString( tr(
"Load/Save SplatCloud format files") ); }
170 QString
getSaveFilters() {
return QString( tr(
"SplatCloud format files ( *.pts *.bin )") ); }
171 QString
getLoadFilters() {
return QString( tr(
"SplatCloud format files ( *.pts *.bin )") ); }
172 QWidget *saveOptionsWidget( QString );
173 QWidget *loadOptionsWidget( QString );
178 QString version() {
return QString(
"1.0" ); }
181 int loadObject( QString _filename );
182 bool saveObject(
int _objectId, QString _filename );
187 bool readBinaryFile(
const char *_filename,
SplatCloud &_splatCloud ) ;
189 bool readTextFile (
const char *_filename,
AdaptorBase& _adaptor );
192 bool writeBinaryFile(
const char *_filename,
const SplatCloudNode *_splatCloudNode ) ;
193 bool writeTextFile (
const char *_filename,
const SplatCloudNode *_splatCloudNode ) ;
196 bool readCompressedBinaryChunk( FILE* _file,
size_t _compressedSize,
char* _dst );
199 std::vector<ReadObject> getReadObjectOrder();
203 QWidget *saveOptions_;
206 QCheckBox *saveBinaryFile_;
207 QCheckBox *saveNormals_;
208 QCheckBox *savePointsizes_;
209 QCheckBox *saveColors_;
210 QComboBox *saveColorRange_;
211 QCheckBox *saveIndices_;
214 QPushButton *saveMakeDefaultButton_;
219 void slotUpdateSaveColorRange();
222 void slotLoadMakeDefaultButtonClicked();
223 void slotSaveMakeDefaultButtonClicked();
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
Logtype
Log types for Message Window.
Interface for all Plugins which do logging to the logging window of the framework.
QString name()
Return a name for the plugin.
Interface to call functions across plugins.
QString description()
Return a description of what the plugin is doing.
Interface for all Plugins which provide scriptable Functions.
Interface class from which all plugins have to be created.
Interface class for file handling.
Interface for all plugins which want to Load or Save files and create Objects.