What do you mean by faster? Is the frame rate faster? Or, does faster mean the actual execution of the code below?
Doug Twilleager Java 3D Team Sun Microsystems >Delivered-To: [EMAIL PROTECTED] >MIME-Version: 1.0 >Subject: [JAVA3D] Performance of Appearance Changes >To: [EMAIL PROTECTED] > >Hey folks, > >We have observed some interesting behavior when setting Appearance >attributes on large scene graphs, and I was wondering if anyone could >comment on this. > >We have found that building and setting the Appearance object (from scratch) >on a Shape3D node is actually faster than setting values for a few >attributes of an existing Appearance object. For example, the first block >below appears to execute faster than the subsequent block (as an example): > >// Build an Appearance object from scratch, and set it. >Appearance myNewAppearance = new Appearance(); >initAppearance(myNewAppearance); // this inits *all* relevant attributes on >the given object >myShape3D.setAppearance(myNewAppearance); > >// Change a few attributes on an existing Appearance object. >Appearance myExistingAppearance = myShape3D.getAppearance(); >myExistingAppearance.getPolygonAttributes().setFillMode(myFillMode); >myExistingAppearance.getRenderingAttributes().setVisible(myVisibleState); >myExistingAppearance.getColoringAttributes().setColor(mColor); > >Does that make sense? If so, why would building and setting the Appearance >object be faster than adjusting a few values on an existing Appearance >object? Thanks for any insight. > >- Mauricio =========================================================================== 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".
