[prev in list] [next in list] [prev in thread] [next in thread]
List: kpovmodeler-devel
Subject: Maps and framework changes
From: Andreas Zehender <zehender () kde ! org>
Date: 2001-10-12 20:51:47
[Download RAW message or body]
Hi!
I just committed my map implementation.
The changes to Luis' version:
- I moved PMMapPattern to PMPattern
- I removed the class PMMapEntry
- and added a new class: PMTextureMapBase which is the base class for all
maps (texture map, pigment map, color map and normal map)
To test it, add a texture to an object, add a pattern and a texture map
and some textures to the texture map.
I added a new method to the PMObject class:
bool dataChangeOnInsertRemove( );
A class that changes data if child objects are added or removed must
return true. The add-, delete- and move-commands will then create
mementos for the objects to save undo/redo information.
The new class PMTextureMapBase uses this. New map values are added when a
child object is added or existing values are removed when a child object
is removed.
If you remove an object and add a new one, the old map value will be
used. Otherwise a new value is inserted: 0.0 if the object is the first
child, 1.0 if it is the last, and the mean between the previous and next
value otherwise.
Luis, what do you think? All values can now be edited in one widget and
the right order of values is ensured.
I had to separate the pattern from the map for one reason: You can
declare maps but the declaration does not contain the pattern.
I also fixed the canInsert method of pmtexture.
Only a texture map can be inserted at the moment. I didn't change the
other canInsert methods (of PMTPigment... )
To the turbulence object:
I think you can put all pattern modifiers inside the pattern object.
The order of all modifiers does not matter as well if they are inserted
before the map or after.
Put it inside the pattern object with a checkbox in the edit widget to
enable/disable the modifiers.
To the finish object:
Add a enableAttributeXYZ method for all attributes. You have to be able
to disable all attributes. The should be disabled by default.
Add a checkbox for all attributes (well, only one for phong and phong
size). You can then link to a normal and overwrite/change only some
attributes.
And the default layout in the edit widgets is: First the label, then the
line edit right of it, not below it. Please change that, too.
The other major framework change is:
the canInsert method has now two new parameters:
canInsert( PMObjectType t, PMObject* after, PMObjectList* objectsBetween )
The second parameter (after) ensures the right order of child objects.
The map object and csg object needs that.
Uh, I have to change the canInsert method of the csg object.
The parameter objectsBetween is used by the parser. Top level objects are
not inserted immediately. So you have to treat the objects in the list as
if they are inserted already after the object "after".
However, most classes can ignore the new parameters.
Many icons are now missing:
pmdisc, pmdeclare,
pmtexturemap, pmpigmentmap, pmcolormap, pmnormalmap,
pmtexturemapdeclare, pmpigmentmapdeclare, pmcolormapdeclare,
pmnormalmapdeclare,
pmfinish, pmpattern
Enough work for you, Thomas :-)
Greetings, Andreas
--
--------------------------------------------------
Andreas Zehender, Dipl. Ing. (BA)
Student, 8th semester computer science
http://www.azweb.de
az@azweb.de | zehender@kde.org
--------------------------------------------------
List archive and information: http://mail.kde.org/mailman/listinfo/kpovmodeler-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic