Rob,
It is stated in the Java 3D doc. that the "new Shape3D()" has the
following default values :
Shape3D
public Shape3D()
Constructs a Shape3D node with default parameters. The default values are
as follows:
appearance : null
geometry : { null }
collision bounds : null
appearance override enable : false
The list of geometry components is initialized with a null geometry
component as the single element with an index of 0. A null geometry
component specifies that no geometry is drawn. A null appearance
component specifies that default values are used for all appearance
attributes.
Use Shape3D:setGeometry(Geometry geometry), if your intention is to have a
geometry per Shape3D.
regards,
Chien Yang
Java 3D Team.
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
> Date: Wed, 15 Nov 2000 11:08:58 -0000
> From: Rob Nugent <[EMAIL PROTECTED]>
> Subject: Re: [JAVA3D] Exception with 1.2.1 beta 1 (OGL)
> Comments: To: Uma Sabada <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
>
> Uma,
>
> I just checked my app. I am adding a single Geometry to my Shape3D, but
> when I call 'numGeometries()' it returns 2. The two geometries returned
> using 'getGeometry(int)' are reported as 'null' and the geometry I added
> respectively.
>
> I assume that you are aware of this part of the problem ? It is unclear from
> your
> notes whether you know that the no-params 'addGeometry()' is behaving in
> this manner.
>
> Thanks
> Rob
>
>
> Rob Nugent
> Development Manager
> Critical Path Southampton
> [EMAIL PROTECTED]
> http://www.cp.net
> Tel: +44 (0) 1489 585503
> Fax: +44 (0) 1489 881363
>
> ----- Original Message -----
> From: "Uma Sabada" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 14, 2000 8:51 PM
> Subject: Re: [JAVA3D] Exception with 1.2.1 beta 1 (OGL)
>
>
> > Qiuli:
> >
> > This problem is fixed in 1.2.1 beta2. You could workaround the problem in
> one of 2
> > ways:
> >
> > 1. Disable compile - Disabling compile in 1.2.1 beta1 should still give
> you the
> > same performance as .compile() in 1.2 while allowing you to benefit from
> any bug
> > fixes in 1.2.1 beta1.
> >
> > 2. Rearrange geometry - This bug occurs if you use shapes with multiple
> geometry
> > and the first geometry is null. You could rearrange your geometry list in
> the
> > shape such that the first entry is non-null.
> >
> >
> > -Uma
> > Java3D Team
> >
> > > MIME-version: 1.0
> > > X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
> > > Importance: Normal
> > > X-Priority: 3 (Normal)
> > > X-MSMail-priority: Normal
> > > Date: Tue, 14 Nov 2000 14:05:51 -0800
> > > From: Qiuli Sun <[EMAIL PROTECTED]>
> > > Subject: Re: [JAVA3D] Exception with 1.2.1 beta 1 (OGL)
> > > To: [EMAIL PROTECTED]
> > >
> > > I got the same problem. So I removed the 1.2.1 beta.
> > > -----Original Message-----
> > > From: Discussion list for Java 3D API
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Rob Nugent
> > > Sent: Tuesday, November 14, 2000 1:48 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [JAVA3D] Exception with 1.2.1 beta 1 (OGL)
> > >
> > >
> > > Hi,
> > >
> > > I just tried to move to Java 3D 1.2.1 beta 1 (OGL version) on WinNT
> 4.0
> > >
> > > I was previously on Java 1.2 (also OGL)
> > >
> > > I am now getting the following exception which wasn't occurring before
> :
> > >
> > > Exception in thread "main" java.lang.NullPointerException
> > > at
> javax.media.j3d.CompileState.addShape(CompileState.java:156)
> > > at
> > > javax.media.j3d.Shape3DRetained.merge(Shape3DRetained.java:1716)
> > > at
> javax.media.j3d.GroupRetained.merge(GroupRetained.java:1788)
> > > at
> > >
> javax.media.j3d.TransformGroupRetained.compile(TransformGroupRetained.java:3
> > > 08)
> > > at
> javax.media.j3d.GroupRetained.compile(GroupRetained.java:1761)
> > > at
> > >
> javax.media.j3d.BranchGroupRetained.compile(BranchGroupRetained.java:146)
> > > at
> > >
> javax.media.j3d.BranchGroupRetained.compile(BranchGroupRetained.java:121)
> > > at javax.media.j3d.BranchGroup.compile(BranchGroup.java:82)
> > > at rob.ref.Slab.<init>(Slab.java:649)
> > > at rob.ref.Wall.doSlab(Wall.java:66)
> > > at rob.ref.Room.doWallSlabs(Room.java:472)
> > > at rob.ref.House.init(House.java:119)
> > > at rob.ref.House.setRooms(House.java:168)
> > > at rob.ref.ManorHouse.<init>(ManorHouse.java:51)
> > > at rob.ref.Start.init(Start.java:286)
> > > at rob.ref.Start.main(Start.java:415)
> > >
> > > Any suggestions ?
> > >
> > > Thanks
> > > Rob
> > >
> > >
> > > Rob Nugent
> > > Development Manager
> > > Critical Path Southampton
> > > [EMAIL PROTECTED]
> > > http://www.cp.net
> > > Tel: +44 (0) 1489 585503
> > > Fax: +44 (0) 1489 881363
> > >
> >
> >
> ===========================================================================
> > 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".
> >
>
> ===========================================================================
> 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".
===========================================================================
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".