Hello,

  I've attached a class I've been using for some time. It places red, green
blue axes in the picture. You can play with the values to make it your own.
It extends BranchGroup. If you simply place it into the same TransformGroup
as your shape, it will appear at the center (0,0,0) of the shape.

-----Original Message-----
From:   Chris McPherson [SMTP:[EMAIL PROTECTED]]
Sent:   Wednesday, July 14, 1999 12:10 AM
To:     [EMAIL PROTECTED]
Subject:        [JAVA3D] Putting 3D cartesian axis in Java 3D

I presently have a 3D shape that can rotate, scale and zoom according to
clicks of the mouse.  I now want to do two things with it.

1) I want to  put in some sort of reference frame for the model.  Ideally
this would be a cartesian XYZ axis centered at the shapes centre.  Another
possibility is to just put in a flat plane so the user can effectively see
the shape in reference to a floor.  Has anyone done anything like this ?
[Barry Walsh]   attached AxesBG.java


2) In terms of getting the shape to spin I have simply used the high level
MouseRotate functionality.  However, I actually want the shape to rotate
based on some numbers sent to it (such as 45 degrees around x axis).  Is
implementing this rotation very difficult ?
[Barry Walsh]  That isn't difficult, but what exactly do you want to do??
Will
this be in response to a mouse click? or just appearing with a 45 degree
rotation
and remaining in place?

3) Finally, I didn't really get any responses about placing my 3DCanvas in
to a JTabbedPane.  I've got the Java 3D aspect working fine in a MainFrame,
but when I transfer to a JTabbedPane it doesn't appear.  Any thoughts ?



[Barry Walsh]  I believe this is not possible. I have tried to place the
Canvas3D in
a variety of lightweight components and not had any luck. Even if it did
appear, it
would overly all the other components in the JTabbedPane because they are
lightweight.

Cheers
Chris McPherson


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

begin 600 AxesBG.java
M:6UP;W)T(&IA=F%X+FUE9&EA+FHS9"XJ.PUI;7!O<G0@:F%V87@N=F5C;6%T
M:"XJ.PUI;7!O<G0@8V]M+G-U;BYJ,V0N=71I;',N*CL-"@T*#7!U8FQI8R!C
M;&%S<R!!>&5S0D<@97AT96YD<R!"<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[EMAIL PROTECTED]*(" @(" @("!T:&ES+G-I>F4@/2!S
M:7IE.PT*(" @(" @("!I;FET*"D[#0H@(" @("!]#0H-"B @(" @('!R:79A
M=&4@=F]I9"!I;FET*"E[#0H-"B @(" @(" @+R\@9&5F:6YE('1H92!8(&%X
M:7,@=VET:" R('!O:6YT<PT*(" @(" @("!887AI<RYS971#;V]R9&EN871E
M*# L;F5W(%!O:6YT,V8H,"XP9BPP+C!F+# N,&8I*3L-"B @(" @(" @6&%X
M:7,N<V5T0V]O<F1I;F%T92@Q+&YE=R!0;VEN=#-F*'-I>F4L,"XP9BPP+C!F
M*2D[#0H@(" @(" @(%AA>&ES+G-E=$-O;&]R*# L<F5D*3L-"B @(" @(" @
M6&%X:7,N<V5T0V]L;W(H,2QR960I.PT*#0H@(" @(" @("\O9&5F:6YE('1H
M92!9(&%X:7,@=VET:" R('!O:6YT<PT*(" @(" @("!987AI<RYS971#;V]R
M9&EN871E*# L;F5W(%!O:6YT,V8H,"XP9BPP+C!F+# N,&8I*3L-"B @(" @
M(" @66%X:7,N<V5T0V]O<F1I;F%T92@Q+&YE=R!0;VEN=#-F*# N,&8L<VEZ
M92PP+C!F*2D[#0H@(" @(" @(%EA>&ES+G-E=$-O;&]R*# L9W)E96XI.PT*
M(" @(" @("!987AI<RYS971#;VQO<B@Q+&=R965N*3L-"@T*(" @(" @(" O
M+V1E9FEN92!T:&4@6B!A>&ES('=I=&@@,B!P;VEN=',-"B @(" @(" @6F%X
M:7,N<V5T0V]O<F1I;F%T92@P+&YE=R!0;VEN=#-F*# N,&8L,"XP9BPP+C!F
M*2D[#0H@(" @(" @(%IA>&ES+G-E=$-O;W)D:6YA=&4H,2QN97<@4&]I;G0S
M9B@P+C!F+# N,&8L<VEZ92DI.PT*(" @(" @("!:87AI<RYS971#;VQO<B@P
M+&)L=64I.PT*(" @(" @("!:87AI<RYS971#;VQO<B@Q+&)L=64I.PT*#0H@
M(" @(" @(&%D9$-H:6QD*&YE=R!3:&%P93-$*%AA>&ES+&YE=R!!<'!E87)A
M;F-E*"DI*3L-"B @(" @(" @861D0VAI;&0H;F5W(%-H87!E,T0H66%X:7,L
M;F5W($%P<&5A<F%N8V4H*2DI.PT*(" @(" @("!A9&1#:&EL9"AN97<@4VAA
M<&4S1"A:87AI<RQN97<@07!P96%R86YC92@I*2D[#0H@(" @(" @('-E=$-A
M<&%B:6QI='DH0G)A;F-H1W)O=7 N04Q,3U=?1$5404-(*3L-"@T*(" @( E]
M#0H-"@T*(" @(" @<'5B;&EC('9O:60@<V5T0V]L;W(H:6YT(&%X:7,L0V]L
M;W(S9B!C;VQO<BE[#0H-"B @(" @(" @<W=I=&-H*&%X:7,I>PT*(" @(" @
M(" @(&-A<V4@,#I[#0H@(" @(" @(" @("!887AI<RYS971#;VQO<B@P+&-O
M;&]R*3L-"B @(" @(" @(" @(%AA>&ES+G-E=$-O;&]R*#$L8V]L;W(I.PT*
M(" @(" @(" @(" @8G)E86L[#0H@(" @(" @(" @?0T*(" @(" @(" @(&-A
M<V4@,3I[#0H@(" @(" @(" @(" @6&%X:7,N<V5T0V]L;W(H,"QC;VQO<BD[
M#0H@(" @(" @(" @(" @6&%X:7,N<V5T0V]L;W(H,2QC;VQO<BD[#0H@(" @
M(" @(" @(" @8G)E86L[#0H@(" @(" @(" @?0T*(" @(" @(" @(&-A<V4@
M,CI[#0H@(" @(" @(" @(" @6&%X:7,N<V5T0V]L;W(H,"QC;VQO<BD[#0H@
M(" @(" @(" @(" @6&%X:7,N<V5T0V]L;W(H,2QC;VQO<BD[#0H@(" @(" @
M(" @(" @8G)E86L[#0H@(" @(" @(" @?0T*(" @(" @(" @(&1E9F%U;'0Z
M('MB<F5A:SM]("\O(&1O(&YO=&AI;F<-"B @(" @("!]#0H@(" @("!]#0H-
#"@U]
`
end

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to