CapBitSelector

 

Image

 

Most subclasses of Java 3D™ SceneGraphObject have a set of capability bits and a corresponding set of capabilityIsFrequent bits.

Capability bits control if a particular attribute of a node or node component is readable or writable within a live or compiled scene graph for performance reasons.

Only one capability or capabilityIsFrequent bit may be set or cleared per method invocation (see SceneGraphObject javadoc).

These bits (integers) cannot be 'ORed' together, because they are numbered consecutively.

For each concerned class the capability bits can be considered as an unique bit position within a long number (64 bit). That's the way Java 3D stores them internally, but these 'longs' are not public.

Here are some relevant figures (without guarantee):

  • min cap bit: 0 / Node.ENABLE_COLLISION_REPORTING
  • max cap bit: 47 / Node.ALLOW_LOCAL_READ
  • most cap bits: 47 / ConeSound (all set: 281474976710651L)
  • caps are defined in 59 classes
  • caps are to be set/cleared in 83 non abstract classes
  • total cap bits: 362

CapBitSelector and its accompanying source code CapAndFrqBits allow to calculate these 'longs' respectively to set and clear the bits in a convenient way (according to Java 3D API 1.5).

Please, be aware that a 'long' alone doesn't tell you to which class it belongs or doesn't let you imagine which bits are set or cleared.


CapBitSelector 1.1, System requirement: JRE™ 5   [launch]

CapBitSelector1.1.zip: JimCapBitSelector.jar, CapAndFrqBits.java, license  [download]