Please, short question on Java3D (around fast help, please)

A

Angelo

Hello,

I learn newly Java and Java3D programming and I have short questions
on it.
Because of this I search after fast help with it.

I hope to get help here.

At first I tell the whole task so that my current questions are
understandable.

The editor page in the appendix (Text1.txt) contains 3 components
numbers, this one sew from each other so are.

Up till now what I have done is it:

1- At first I have called the editor page, then drawn the points as
balls with a little radius.

2- The numbers then have already told you stories, of are (Text1.txt)
so sew from each other like me. Appears because of this have this
balls at the beginning only as a ball. It have I made an automatic
scaling so that have got the right ball form.

3- Up till now all this is taken care.

What I lack now is it:

1- The balls of the complicated list (Text1.txt) look as a rectangle
together. But their right form is cubic and not rectangle.
The reason for it is:
The convergence point is in the centre of the geometrical form (this
rectangle). They look that way because of this and also because of
this the current projection which I have now is, central projection.
To have the right geometrical form (cubic form), the convergence point
does not have stand of the geometrical form (above or below) and on
that one of the geometrical form a little far. As here on the centre.
Therefore the projection will be parallel projection and projection no
longer central. I can have the cubic form with that.

2- On another side I have drawn the balls on red colour and the
broader picture is black.
What I also must do now is it:
The edge of every ball must have another colour than red and black.
How blue.
I can change alone the colour of the whole ball, but only the edge, I
do not white-wash it yet.

The whole programme (Project.zip) finished off up till now and the
Editorseite (Text1.txt) stand on the following internet pages.

http://rapidshare.com/files/29601441/Project.zip.html

http://rapidshare.com/files/29601568/Text1.txt.html

We click on rush ace on the page HelloJava3D.java so that the whole
programme is called.
We then choose the editor page on the open window and we click on
opening so that the drawing is caused.
I have worked on it in Eclipse.

I am immediately available for further explanations.

I am address availably also under the following e-mail:

(e-mail address removed)


Yours

Angelo
 
A

Angelo

Hello again,

I have continued to work on the first question now.

I have found partial solution. But it is not quite turned.
This partial solution stands here below.

I get faults on the last line:
return transform;

I have written this part after this following part:

ppearance createAppearance() {

Color3f lColor1 = new Color3f(1.0f, 0.0f, 0.0f);
ColoringAttributes caL1 = new ColoringAttributes();
caL1.setColor(lColor1);
Appearance appL1 = new Appearance();
appL1.setColoringAttributes(caL1);
return appL1;


And can you further help me now?

My question is very short now.

Please, I need fast help

Greeting

Angelo


The partial solution is:

TransformGroup createCamera;
{
PhysicalEnvironment env;
PhysicalBody body;

ViewPlatform platform = new ViewPlatform();

Group head = new Group();
head.setCapability(Group.ALLOW_CHILDREN_EXTEND);

TransformGroup transform = new TransformGroup();
transform.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
transform.addChild(platform);
transform.addChild(head);

body = new PhysicalBody();
env = new PhysicalEnvironment();

View view = new View();
view.setBackClipDistance(100);
view.setPhysicalBody(body);
view.setPhysicalEnvironment(env);
view.attachViewPlatform(platform);

/**
* If I change the view policy from perspective to
* parallel, my view vanish. Probably due to some
* resizing problem. Any ideas why?
*/
view.setProjectionPolicy(View.PERSPECTIVE_PROJECTION);
view.setProjectionPolicy(View.PARALLEL_PROJECTION);

Canvas3D canvas;
view.addCanvas3D(canvas);

BoundingSphere bounds = null;
Transform3D location = viewAll(bounds);
transform.setTransform(location);

return transform;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top