cocos3d  2.0.0
Properties | List of all members
CC3NodePickingVisitor Class Reference

#import <CC3NodeVisitor.h>

Inheritance diagram for CC3NodePickingVisitor:
Inheritance graph
[legend]

Properties

CC3NodepickedNode
 
GLuint tagColorShift
 
- Properties inherited from CC3NodeDrawingVisitor
GLuint current2DTextureUnit
 
ccColor4F currentColor
 
ccColor4B currentColor4B
 
GLuint currentCubeTextureUnit
 
CC3SkinSectioncurrentSkinSection
 
id< CC3RenderSurfacedefaultRenderSurface
 
ccTime deltaTime
 
CC3OpenGLgl
 
BOOL isDrawingEnvironmentMap
 
CC3Matrix4x3modelMatrix
 
CC3Matrix4x3modelViewMatrix
 
CC3Matrix4x4modelViewProjMatrix
 
CC3Matrix4x4projMatrix
 
id< CC3RenderSurfacerenderSurface
 
BOOL shouldDecorateNode
 
CC3Matrix4x3viewMatrix
 
CC3Matrix4x4viewProjMatrix
 
- Properties inherited from CC3NodeVisitor
CC3Cameracamera
 
CC3MaterialcurrentMaterial
 
CC3MeshcurrentMesh
 
CC3MeshNodecurrentMeshNode
 
CC3NodecurrentNode
 
CC3ShaderProgramcurrentShaderProgram
 
CC3CameradefaultCamera
 
NSUInteger lightCount
 
CC3PerformanceStatisticsperformanceStatistics
 
CC3Scenescene
 
BOOL shouldVisitChildren
 
CC3NodestartingNode
 
GLuint textureCount
 

Additional Inherited Members

- Instance Methods inherited from CC3NodeDrawingVisitor
(void) - alignShotWith:
 
(void) - disableUnusedTextureUnits
 
(void) - draw:
 
(CC3Matrix4x3 *) - eyeSpaceBoneMatrixAt:
 
(CC3Matrix4x3 *) - globalBoneMatrixAt:
 
(CC3Matrix4x3 *) - modelSpaceBoneMatrixAt:
 
(void) - populateModelMatrixFrom:
 
(void) - populateProjMatrixFrom:
 
(void) - populateViewMatrixFrom:
 
(void) - resetTextureUnits
 
- Class Methods inherited from CC3NodeVisitor
(id) + visitor
 

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 CC3Scene instance as the argument.

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.

Property Documentation

- (CC3Node*) pickedNode
readnonatomicstrong

The node that was most recently picked.

- (GLuint) tagColorShift
readwritenonatomicassign

Indicates the value to shift the bits of the value of the tag property of each node to determine the color to paint that node.

The initial value of this property is zero, indicating that the node tag value will not be shifted when converting it to and from a color. Increasing the value will increase the color separation between different nodes, which can be helpful during development when debugging node picking visually (ie- when the shouldDisplayPickingRender property of the CC3Scene is set to YES), However, increasing the shift value will also decrease the number of nodes that can be displayed and resolved on screen.

This value is a shift value that operates on the bits of the tag value. A value of one will effectively double the tag value before it is converted to a color, a value of two will quadruple the tag value, etc.


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