Raghav, But what you can do is
BoundingSphere newBounds; if (bounds instanceof BoundingSphere) newBounds = (BooundingSphere)bgroup.getBounds() else newBounds = new BoundingSphere(bgroup.getBounds()); Rgds Paul >Date: Wed, 17 Jul 2002 09:49:03 -0700 >From: Chien Yang <[EMAIL PROTECTED]> >Subject: Re: [JAVA3D] ClassCastException for BoundingBox >To: [EMAIL PROTECTED] >MIME-version: 1.0 >Content-transfer-encoding: 7BIT >Content-MD5: /+hmu21H3qyrpYk2Tr/wBg== >Delivered-to: [EMAIL PROTECTED] >Comments: To: [EMAIL PROTECTED] > >Raghav, > You can't typecast BoundingSphere to BoundingBox. J3D 1.3 is >responding correct, and it's likely that we've fixed a bug in J3D 1.1.3 >with J3D 1.3. > >thanks, > Chien Yang > Java 3D Team. > >> Date: Wed, 17 Jul 2002 09:49:13 +0530 >> From: Raghavendra R <[EMAIL PROTECTED]> >> Subject: [JAVA3D] ClassCastException for BoundingBox >> To: [EMAIL PROTECTED] >> MIME-version: 1.0 >> Content-transfer-encoding: 7bit >> X-Accept-Language: en-us >> Delivered-to: [EMAIL PROTECTED] >> User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4.1) >Gecko/20020508 Netscape6/6.2.3 >> >> Hi, >> >> I am getting a java.lang.ClassCastException when i do the following >> using J3D 1.3. Previously, i was using J3D 1.1.3 without any such >> exceptions. Is it not possible to typecast BoundingSphere / BoundingBox? >> >> BoundingBox bounds = new BoundingBox(pt1, pt2) ; >> >> BranchGroup bgroup ; >> bgroup.setBounds(bounds) ; >> >> BoundingSphere newBounds = (BoundingSphere)bgroup.getBounds() ; >> >> Thanks >> Raghav >> >> =========================================================================== >> 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". ---------------------------------------------------------- Paul Byrne Email : [EMAIL PROTECTED] Sun Microsystems Phone : (650) 786 9926 Visualization Software Group Fax : (650) 786 5852 ---------------------------------------------------------- =========================================================================== 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".