51 #include "TypeTriangleMesh.hh"
53 #include <OpenFlipper/common/BackupData.hh>
54 #include "TriMeshBackup.hh"
59 TypeTriangleMeshPlugin::TypeTriangleMeshPlugin() {
65 bool TypeTriangleMeshPlugin::registerType() {
91 QString
name = QString(tr(
"TriangleMesh new %1.off").arg( object->
id() ));
95 object->setName( f.fileName() );
98 const QColor color = OpenFlipper::Options::defaultColor();
99 const ACG::Vec4f default_color(color.redF(), color.greenF(), color.blueF(), color.alphaF());
100 object->materialNode()->set_color(default_color);
106 emit emptyObjectAdded (object->
id() );
126 backupData = dynamic_cast< BackupData* >(object->
objectData(OBJECT_BACKUPS));
130 object->setObjectData(OBJECT_BACKUPS, backupData);
142 #if QT_VERSION < 0x050000
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
DLLEXPORT DataType typeId(QString _name)
Given a dataType Identifier string this function will return the id of the datatype.
DLLEXPORT void setTypeIcon(DataType _id, QString _icon)
Set an Icon for a given DataType.
PerObjectData * objectData(QString _dataName)
Returns the object data pointer.
int targetCount()
Get the number of target objects.
void storeBackup(BaseBackup *_backup)
store a backup
Type for a MeshObject containing a triangle mesh.
bool getObject(int _identifier, BSplineCurveObject *&_object)
DLLEXPORT DataType addDataType(QString _name, QString _readableName)
Adds a datatype and returns the id for the new type.
QString name()
Return a name for the plugin.
int addEmpty()
Create an empty object.
bool hasObjectData(QString _dataName)
Checks if object data with given name is available.
Class that encapsulates a backup.
TriMeshObject * triMeshObject(BaseObjectData *_object)
Cast an BaseObject to a TriMeshObject if possible.
void generateBackup(int _id, QString _name, UpdateType _type)
This slot should be implemented in a TypePlugin to generate type specific backups.
int objectCount()
Get the number of available objects.
Abstract class that is used to store backups.