MASON-INTEREST-L Archives

September 2006

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ryan Kadomoto <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Fri, 22 Sep 2006 11:14:59 -1000
Content-Type:
text/plain
Parts/Attachments:
text/plain (264 lines)
I tried the setBackdrop on the Display3D, but it didn't work quite right.
If I use setBackdrop(image, true), it renders the graphic as a sphere.
If I use setBackdrop(image, false), it gives me an error.
(java.lang.IllegalArgumentException: Width (-1) and height (200) cannot be
<= 0)

I actually want the image to be at z=0 and want it to be able to rotate.
I tried creating an ImagePortrayal3D object and using setObjectLocation as
mentioned below but that did not display the image.

Any thoughts?

Thanks,
Ryan

-----Original Message-----
From: MASON Multiagent Simulation Toolkit
[mailto:[log in to unmask]] On Behalf Of Gabriel Catalin Balan
Sent: Friday, September 22, 2006 2:17 AM
To: [log in to unmask]
Subject: Re: MASON-INTEREST-L Digest - 17 Sep 2006 to 21 Sep 2006 (#2006-56)

There's already a method for it in Display3D:

    public void setBackdrop(Image image, boolean spherical)

Gabriel


On Fri, 22 Sep 2006, MASON-INTEREST-L automatic digest system wrote:

> There is 1 message totalling 219 lines in this issue.
>
> Topics of the day:
>
>   1. Background Image in 3D Model
>
> ----------------------------------------------------------------------
>
> Date:    Thu, 21 Sep 2006 09:50:27 -1000
> From:    Ryan Kadomoto <[log in to unmask]>
> Subject: Background Image in 3D Model
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0050_01C6DD63.61506F80
> Content-Type: text/plain;
> 	charset="us-ascii"
> Content-Transfer-Encoding: 7bit
>
> 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
>
>
>
>
> ------=_NextPart_000_0050_01C6DD63.61506F80
> Content-Type: text/html;
> 	charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> <html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
> xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
> xmlns=3D"http://www.w3.org/TR/REC-html40">
>
> <head>
> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
> charset=3Dus-ascii">
> <meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
> <style>
> <!--
>  /* Style Definitions */
>  p.MsoNormal, li.MsoNormal, div.MsoNormal
> 	{margin:0in;
> 	margin-bottom:.0001pt;
> 	font-size:12.0pt;
> 	font-family:"Times New Roman";}
> a:link, span.MsoHyperlink
> 	{color:blue;
> 	text-decoration:underline;}
> a:visited, span.MsoHyperlinkFollowed
> 	{color:purple;
> 	text-decoration:underline;}
> span.EmailStyle17
> 	{mso-style-type:personal-compose;
> 	font-family:Arial;
> 	color:windowtext;}
> @page Section1
> 	{size:8.5in 11.0in;
> 	margin:1.0in 1.25in 1.0in 1.25in;}
> div.Section1
> 	{page:Section1;}
> -->
> </style>
>
> </head>
>
> <body lang=3DEN-US link=3Dblue vlink=3Dpurple>
>
> <div class=3DSection1>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>I am trying to place a background image in a 3D =
> model.<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>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.<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>What I tried to do so far is =
> this:<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>------------------------------------------------------=
> ----------<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>Image backgroundImage =3D
> Toolkit.getDefaultToolkit().getImage(&quot;imagefile.png&quot;);<o:p></o:=
> p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>SimplePortrayal3D backgroundImagePortrayal =3D new
> ImagePortrayal3D(backgroundImage);<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>model.ourWorld.setObjectLocation(backgroundImagePortra=
> yal,
> new Double3D(0.0, 0.0, 0.0));<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>------------------------------------------------------=
> ----------<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>ourWorld is a Continuous3D object in the SimState =
> model.<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>I am new to Mason and am working on some code that =
> another
> person created a while back.&nbsp; If anyone has any ideas or sample =
> code that would
> help, I would appreciate it.<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>Thank you,<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>RyanK<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> </div>
>
> </body>
>
> </html>
>
> ------=_NextPart_000_0050_01C6DD63.61506F80--
>
> ------------------------------
>
> End of MASON-INTEREST-L Digest - 17 Sep 2006 to 21 Sep 2006 (#2006-56)
> **********************************************************************
>

ATOM RSS1 RSS2