Properties | List of all members
CC3TouchBox Class Reference

#import <CC3UtilityMeshNodes.h>

Inheritance diagram for CC3TouchBox:
Inheritance graph


CC3Box box
BOOL shouldAlwaysMeasureParentBoundingBox

Additional Inherited Members

- Instance Methods inherited from CC3MeshNode
(CC3Material *) - __deprecated
(void) - __deprecated
(void) - __deprecated
(void) - __deprecated
(void) - __deprecated
(void) - addTexture:
(CC3Face- deformedFaceAt:
(CC3Vector- deformedFaceCenterAt:
(CC3Vector- deformedFaceNormalAt:
(CC3Plane- deformedFacePlaneAt:
(CC3Vector- deformedVertexLocationAt:fromFaceAt:
(void) - drawWithVisitor:
(CC3Mesh *) - ensureMesh
(void) - expectsVerticallyFlippedTexture:inTextureUnit:
(BOOL) - expectsVerticallyFlippedTextureInTextureUnit:
(CC3Face- faceAt:
(CC3Vector- faceCenterAt:
(GLuint) - faceCountFromVertexCount:
(GLuint) - faceCountFromVertexIndexCount:
(CC3Face- faceFromIndices:
(CC3FaceIndices- faceIndicesAt:
(CC3FaceNeighbours- faceNeighboursAt:
(CC3Vector- faceNormalAt:
(CC3Plane- facePlaneAt:
(GLuint) - findFirst:globalIntersections:ofGlobalRay:acceptBackFaces:acceptBehindRay:
(GLuint) - findFirst:intersections:ofLocalRay:acceptBackFaces:acceptBehindRay:
(void) - flipHorizontallyTextureUnit:
(void) - flipTexturesHorizontally
(void) - flipTexturesVertically
(void) - flipVerticallyTextureUnit:
(CC3Material *) - makeMaterial
(CC3Mesh *) - makeMesh
(void) - moveMeshOriginTo:
(void) - moveMeshOriginToCenterOfGeometry
(void) - movePivotTo:
(void) - populateAsBitmapFontLabelFromString:fromFontFile:andLineHeight:andTextAlignment:andRelativeOrigin:andTessellation:
(void) - populateAsCenteredRectangleWithSize:
(void) - populateAsCenteredRectangleWithSize:andTessellation:
(void) - populateAsCenteredRectangleWithSize:andTessellation:withTexture:invertTexture:
(void) - populateAsCenteredRectangleWithSize:withTexture:invertTexture:
(void) - populateAsCenteredTexturedRectangleWithSize:
(void) - populateAsCenteredTexturedRectangleWithSize:andTessellation:
(void) - populateAsCubeMappedSolidBox:
(void) - populateAsDiskWithRadius:andTessellation:
(void) - populateAsHollowConeWithRadius:height:andTessellation:
(void) - populateAsLineStripWith:vertices:andRetain:
(void) - populateAsRectangleWithSize:andPivot:
(void) - populateAsRectangleWithSize:andPivot:andTessellation:
(void) - populateAsRectangleWithSize:andPivot:andTessellation:withTexture:invertTexture:
(void) - populateAsRectangleWithSize:andPivot:withTexture:invertTexture:
(void) - populateAsRectangleWithSize:andRelativeOrigin:
(void) - populateAsRectangleWithSize:andRelativeOrigin:andTessellation:
(void) - populateAsSolidBox:
(void) - populateAsSolidBox:withCorner:
(void) - populateAsSphereWithRadius:andTessellation:
(void) - populateAsTexturedBox:
(void) - populateAsTexturedBox:withCorner:
(void) - populateAsTexturedRectangleWithSize:andPivot:
(void) - populateAsTexturedRectangleWithSize:andPivot:andTessellation:
(void) - populateAsTriangle:withTexCoords:andTessellation:
(void) - populateAsWireBox:
(CC3Mesh *) - prepareParametricMesh
(void) - removeAllTextures
(void) - removeLocalShaders
(void) - repeatTexture:
(void) - repeatTexture:forTextureUnit:
(CC3ShaderProgram *) - selectShaderProgram
(void) - setTexture:forTextureUnit:
(void) - setTextureRectangle:forTextureUnit:
(void) - setVertexBitangent:at:
(void) - setVertexBoneIndex:forBoneInfluence:at:
(void) - setVertexBoneIndices:at:
(void) - setVertexBoneWeights:at:
(void) - setVertexColor4B:at:
(void) - setVertexColor4F:at:
(void) - setVertexHomogeneousLocation:at:
(void) - setVertexIndex:at:
(void) - setVertexLocation:at:
(void) - setVertexMatrixIndex:forVertexUnit:at:
(void) - setVertexMatrixIndices:at:
(void) - setVertexNormal:at:
(void) - setVertexTangent:at:
(void) - setVertexTexCoord2F:at:
(void) - setVertexTexCoord2F:at:forTextureUnit:
(void) - setVertexTexCoord2F:forTextureUnit:at:
(void) - setVertexWeight:forBoneInfluence:at:
(void) - setVertexWeight:forVertexUnit:at:
(void) - setVertexWeights:at:
(CC3Texture *) - textureForTextureUnit:
(CGRect) - textureRectangleForTextureUnit:
(void) - updateGLBuffers
(void) - updateVertexBitangentsGLBuffer
(void) - updateVertexBoneIndicesGLBuffer
(void) - updateVertexBoneWeightsGLBuffer
(void) - updateVertexColorsGLBuffer
(void) - updateVertexIndicesGLBuffer
(void) - updateVertexLocationsGLBuffer
(void) - updateVertexNormalsGLBuffer
(void) - updateVertexTangentsGLBuffer
(void) - updateVertexTextureCoordinatesGLBuffer
(void) - updateVertexTextureCoordinatesGLBufferForTextureUnit:
(CC3Vector- vertexBitangentAt:
(GLuint) - vertexBoneIndexForBoneInfluence:at:
(GLvoid *) - vertexBoneIndicesAt:
(GLfloat *) - vertexBoneWeightsAt:
(ccColor4B) - vertexColor4BAt:
(ccColor4F) - vertexColor4FAt:
(GLuint) - vertexCountFromFaceCount:
(CC3Vector4- vertexHomogeneousLocationAt:
(GLuint) - vertexIndexAt:
(GLuint) - vertexIndexCountFromFaceCount:
(CC3Vector- vertexLocationAt:
(GLuint) - vertexMatrixIndexForVertexUnit:at:
(GLvoid *) - vertexMatrixIndicesAt:
(CC3Vector- vertexNormalAt:
(CC3Vector- vertexTangentAt:
(ccTex2F) - vertexTexCoord2FAt:
(ccTex2F) - vertexTexCoord2FAt:forTextureUnit:
(ccTex2F) - vertexTexCoord2FForTextureUnit:at:
(GLfloat) - vertexWeightForBoneInfluence:at:
(GLfloat) - vertexWeightForVertexUnit:at:
(GLfloat *) - vertexWeightsAt:
- Class Methods inherited from CC3LocalContentNode
(ccColor4F) + localContentWireframeBoxColor
(void) + setLocalContentWireframeBoxColor:

Detailed Description

CC3TouchBox is a specialized node that creates an invisible box mesh that can be used to define a 3D region for touch activity.

If you do not set the box property explicitly, when you add an instance of this class as a child of another CC3Node, this node will automatically be populated as a box the same size as the bounding box of that parent. If the parent node contains other nodes, its bounding box will include its descendants, resulting in this mesh being populated to encapsulate all descendant nodes of its parent. The effect is to define a box-shaped touch region around a composite node that might be comprised of a number of smaller nodes with space in between them.

If the parent node contains descendants that are moving around, the bounding box of the parent node may be dynamic and constantly changing. If you want the touch box to track changes to the parent bounding box, set the shouldAlwaysMeasureParentBoundingBox property to YES.

You can also set the box property directly to create a box that is shaped differently than the bounding box of the parent. For example, you might want to do this if you want the touch box to be larger than the actual visible nodes, in order to make it easier to touch.

The mesh underlying this node is automatically populated when you set the box property, or when you add this node to a parent. You do not need to invoke any of the populateAs... methods directly.

Since this node is intended to be used as an invisible touch pad, the visible property of this node is initially set to NO, and the shouldAllowTouchableWhenInvisible property is initially set to YES. In addition, the bounding box of this mesh will not contribute to the bounding box of the parent.

Property Documentation

- (CC3Box) box

Indicates the size of the touch box.

Setting this property populates this node with a box mesh of the specified extent.

Instead of setting this property directly, you can automatically create the box mesh by simply adding this node to a parent CC3Node. If this property has not already been set when this node is added to a parent, the value of this property will automatically be set to the value of the boundingBox property of the parent.

If the parent node contains descendants that are moving around, the bounding box of the parent node may be dynamic and constantly changing. If you want the touch box to track changes to the parent bounding box, set the shouldAlwaysMeasureParentBoundingBox property to YES.

If you set this property directly, and then subsequently add this node to a parent, the value of this property will not change, and the underlying mesh will not be repopulated. By setting the value of this property directly, you can create a mesh box that is of a different size than the parent bounding box.

Setting this property to kCC3BoxNull will remove the underlying mesh.

The initial value of this property is kCC3BoxNull.

- (BOOL) shouldAlwaysMeasureParentBoundingBox

Indicates whether the dimensions of this node should automatically be remeasured on each update pass.

If this property is set to YES, the box will automatically be resized to account for movements by any descendant nodes of the parent node. To create a dynamic touch box that automatically adjusts as the descendants of the parent node move around, this property should be set to YES.

It is not necessary to set this property to YES to account for changes in the transform properties of the parent node itself.

When setting this property, be aware that dynamically measuring the bounding box of the parent node can be an expensive operation if the parent contains a number of descendant nodes.

The initial value of this property is NO.

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