Interface OGLPickingFlagConvertor
- All Known Implementing Classes:
DefaultPickingManager
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
-
Method Summary
Modifier and TypeMethodDescriptionint
addObjectType
(String type) Add a new flag to the system and get told what bitmask to use.void
removeObjectType
(String type) Notify the system that the flag is no longer being used by this node.
-
Method Details
-
addObjectType
Add a new flag to the system and get told what bitmask to use.- Parameters:
type
- The type string to use- Returns:
- An int bit mask to be applied
-
removeObjectType
Notify the system that the flag is no longer being used by this node.- Parameters:
type
- The type string to use
-