CC3NodePickingVisitor is a CC3NodeDrawingVisitor that is passed to a node when it is visited during node picking operations using color-buffer based picking. More...
#import <CC3NodeVisitor.h>
Public Member Functions | |
(void) | - close |
(void) | - open |
(GLuint) | - tagFromColor: |
CC3NodePickingVisitor is a CC3NodeDrawingVisitor that is passed to a node when it is visited during node picking operations using color-buffer based picking.
Node picking is the act of picking a 3D node from user input, such as a touch. One method of accomplishing this is to draw the scene such that each object is drawn in a unique solid color. Once the scene is drawn, the color of the pixel that has been touched can be read from the OpenGL ES color buffer, and mapped back to the object that was painted with that color.
- (void) close |
Resets the GL parameters that need to be returned to their original values after the picking algorithm has run.
This method is invoked automatically by CC3World touch handler when node picking is active. Usually, the application never needs to invoke this method directly.
- (void) open |
Establishes the GL parameters for painting nodes for use by the picking algorithm.
This method is invoked automatically by CC3World touch handler when node picking is active. Usually, the application never needs to invoke this method directly.
- (GLuint) tagFromColor: | (ccColor4B) | color |
Maps the specified color to an integer node tag.