Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GEF3D » rotation of planes
rotation of planes [message #1760] Tue, 27 January 2009 11:07 Go to next message
Matthias Then is currently offline Matthias ThenFriend
Messages: 10
Registered: July 2009
Junior Member
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 10:37 Go to previous messageGo to next message
Jens von Pilgrim is currently offline Jens von PilgrimFriend
Messages: 313
Registered: July 2009
Senior Member
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 #1772 is a reply to message #1767] Tue, 03 February 2009 10:52 Go to previous messageGo to next message
Jens von Pilgrim is currently offline Jens von PilgrimFriend
Messages: 313
Registered: July 2009
Senior Member
On 2009-02-03 11:37:20 +0100, Jens v.P. <developer@jevopi.de> said:
> I haven't submitted a bug report, mea maxima culpa!

Created a bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=263441
I have attached an image to the bug report on which you can see the
rotated planes. I also added a code snippet rotating the planes (around
the z-axis).

Cheers,

Jens
Re: rotation of planes [message #1777 is a reply to message #1772] Thu, 05 February 2009 12:15 Go to previous messageGo to next message
Matthias Then is currently offline Matthias ThenFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Jens,

thank you very much for your help!
I modified my code as you described and it works.
The only problem left is the intermodel-connection-bug you described in
your bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=263441. :-)

Cheers,
Matthias
Re: rotation of planes [message #1783 is a reply to message #1772] Thu, 05 February 2009 12:22 Go to previous message
Matthias Then is currently offline Matthias ThenFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Jens,

thank you very much for your help!
I modified my code as you described and it works.
The only problem left is the intermodel-connection-bug you described in
your bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=263441. :-)

Cheers,
Matthias



Jens v.P. wrote:

> On 2009-02-03 11:37:20 +0100, Jens v.P. <developer@jevopi.de> said:
>> I haven't submitted a bug report, mea maxima culpa!

> Created a bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=263441
> I have attached an image to the bug report on which you can see the
> rotated planes. I also added a code snippet rotating the planes (around
> the z-axis).

> Cheers,

> Jens
Re: rotation of planes [message #560950 is a reply to message #1760] Tue, 03 February 2009 10:37 Go to previous message
Jens von Pilgrim is currently offline Jens von PilgrimFriend
Messages: 313
Registered: July 2009
Senior Member
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 #560962 is a reply to message #1767] Tue, 03 February 2009 10:52 Go to previous message
Jens von Pilgrim is currently offline Jens von PilgrimFriend
Messages: 313
Registered: July 2009
Senior Member
On 2009-02-03 11:37:20 +0100, Jens v.P. <developer@jevopi.de> said:
> I haven't submitted a bug report, mea maxima culpa!

Created a bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=263441
I have attached an image to the bug report on which you can see the
rotated planes. I also added a code snippet rotating the planes (around
the z-axis).

Cheers,

Jens
Re: rotation of planes [message #560975 is a reply to message #1772] Thu, 05 February 2009 12:15 Go to previous message
Matthias Then is currently offline Matthias ThenFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Jens,

thank you very much for your help!
I modified my code as you described and it works.
The only problem left is the intermodel-connection-bug you described in
your bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=263441 :-)

Cheers,
Matthias
Re: rotation of planes [message #560987 is a reply to message #1772] Thu, 05 February 2009 12:22 Go to previous message
Matthias Then is currently offline Matthias ThenFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Jens,

thank you very much for your help!
I modified my code as you described and it works.
The only problem left is the intermodel-connection-bug you described in
your bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=263441 :-)

Cheers,
Matthias



Jens v.P. wrote:

> On 2009-02-03 11:37:20 +0100, Jens v.P. <developer@jevopi.de> said:
>> I haven't submitted a bug report, mea maxima culpa!

> Created a bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=263441
> I have attached an image to the bug report on which you can see the
> rotated planes. I also added a code snippet rotating the planes (around
> the z-axis).

> Cheers,

> Jens
Previous Topic:rotation of planes
Next Topic:really interesting
Goto Forum:
  


Current Time: Tue Apr 23 17:34:57 GMT 2024

Powered by FUDForum. Page generated in 0.03543 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top