Pertinant code snips:
showMask = new BitSet(2);
showMask.clear(0);
showMask.clear(1);
switchNode = new Switch(Switch.CHILD_MASK,showMask);
// switchNode.setWhichChild(Switch.CHILD_NONE);
switchNode.setCapability(Switch.ALLOW_SWITCH_READ);
switchNode.setCapability(Switch.ALLOW_SWITCH_WRITE);
tg.addChild(switchNode);
public void setShapeVisibility( boolean showIt ) {
boolean curSetting = showMask.get(0);
if (curSetting == showIt) return;
Log.log.println(LogType.EXHAUSTIVE,"Changing "+objectName+"
visibility to "+showIt);
if (showIt) showMask.set(0);
else showMask.clear(0);
switchNode.setChildMask(showMask);
infoChanged = true;
}
----- Original Message -----
From: Lan Wu-Cavener <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 11:57 AM
Subject: [JAVA3D] switch w/childMask - cry for help again
Hi, everyone:
I have not been successful in creating switch with childMask. Could any one
who had a successful experience using this type switch node send me an
example? Your help is very much appreciated.
Thanks in advance!
Lan Wu-Cavener
Research Associate and Programmer
Dept. of Landscape Architecture
===========================================================================
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".