Home » Archived » GEF3D » How to use SphereFigureShape
How to use SphereFigureShape [message #690838] |
Thu, 30 June 2011 09:53 |
Eclipse User |
|
|
|
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 507 times)
|
|
|
Re: How to use SphereFigureShape [message #691094 is a reply to message #690838] |
Thu, 30 June 2011 17:26 |
Eclipse User |
|
|
|
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 |
|
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 |
Eclipse User |
|
|
|
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.
>>
|
|
|
Goto Forum:
Current Time: Tue Sep 24 05:46:55 GMT 2024
Powered by FUDForum. Page generated in 0.04352 seconds
|