Interface OGLPickingFlagConvertor

All Known Implementing Classes:
DefaultPickingManager

public interface OGLPickingFlagConvertor
Abstraction allowing for the management and coordination of the string-based flags used by X3D to the integer masks used by Aviatrix3D.

The implementation of this interface needs to keep track of who is using the individual flags and to keep an appropriate mask set. Since both picking groups and the picking sensors use the strings to filter the picking, we need to make sure that the strings on both sides equate to the same bit mask. That's the job of this class.

X3D allows for unlimited numbers of potential object type flags, but AV3D is limited to 31 flags due to using an int for the collection. Though it is not expected that the user will use more than 31, the implementation will make it's best attempt at making sure it can. It will reference count the number used for a given name and when the count is back to zero, will return that bit mask back to the available pool.

Special Cases

  • The ALL string is always converted to 0xFFFFFFFF.
  • The NONE string is always converted to 0x0
  • If more than 30 flags are currently registered, 0x8FFFFFFF is returned
Version:
$Revision: 1.1 $
Author:
Justin Couch