Skip to main content

how to hide 3d objects

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-02-02

Dear All,

I'm new to Java 3d and am currently building an application where i want to be able to hide objects within the Vitual Universe by highlihgting a CheckBox in the UI which is already in position, similar to most 3d design packages - turning the layers on/off. I believe i am unable to use the likes of setVisible(false) and wondered if anyone had any suggestions

Also, i am aware of Switch but wondered if there was another/easier method

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-06-07


visibility can also be managed as follows:

- RenderingAttributes

Add a RenderingAttributes instance to the Shape3D's Appearance and call 'RenderingAttributes.setVisible(boolean visible)'. A single instance can be shared by adding it to several Apearances so that their Shape3D's visibility will be synchronized.

- SharedGroup and Link

Add the objects to SharedGroups and link them via a Link node to their parent in the scene graph. When calling 'Link.setSharedGroup(mySharedGroup)' the object(s) will be visible and when calling 'Link.setSharedGroup(null)' they will be invisible.