55 #if QT_VERSION >= 0x050000 66 return QString( tr(
"Plane files ( *.pla )") );
70 return QString( tr(
"Plane files ( *.pla )") );
78 int FilePlaPlugin::loadObject(QString _filename)
89 QFileInfo fi(_filename);
97 QSettings settings(_filename, QSettings::IniFormat);
98 settings.beginGroup(
"PLANE");
100 if ( settings.contains(
"Position0") ){
102 position[0] = settings.value(
"Position0").toDouble();
103 position[1] = settings.value(
"Position1").toDouble();
104 position[2] = settings.value(
"Position2").toDouble();
105 xDirection[0] = settings.value(
"XDirection0").toDouble();
106 xDirection[1] = settings.value(
"XDirection1").toDouble();
107 xDirection[2] = settings.value(
"XDirection2").toDouble();
108 yDirection[0] = settings.value(
"YDirection0").toDouble();
109 yDirection[1] = settings.value(
"YDirection1").toDouble();
110 yDirection[2] = settings.value(
"YDirection2").toDouble();
113 plane->plane().
setPlane(position, xDirection, yDirection);
128 bool FilePlaPlugin::saveObject(
int _id, QString _filename)
141 QSettings settings(_filename, QSettings::IniFormat);
142 settings.beginGroup(
"PLANE");
155 emit log(
LOGERR, tr(
"saveObject : cannot get object id %1 for save name %2").arg(_id).arg(_filename) );
161 #if QT_VERSION < 0x050000
ACG::Vec3d xDirection()
local x direction (multiplied with width)
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
QString filename() const
return the filename of the object
bool getObject(int _identifier, BSplineCurveObject *&_object)
void initializePlugin()
Initialize Plugin.
void setFromFileName(const QString &_filename)
virtual void setName(QString _name)
path to the file from which the object is loaded ( defaults to "." )
ACG::Vec3d position()
get center position of the plane
PlaneObject * planeObject(BaseObjectData *_object)
Cast an BaseObject to a PlaneObject if possible.
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
void setPlane(const ACG::Vec3d &_position, const ACG::Vec3d &_xDirection, const ACG::Vec3d &)
Set plane.
ACG::Vec3d yDirection()
local y direction (multiplied with height)
PlaneNode * planeNode()
Get the scenegraph Node.