The Source for Java Technology Collaboration

Home » java.net Forums » Java Desktop Technologies » Java 3D

Thread: Please, delete this Thread!

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 9 - Last Post: May 7, 2007 9:02 AM by: stylertim
angelobaroudi

Posts: 16
Please, delete this Thread!
Posted: May 1, 2007 11:35 AM
 
  Click to reply to this thread Reply

Hello,

please delete this Thread!

This is taken care!

But I hope that I will get next time more.

Until next time

Greeting

Message was edited by: angelobaroudi

angelobaroudi

Posts: 16
Re: small question in Java3D
Posted: May 1, 2007 10:05 PM   in response to: angelobaroudi
 
  Click to reply to this thread Reply

Hello,

is my question understandable and clear?

Please, I wait for help.

Up till now, nobody has helped me at this question.

Greeting

Angelo

paulby

Posts: 2,068
Re: small question in Java3D
Posted: May 2, 2007 4:55 PM   in response to: angelobaroudi
 
  Click to reply to this thread Reply

You have 2 problems here

1) You need to scale the spheres so they don't intersect when the points are very close together

2) You need to move the view so that you can see these tiny spheres.

You are on the right track in terms of solving 1, and here is some code that will help with 2. It positions the view platform so that the supplied Bounds fills the view, where tg is the view platform transform group, sceneBounds is the bounds of the objects you want to see, fieldOfView is obvious and axis specifies which axis the resulting view will be along

private static double setViewpoint( TransformGroup tg, BoundingSphere sceneBounds,
double fieldOfView, int axis ) {
Transform3D viewTrans = new Transform3D();
Transform3D eyeTrans = new Transform3D();

// point the view at the center of the object
Point3d center = new Point3d();
sceneBounds.getCenter(center);
double radius = sceneBounds.getRadius();
Point3d eyePos = new Point3d(center);
Vector3d up = new Vector3d();

// pull the eye back far enough to see the whole object
double eyeDist = radius / Math.tan(fieldOfView / 2.0);
switch( axis ) {
case POSITIVE_X_AXIS :
eyePos.x += eyeDist;
up.y = 1;
break;
case POSITIVE_Y_AXIS :
eyePos.y += eyeDist;
up.z = -1;
break;
case POSITIVE_Z_AXIS :
eyePos.z += eyeDist;
up.y = 1;
break;
case NEGATIVE_X_AXIS :
eyePos.x -= eyeDist;
up.y = 1;
break;
case NEGATIVE_Y_AXIS :
eyePos.y -= eyeDist;
up.z = -1;
break;
case NEGATIVE_Z_AXIS :
eyePos.z -= eyeDist;
up.y = 1;
break;
}

viewTrans.setIdentity();
viewTrans.lookAt( eyePos, center, up );
viewTrans.invert();
// set the view transform
tg.setTransform(viewTrans);

return eyeDist;
}

angelobaroudi

Posts: 16
Re: small question in Java3D
Posted: May 3, 2007 10:59 AM   in response to: paulby
 
  Click to reply to this thread Reply

Hello,

Thank you very much for you!

This is taken care!

Until next time

Greeting

angelobaroudi

Posts: 16
please delete this Thread!
Posted: May 3, 2007 11:02 AM   in response to: angelobaroudi
 
  Click to reply to this thread Reply

Hello,

please delete this Thread!

This is taken care!

But I hope that I will get next time more.

Until next time

Greeting

kirillcool

Posts: 795
Re: please delete this Thread!
Posted: May 3, 2007 1:57 PM   in response to: angelobaroudi
 
  Click to reply to this thread Reply

Why did you delete the contents of your original question? The question has been answered and could have been archived for future reference (when somebody else has the same problem you had).

kcr

Posts: 1,109
Re: please delete this Thread!
Posted: May 4, 2007 7:44 AM   in response to: kirillcool
 
  Click to reply to this thread Reply

Yes, in general we do not delete old threads, since they make a useful archive. Deleting them would make this a less useful forum.

angelobaroudi

Posts: 16
Re: please delete this Thread!
Posted: May 7, 2007 8:08 AM   in response to: kcr
 
  Click to reply to this thread Reply

Hello again,

please see You my following new Thread in this forum:

"please, again short question on Java3D (around fast help, please)"

The whole solution which I up till now have stands there.

And I have the solution self-madely.

In this forum I have not got corresponding help!

Why does nobody help me?

I need fast help at my questions!

But in the forum I do not get help!

Greeting

Angelo

Message was edited by: angelobaroudi

kirillcool

Posts: 795
Re: please delete this Thread!
Posted: May 7, 2007 8:46 AM   in response to: angelobaroudi
 
  Click to reply to this thread Reply

> Why does nobody help me?
>
> I need fast help at my questions!
>
> But in the forum I do not get help!

Respect the forum rules. Don't assume that people are immediately available for answers - it's a free forum, people are away on weekends, people are getting ready for JavaOne, people spend time with their families, people want to get away from computer every now and then. Requesting fast help in a free forum is a major turnoff for a lot of people that otherwise would've helped you.

stylertim

Posts: 233
Re: please delete this Thread!
Posted: May 7, 2007 9:02 AM   in response to: kirillcool
 
  Click to reply to this thread Reply

Plus, there is a documentation for every well organized JAVA API, there is plenty of literatur, there are a lot of texts on the web and this thing on your shoulders called "head"! :) For me, researching for myself usally turns out to be quite a good learning experience and reasoning about a problem and a possible fix can only make you better!

And if you don't get any help here, you could think about the fact that it might be possible no forum member has ever run into the problem you've described. So don't be pissed off when this case gets real. We're all looking for answers here, but there is no guarantee you'll get one!

Think about it...




 XML java.net RSS