51 #include "iniPlugin.hh"
67 std::vector< QString > draw_modes;
68 if( _ini.
get_entry(draw_modes, _object->
name(),
"MaterialDrawMode") )
90 std::vector< QString > draw_modes;
91 if( _ini.
get_entry(draw_modes, _object->
name(),
"MaterialDrawMode") )
112 if ( _ini.
get_entry( shininess, _object->
name() ,
"Shininess" ) )
116 if ( _ini.
get_entry( reflectance, _object->
name() ,
"Reflectance" ) ) {
121 if ( _ini.
get_entry( visible, _object->
name() ,
"Visible" ) ) {
174 void INIPlugin::loadIniFile(
INIFile& _ini,
int _id ) {
178 emit log(
LOGERR, tr(
"Cannot find object for id ") + QString::number(_id) + tr(
" in saveFile"));
183 parseIniFile(_ini, baseObject);
187 parseIniFileT(_ini, polyObject);
190 parseIniFileT(_ini, triObject);
193 parseIniFileT(_ini, lightObject);
196 emit log(
LOGERR, tr(
"The specified data type is not supported, yet. Aborting!"));
200 void INIPlugin::saveIniFile(
INIFile& _ini,
int _id) {
204 emit log(
LOGERR, tr(
"Cannot find object for id ") + QString::number(_id) + tr(
" in saveFile"));
209 saveIniFile(_ini, baseObject);
213 saveIniFileT(_ini, polyObject);
216 saveIniFileT(_ini, triObject);
219 saveIniFileT(_ini, lightObject);
222 emit log(
LOGERR, tr(
"The specified data type is not supported, yet. Aborting!"));
228 #if QT_VERSION < 0x050000
229 Q_EXPORT_PLUGIN2( iniplugin ,
INIPlugin );
const Vec4f & diffuse_color() const
get the diffuse color.
Type for a Meshobject containing a poly mesh.
QString name() const
return the name of the object. The name defaults to NONAME if unset.
Type for a MeshObject containing a triangle mesh.
bool getObject(int _identifier, BSplineCurveObject *&_object)
float point_size() const
get point size
const Vec4f & base_color() const
get the base color
PolyMeshObject * polyMeshObject(BaseObjectData *_object)
Cast an BaseObject to a PolyMeshObject if possible.
MaterialNode * materialNode()
get a pointer to the materialnode
void set_overlay_color(const Vec4f &_s)
set the overlay color
bool dataType(DataType _type) const
void add_entryVec(const QString &_section, const QString &_key, const VectorT &_value)
Addition of a Vec_n_something.
bool get_entry(QString &_val, const QString &_section, const QString &_key) const
Access to a string entry.
DrawModes::DrawMode drawMode() const
Return the own draw modes of this node.
void set_base_color(const Vec4f &_c)
set the base color
void add_entry(const QString &_section, const QString &_key, const QString &_value)
Addition / modification of a string entry.
Class for the handling of simple configuration files.
LightObject * lightObject(BaseObjectData *_object)
Cast an BaseObject to a LightObject if possible.
void set_point_size(float _sz)
set point size (default: 1.0)
void set_line_width(float _sz)
set line width (default: 1.0)
TriMeshObject * triMeshObject(BaseObjectData *_object)
Cast an BaseObject to a TriMeshObject if possible.
void set_specular_color(const Vec4f &_s)
set the specular color
void set_reflectance(double _m)
set reflectance
float shininess() const
get shininess
const Vec4f & specular_color() const
get the specular color
const Vec4f & overlay_color() const
get the overlay color
double reflectance() const
get reflectance
void set_diffuse_color(const Vec4f &_d)
set the diffuse color.
virtual bool visible()
return visiblity
float line_width() const
get line width
void set_shininess(float _s)
set shininess
#define DATA_TRIANGLE_MESH
bool get_entryVecf(VectorT &_val, const QString &_section, const QString &_key) const
Get a Vec_n_i (int)
void set_ambient_color(const Vec4f &_a)
set the ambient color.
const Vec4f & ambient_color() const
get the ambient color.