Subject: | |
From: | |
Reply To: | |
Date: | Fri, 22 Sep 2006 18:46:34 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Ryan, I'm not sure what you mean by an "auto-scrolling" background
image in 3D. The 3D display doesn't have scroll bars. It's not the
same concept.
Java3D has two facilities for background images:
- An image that you just plop in the background behind everything
else (warning -- Java3D doesn't do this efficiently)
- A spherical image that you use to tile the outer boundaries of the
universe around you -- think of it as the "sky" in the background.
Mason can do both -- you just need to hook it in the right place in
Java3D.
Sean
On Sep 21, 2006, at 3:50 PM, Ryan Kadomoto wrote:
> I am trying to place a background image in a 3D model.
>
> I would like the background image to be Auto-Scaling and Auto-
> Scrolling, similar to what is described in the How-Tos (for 2D0 on
> the Mason web site.
>
>
>
> What I tried to do so far is this:
>
> ----------------------------------------------------------------
>
> Image backgroundImage = Toolkit.getDefaultToolkit().getImage
> ("imagefile.png");
>
> SimplePortrayal3D backgroundImagePortrayal = new ImagePortrayal3D
> (backgroundImage);
>
>
>
> model.ourWorld.setObjectLocation(backgroundImagePortrayal, new
> Double3D(0.0, 0.0, 0.0));
>
> ----------------------------------------------------------------
>
>
>
> ourWorld is a Continuous3D object in the SimState model.
>
>
>
>
>
> I am new to Mason and am working on some code that another person
> created a while back. If anyone has any ideas or sample code that
> would help, I would appreciate it.
>
>
>
>
>
> Thank you,
>
>
>
> RyanK
>
>
>
>
|
|
|