Hello java3D people.
I have been discovering this java3D mature API.
I like it.
Nevertheless I have been strugling for over a week (shame on me) to
add in front of my 'Camera' of little shape/avatar that will pretent to be the guy walking along
the 3D Scene.
I Tried a few thing (thanks Rolf for the code) but it seems I can't never see my shape/avatar
I have the Semlman book but I can't sem to find a good and simple example
with the 'avatar' issue.
Has someone a code example to help me ?
 
thanks 
Thierry, Paris, France
 
-------Original Message-------
 
 
Hi Thierry,
to 1.) thats what I meant...imagine any shooter, independent of the
direction you see the cross-hairs (graticule...)
          ...that cross hair is (could be) a shape3d which is added to
the ViewBranchGraph...->2.)
2.) eg a built (and the adding of the shape3D) of a viewBranch is in
that Method:
  private BranchGroup buildViewBranch(Canvas3D can3D, float backClip){
         BranchGroup viewBG=new BranchGroup();
         Transform3D setStartPos=new Transform3D();
         setStartPos.set(new Vector3d(0.0,0.0,0.0));
         viewTG=new TransformGroup(setStartPos);
         viewTG.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
 
viewTG.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
 
         ViewPlatform vpf=new ViewPlatform();
         viewTG.addChild(vpf);
         viewBG.addChild(viewTG);
         View view=new View();
         PhysicalBody pBody=new PhysicalBody();
         PhysicalEnvironment umgebung=new PhysicalEnvironment();
         view.setPhysicalBody(pBody);
         view.setPhysicalEnvironment(umgebung);
         view.addCanvas3D(can3D);
         view.setBackClipDistance(backClip);
         view.attachViewPlatform(vpf);
 
         return viewBG;
    }
 
//[in the most j3d examples the building of the viewBranchGraph is done
by using of SimpleUniverse, but this is a bit too limited...]
 
in the initializing Method is written:
 
         virtUniverse=new VirtualUniverse();
         locale=new Locale(virtUniverse);
         viewPosition=new BranchGroup();
         viewPosition=buildViewBranch(c,viewRange);
         viewTG.addChild(CROSSHAIR_SHAPE3D);
         viewPosition.compile();
         locale.addBranchGraph(viewPosition);
 
this could explain what I meant....
 
if you talking about "Buch" you maybe mean a german-tongued book...
the onliest I know is CliXX a good one for starting up with j3d
in english tongue there loads more! For starting I would adwise the
sun tutorial which absolutley exact explain how to use j3d..starting with
nice and tiny examples.....and also explaining exactly what a
ViewBranchGraph is
 
so in the hope I had helped you,
best regards
rolf
 
PS I am absolutley a non proffesional j3d user !!! just a hobby...so
there're could
be some better explanations, solutions than mine....
 
 
 
Thierry Milard (free) wrote:
 
> Rolf,
> I am relativeny new to java3D (2 months) [and the 3D].
> I find this API very nice and ... surprisingly quite mature.
>
> I am _also_ looking for a way to *detect* some specific *shapes*
> are in the *camera* "view Frustrum"(I think this is the name....).
> I am interested in your solution.
>
> Please could you be more "beginer understandable".
> When you say you are" adding the containing Branchgroup to the view
> BranchGraph":
> 1) By the word "Branchgroup"do you mean the BG witch contains the shapes
> you want to detects ?
> 2) What exactly do you mean by 'adding *to* the *ViewBranchGraph*' ?
> This code is what you meant ?
> theviewBranchGraph.addChild(theBranchGrouptodetect ); ??
> Thanks Rolf for your time.
> By the way if you know of a buch of code please don't hesitate to give
> the url.
> Thierry
> /-------Original Message-------/
>
> /*From:*/ Discussion list for Java 3D API
> /*Date:*/ mercredi 10 mars 2004 20:33:12
> /*Subject:*/ Re: [JAVA3D] can you tell if an object is in the current
> view?
>
> Hi Kevin,
> I'd managed this in adding the containing Branchgroup to the view
> BranchGraph, so everey transform, which change the vieplatform is also
> made for the "Corne-Object" I did it for an arrow to show the direction
> to the desired target.
> best regards
> rolf
>
> Kevin wrote:
>
> >All,
> >
> >Is there a way to find out if an object is in the current View or not?
> >I have an object that I would like to stay on the edge of the screen no
> >matter how I resize the window or move the viewpoint. Is there a better
> >or different way to do what I am wanting to do?
> >
> >Any help would be much appreciated.
> >
> >kddubb
> >
> >===========================================================================
> >To unsubscribe, send email to [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> and include in the body
> >of the message "signoff JAVA3D-INTEREST". For general help, send email to
> include in the body of the message "help".
> >
> >
> >
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> and include in the body
> of the message "signoff JAVA3D-INTEREST". For general help, send email to
> the body of the message "help".
>
> .
>
>
>
> ____________________________________________________
> - *Email has finally evolved* - *_Click Here_*
> <http://www.incredimail.com/redir.asp?ad_id=309&lang=9>===========================================================================
> 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".
 
 
 
--
Rolf Gabler-Mieck
c/o
LGI-Geographisches Institut der CAU-Kiel
Ludewig-Meyen Str. 14
24098 Kiel
Tel: +49 431-880.2955
FAX: +49 431-880.4658
 
 
 
===========================================================================
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".
 
 
____________________________________________________
  IncrediMail - Email has finally evolved - Click Here
=========================================================================== 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