|
Replies:
9
-
Last Post:
May 7, 2007 9:02 AM
by: stylertim
|
|
|
|
|
|
|
Please, delete this Thread!
Posted:
May 1, 2007 11:35 AM
|
|
|
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
|
|
|
|
|
|
|
Re: small question in Java3D
Posted:
May 1, 2007 10:05 PM
in response to: angelobaroudi
|
|
|
Hello,
is my question understandable and clear?
Please, I wait for help.
Up till now, nobody has helped me at this question.
Greeting
Angelo
|
|
|
|
|
|
|
|
Re: small question in Java3D
Posted:
May 2, 2007 4:55 PM
in response to: angelobaroudi
|
|
|
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; }
|
|
|
|
|
|
|
|
Re: small question in Java3D
Posted:
May 3, 2007 10:59 AM
in response to: paulby
|
|
|
Hello,
Thank you very much for you!
This is taken care!
Until next time
Greeting
|
|
|
|
|
|
|
|
please delete this Thread!
Posted:
May 3, 2007 11:02 AM
in response to: angelobaroudi
|
|
|
Hello,
please delete this Thread!
This is taken care!
But I hope that I will get next time more.
Until next time
Greeting
|
|
|
|
|
|
|
|
Re: please delete this Thread!
Posted:
May 3, 2007 1:57 PM
in response to: angelobaroudi
|
|
|
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).
|
|
|
|
|
|
|
|
Re: please delete this Thread!
Posted:
May 4, 2007 7:44 AM
in response to: kirillcool
|
|
|
Yes, in general we do not delete old threads, since they make a useful archive. Deleting them would make this a less useful forum.
|
|
|
|
|
|
|
|
Re: please delete this Thread!
Posted:
May 7, 2007 8:08 AM
in response to: kcr
|
|
|
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
|
|
|
|
|
|
|
|
Re: please delete this Thread!
Posted:
May 7, 2007 8:46 AM
in response to: angelobaroudi
|
|
|
> 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.
|
|
|
|
|
|
|
|
Re: please delete this Thread!
Posted:
May 7, 2007 9:02 AM
in response to: kirillcool
|
|
|
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...
|
|
|
|
|