Properties

CC3NodePickingVisitor Class Reference

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>

Inheritance diagram for CC3NodePickingVisitor:
Inheritance graph
[legend]
Collaboration diagram for CC3NodePickingVisitor:
Collaboration graph
[legend]

List of all members.

Properties

CC3NodepickedNode

Detailed Description

CC3NodePickingVisitor is a CC3NodeDrawingVisitor that is passed to a node when it is visited during node picking operations using color-buffer based picking.

The visit: method must be invoked with a CC3World instance as the arguement.

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. This drawing is performed in the background so that the user is unaware of the specialized coloring.

If antialiasing multisampling is active, before reading the color of the touched pixel, the multisampling framebuffer is resolved to the resolve framebuffer, and the resolve framebuffer is made active so that the color of the touched pixel can be read. After reading the color of the touched pixel, the multisampling framebuffer is made active in preparation of normal drawing operations.


Property Documentation

- (CC3Node *) pickedNode [read, assign]

The node that was most recently picked.


The documentation for this class was generated from the following file: