|Re: 3dfied gmf editor with 3d shapes [message #507371 is a reply to message #507331]
||Wed, 13 January 2010 08:33
|| Jens von Pilgrim
Registered: July 2009
On 2010-01-13 00:14:59 +0100, <email@example.com> said:
> i have a simple gmf edtior displaying a directed graph (only one figure
> for vertiecies). My requirement is to show multiple graphs in a
> multieditor. It is pretty easy to 3dfy a gmf editor, but i have to
> visualize the verticies as 3d objects (spheres e.g.), insted of
> projecting the 2d figures on a 3d plane.
> What is the easiest way to do that. Should I implement a 3d-Editor as
> shown in the graph example from scratch, ignoring my gmf-Editor. Or can
> 3d figures be somehow integrated in the gmf-3dfy-approach?
I wouldn't recommend to ignore your GMF editor, unless it is a pretty
simple example (your examples sounds pretty simple). But this is
certainly a possibility and maybe be used for creating a prototype. If
you want to reuse your GMF "stuff", I think you could try one of the
1) Modify the GMF graph and map model
2) Modify the GMF generator templates in order to produce 3D-code
3) Tweak the originally generated code as in the GMF-3D example
4) Hack some other things...
This would be the clearest solution. Instead of referring to 2D
figures, you have to use 3D custom figures. However, I have never tried
that with GMF and I don't know if that is possible or what pitfalls may
be hidden. Besides, you have to tweak the generated code just like we
did in the UML or ecore example in order to enable 3D handles etc.
Instead of directly changing the input models, you could modify the GMF
generator templates. Again, I haven't done that myself, so I don't know
how easy that would be. Besides replacing the figures, you could also
change the code in order to directly support 3D editors, e.g. create 3D
If your editor isn't too complicated, you could simply tweak the
generated code just as in our UML or ecore examples. Besides replacing
the diagram figure, you will then have to replace the other figures as
In some cases it might be possible to solve the problem somehow
differently. Instead of replacing the 2D figures of the vertices, you
may modify the diagram figure, that is their parent. Instead of simply
adding the 2D vertices to the (3D) diagram, the diagram could
transparently add a 3D figure (e.g. a cube) for each 2D child, onto
which the 2D child is then projected. This would be a nice solution
especially if other content, such as compartments, are drawn onto the
2D child. However, I don't know which side effects will occur in that
case. Maybe connections wouldn't be that easy in that case.
It is hard to say which solution would be the best. There are a lot of
side conditions to be taken into account. E.g., in case of 2), is the
generated code manually changed? And could these changes be easily
applied to differently generated code as well?
Anyhow, it sounds like an interesting project. Would be great if you'd
keep us informed how you solved your problem.
Powered by FUDForum
. Page generated in 0.02191 seconds