Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GEF3D » How to use SphereFigureShape
How to use SphereFigureShape [message #690838] Thu, 30 June 2011 09:53 Go to next message
Eclipse UserFriend
Originally posted by:

Hi all,
are there any SphereFigureShape examples?
I've tried to use it in ShapeFigure3D, but it seems like it can't be
rendered properly. See attached screenshot.
Am I doing something wrong?

Here is my code.
public class FeatureFigure3D extends ShapeFigure3D {
....

@Override
protected Shape createShape() {
SphereFigureShape sphereFigureShape = new SphereFigureShape(this, 3);
sphereFigureShape.setFill(true);
setAlpha(0xBB);
´ return sphereFigureShape;
}
....
}

Best regards,
Dennis.
  • Attachment: Bild 1.png
    (Size: 56.58KB, Downloaded 497 times)
Re: How to use SphereFigureShape [message #691094 is a reply to message #690838] Thu, 30 June 2011 17:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by:

I found a solution:
in org.eclipse.draw3d.shapes.SphereShape
adding pos.setLocation3D(new Vector3fImpl(1f, 0f, 0f));
to static ROTATE_Z90 initialization does the trick.

static {
Position3DImpl pos = new Position3DImpl();
pos.setSize3D(new Vector3fImpl(1, 1, 1));
pos.setLocation3D(new Vector3fImpl(1f, 0f, 0f));
pos.setRotation3D(new Vector3fImpl(0, 0, (float) Math.PI / 2));
ROTATE_Z90 = pos;
}


Regards,
Dennis.

Am 30.06.11 11:53, schrieb Dennis Hübner:
> Hi all,
> are there any SphereFigureShape examples?
> I've tried to use it in ShapeFigure3D, but it seems like it can't be
> rendered properly. See attached screenshot.
> Am I doing something wrong?
>
> Here is my code.
> public class FeatureFigure3D extends ShapeFigure3D {
> ...
>
> @Override
> protected Shape createShape() {
> SphereFigureShape sphereFigureShape = new SphereFigureShape(this, 3);
> sphereFigureShape.setFill(true);
> setAlpha(0xBB);
> ´ return sphereFigureShape;
> }
> ...
> }
>
> Best regards,
> Dennis.
Re: How to use SphereFigureShape [message #726680 is a reply to message #691094] Mon, 19 September 2011 09:09 Go to previous messageGo to next message
Jens von Pilgrim is currently offline Jens von PilgrimFriend
Messages: 313
Registered: July 2009
Senior Member
Dear Dennis,

sorry for the delay... yes, the SphereShape is buggy, and we have an
open bug ofor that issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290578

We are in the process of moving to git, once we have finished that, I
will try to add your patch.

Thank your for the help,

Cheers,
Jens

On 30.06.11 19:26, Dennis Hübner wrote:
> I found a solution:
> in org.eclipse.draw3d.shapes.SphereShape
> adding pos.setLocation3D(new Vector3fImpl(1f, 0f, 0f));
> to static ROTATE_Z90 initialization does the trick.
>
> static {
> Position3DImpl pos = new Position3DImpl();
> pos.setSize3D(new Vector3fImpl(1, 1, 1));
> pos.setLocation3D(new Vector3fImpl(1f, 0f, 0f));
> pos.setRotation3D(new Vector3fImpl(0, 0, (float) Math.PI / 2));
> ROTATE_Z90 = pos;
> }
>
>
> Regards,
> Dennis.
>
Re: How to use SphereFigureShape [message #726853 is a reply to message #726680] Mon, 19 September 2011 17:38 Go to previous message
Eclipse UserFriend
Originally posted by:

Am 19.09.11 11:09, schrieb Jens v.P.:
> Dear Dennis,
>
> sorry for the delay... yes, the SphereShape is buggy, and we have an
> open bug ofor that issue:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=290578
>
> We are in the process of moving to git, once we have finished that, I
> will try to add your patch.
Sounds cool ...

>
> Thank your for the help,
>
> Cheers,
> Jens
>
> On 30.06.11 19:26, Dennis Hübner wrote:
>> I found a solution:
>> in org.eclipse.draw3d.shapes.SphereShape
>> adding pos.setLocation3D(new Vector3fImpl(1f, 0f, 0f));
>> to static ROTATE_Z90 initialization does the trick.
>>
>> static {
>> Position3DImpl pos = new Position3DImpl();
>> pos.setSize3D(new Vector3fImpl(1, 1, 1));
>> pos.setLocation3D(new Vector3fImpl(1f, 0f, 0f));
>> pos.setRotation3D(new Vector3fImpl(0, 0, (float) Math.PI / 2));
>> ROTATE_Z90 = pos;
>> }
>>
>>
>> Regards,
>> Dennis.
>>
Previous Topic:SphereShapes HashCode implementation too general for MultiEditors
Next Topic:LWJGL 2.8.2 update site problems
Goto Forum:
  


Current Time: Wed Apr 24 19:04:21 GMT 2024

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

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

Back to the top