Home » Archived » GEF3D » rotation of planes
rotation of planes [message #1760] |
Tue, 27 January 2009 06:07  |
Eclipse User |
|
|
|
Hi,
I started to change the visualization in my tool from 2D to 3D. Until now
I worked with GEF and now I'm using GEF3D. My impression: It works much
better and is much easier to use than I thought. :-)
What I did not find out yet: When I create planes I can only position them
one over another. Does GEF3D support rotation of planes? If it does, how
does that work?
Best regards,
Matthias Then
|
|
|
Re: rotation of planes [message #1767 is a reply to message #1760] |
Tue, 03 February 2009 05:37   |
Eclipse User |
|
|
|
Hi,
On 2009-01-27 12:07:16 +0100, matthias.then@fernuni-hagen.de (Matthias
Then) said:
> started to change the visualization in my tool from 2D to 3D. Until now
> I worked with GEF and now I'm using GEF3D. My impression: It works much
> better and is much easier to use than I thought. :-)
We're working hard on making it easy for GEF-editor developers ;-)
> What I did not find out yet: When I create planes I can only position
> them one over another. Does GEF3D support rotation of planes? If it
> does, how does that work?
GEF3D supports rotation of planes. As a matter of fact, GEF3D is a
"real" 3D tool, that is 3D figures can be positioned (and rotated)
anywhere. All our examples are using special layouts, so you may get
the impression that GEF3D is limited to stack layout or something like
this, but this is not true.
In the multi-editor example, we do not use a layout manager (this is a
hack, we have to change this in future versions ;-) ).
Just have a look at
org.eclipse.gef3d.ext/src/java/org/eclipse/gef3d/ext/multied itor/MultiEditorModelContainerFigure.java
The
layout manager used is a LayoutXYZ-layout manager, that is this manager
delegates the calculation of figures to the children. In other words:
This is a layout manager which uses the locations (and rotation
settings) of the children figures (this layout manager is used very
often, but from a technical perspective, it's an exception since it
delegates the calculation to the figures). When a new child figure is
added, we calculate its new position on the fly:
if (!(fig3D instanceof IInterModelDiagram)) {
Vector3fImpl vec = new Vector3fImpl(fig3D.getLocation3D());
vec.z += dz;
fig3D.setLocation3D(vec);
dz += 1000;
}
Again: this is a hack, but it works. You can simply write your own
container figure and change its behaviour. Maybe you can even write a
new LayoutManager and contribute it ;-)
You can rotate the planes, this is working. There is a known bug (I
haven't submitted a bug report, mea maxima culpa!): the
intermodel-connections, i.e. connections between elements on different
planes, are not located accordingly. I was about to submit a bug, but I
wanted to have a demo example for that first.
Cheers,
Jens
|
|
| | | |
Re: rotation of planes [message #560950 is a reply to message #1760] |
Tue, 03 February 2009 05:37  |
Eclipse User |
|
|
|
Hi,
On 2009-01-27 12:07:16 +0100, matthias.then@fernuni-hagen.de (Matthias
Then) said:
> started to change the visualization in my tool from 2D to 3D. Until now
> I worked with GEF and now I'm using GEF3D. My impression: It works much
> better and is much easier to use than I thought. :-)
We're working hard on making it easy for GEF-editor developers ;-)
> What I did not find out yet: When I create planes I can only position
> them one over another. Does GEF3D support rotation of planes? If it
> does, how does that work?
GEF3D supports rotation of planes. As a matter of fact, GEF3D is a
"real" 3D tool, that is 3D figures can be positioned (and rotated)
anywhere. All our examples are using special layouts, so you may get
the impression that GEF3D is limited to stack layout or something like
this, but this is not true.
In the multi-editor example, we do not use a layout manager (this is a
hack, we have to change this in future versions ;-) ).
Just have a look at
org.eclipse.gef3d.ext/src/java/org/eclipse/gef3d/ext/multied itor/MultiEditorModelContainerFigure.java
The
layout manager used is a LayoutXYZ-layout manager, that is this manager
delegates the calculation of figures to the children. In other words:
This is a layout manager which uses the locations (and rotation
settings) of the children figures (this layout manager is used very
often, but from a technical perspective, it's an exception since it
delegates the calculation to the figures). When a new child figure is
added, we calculate its new position on the fly:
if (!(fig3D instanceof IInterModelDiagram)) {
Vector3fImpl vec = new Vector3fImpl(fig3D.getLocation3D());
vec.z += dz;
fig3D.setLocation3D(vec);
dz += 1000;
}
Again: this is a hack, but it works. You can simply write your own
container figure and change its behaviour. Maybe you can even write a
new LayoutManager and contribute it ;-)
You can rotate the planes, this is working. There is a known bug (I
haven't submitted a bug report, mea maxima culpa!): the
intermodel-connections, i.e. connections between elements on different
planes, are not located accordingly. I was about to submit a bug, but I
wanted to have a demo example for that first.
Cheers,
Jens
|
|
| | | |
Goto Forum:
Current Time: Thu May 08 21:27:04 EDT 2025
Powered by FUDForum. Page generated in 0.06509 seconds
|