51 #include "TypePolyMesh.hh" 53 #include <OpenFlipper/common/BackupData.hh> 54 #include "PolyMeshBackup.hh" 59 TypePolyMeshPlugin::TypePolyMeshPlugin() {
65 bool TypePolyMeshPlugin::registerType() {
92 QString
name = QString(tr(
"New PolyMesh %1.off").arg( object->
id() ));
96 object->setName( f.fileName() );
99 const QColor color = OpenFlipper::Options::defaultColor();
100 const ACG::Vec4f default_color(color.redF(), color.greenF(), color.blueF(), color.alphaF());
101 object->materialNode()->set_color(default_color);
107 emit emptyObjectAdded (object->
id() );
127 backupData = dynamic_cast< BackupData* >(object->
objectData(OBJECT_BACKUPS));
131 object->setObjectData(OBJECT_BACKUPS, backupData);
143 #if QT_VERSION < 0x050000 DLLEXPORT DataType typeId(QString _name)
Given a dataType Identifier string this function will return the id of the datatype.
bool getObject(int _identifier, BSplineCurveObject *&_object)
Abstract class that is used to store backups.
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
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.
PolyMeshObject * polyMeshObject(BaseObjectData *_object)
Cast an BaseObject to a PolyMeshObject if possible.
int objectCount()
Get the number of available objects.
void storeBackup(BaseBackup *_backup)
store a backup
bool hasObjectData(QString _dataName)
Checks if object data with given name is available.
int addEmpty()
Create an empty object.
DLLEXPORT void setTypeIcon(DataType _id, QString _icon)
Set an Icon for a given DataType.
void generateBackup(int _id, QString _name, UpdateType _type)
This slot should be implemented in a TypePlugin to generate type specific backups.
int targetCount()
Get the number of target objects.
Type for a Meshobject containing a poly mesh.
Class that encapsulates a backup.
PerObjectData * objectData(QString _dataName)
Returns the object data pointer.