45 #include "TypePolyMesh.hh" 47 #include <OpenFlipper/common/BackupData.hh> 48 #include "PolyMeshBackup.hh" 53 TypePolyMeshPlugin::TypePolyMeshPlugin() {
59 bool TypePolyMeshPlugin::registerType() {
86 QString
name = QString(tr(
"New PolyMesh %1.off").arg( object->
id() ));
90 object->setName( f.fileName() );
93 const QColor color = OpenFlipper::Options::defaultColor();
94 const ACG::Vec4f default_color(color.redF(), color.greenF(), color.blueF(), color.alphaF());
95 object->materialNode()->set_color(default_color);
101 emit emptyObjectAdded (object->
id() );
121 backupData = dynamic_cast< BackupData* >(object->
objectData(OBJECT_BACKUPS));
125 object->setObjectData(OBJECT_BACKUPS, backupData);
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
QString name()
Return a name for the plugin.
PolyMeshObject * polyMeshObject(BaseObjectData *_object)
Cast an BaseObject to a PolyMeshObject if possible.
bool getObject(const int _identifier, BaseObject *&_object)
Get the object which has the given identifier.
DLLEXPORT void setTypeIcon(DataType _id, QString _icon)
Set an Icon for a given DataType.
Class that encapsulates a backup.
Abstract class that is used to store backups.
DLLEXPORT DataType addDataType(QString _name, QString _readableName)
Adds a datatype and returns the id for the new type.
int addEmpty()
Create an empty object.
void storeBackup(BaseBackup *_backup)
store a backup
void generateBackup(int _id, QString _name, UpdateType _type)
This slot should be implemented in a TypePlugin to generate type specific backups.
bool hasObjectData(QString _dataName)
Checks if object data with given name is available.
PerObjectData * objectData(QString _dataName)
Returns the object data pointer.
int objectCount()
Get the number of available objects.
int targetCount()
Get the number of target objects.
Type for a Meshobject containing a poly mesh.
DLLEXPORT DataType typeId(QString _name)
Given a dataType Identifier string this function will return the id of the datatype.