Properties | List of all members
CC3BitmapLabelNode Class Reference

#import <CC3BitmapLabelNode.h>

Inheritance diagram for CC3BitmapLabelNode:
Inheritance graph


GLfloat baseline
NSString * fontFileName
GLfloat fontSize
NSString * labelString
GLfloat lineHeight
CGPoint relativeOrigin
CC3Tessellation tessellation
NSTextAlignment textAlignment
- Properties inherited from CC3MeshNode
CC3Mesh *meshModel __deprecated
ccColor4F pureColor __deprecated
BOOL hasPremultipliedAlpha __deprecated
GLuint vertexUnitCount __deprecated
GLenum matrixIndexType __deprecated
ccColor4F ambientColor
ccBlendFunc blendFunc
CCColorRef color
ccColor4F diffuseColor
GLenum drawingMode
CC3NormalScaling effectiveNormalScalingMethod
ccColor4F emissionColor
BOOL expectsVerticallyFlippedTextures
GLuint faceCount
BOOL hasRigidSkeleton
BOOL hasSkeleton
BOOL hasTextureAlpha
BOOL hasTexturePremultipliedAlpha
BOOL isDrawingPointSprites
BOOL isOpaque
BOOL isUsingGLBuffers
CCOpacity opacity
int podMaterialIndex
GLfloat reflectivity
GLfloat shininess
BOOL shouldApplyOpacityToColor
BOOL shouldCacheFaces
BOOL shouldDrawLowAlpha
BOOL shouldUseLighting
BOOL shouldUseLightProbes
ccColor4F specularColor
GLuint textureCount
CGRect textureRectangle
GLuint vertexBoneCount
GLenum vertexBoneIndexType
GLenum vertexColorType
CC3VertexContent vertexContentTypes
GLuint vertexCount
GLuint vertexIndexCount
- Properties inherited from CC3LocalContentNode
CC3Box globalLocalContentBoundingBox
CC3Vector globalLocalContentCenterOfGeometry
CC3Box localContentBoundingBox
CC3Vector localContentCenterOfGeometry
BOOL shouldDrawLocalContentWireframeBox
- Properties inherited from CC3Node
CC3Vector sceneUpDirection __deprecated
CC3Vector worldUpDirection __deprecated
GLfloat scaleTolerance __deprecated
CC3Vector globalLightLocation __deprecated
CC3Matrix *transformMatrix __deprecated
CC3Matrix *transformMatrixInverted __deprecated
CC3Node *dirtiestAncestor __deprecated
CC3Matrix *parentTransformMatrix __deprecated
CC3Scene *world __deprecated
BOOL shouldCleanupWhenRemoved __deprecated
ccColor4F ambientColor
ccBlendFunc blendFunc
CC3Box boundingBox
GLfloat boundingVolumePadding
GLfloat cameraDistanceProduct
CC3Vector centerOfGeometry
NSArray * children
CCColorRef color
BOOL containsAnimation
GLfloat decalOffsetFactor
GLfloat decalOffsetUnits
GLenum depthFunction
ccColor4F diffuseColor
NSArray * directionMarkers
ccColor4F emissionColor
BOOL expectsVerticallyFlippedTextures
CC3Vector forwardDirection
CC3Box globalBoundingBox
CC3Vector globalCenterOfGeometry
CC3Vector globalForwardDirection
CC3Vector4 globalHomogeneousPosition
CC3Vector4 globalLightPosition
CC3Vector globalLocation
CC3Vector globalRightDirection
CC3Vector globalRotation
CC3Vector globalScale
CC3Vector globalUpDirection
BOOL hasLocalContent
BOOL hasSoftBodyContent
BOOL hasTarget
BOOL isAnimationEnabled
BOOL isBasePODNode
BOOL isBillboard
BOOL isCamera
BOOL isLight
BOOL isLightProbe
BOOL isMeshNode
BOOL isOpaque
BOOL isRunning
BOOL isScene
BOOL isShadowVolume
BOOL isTouchable
BOOL isTrackingForBumpMapping
BOOL isTransformDirty
BOOL isTransformRigid
BOOL isUniformlyScaledGlobally
BOOL isUniformlyScaledLocally
GLenum lineSmoothingHint
GLfloat lineWidth
CC3Vector location
CC3NormalScaling normalScalingMethod
CCOpacity opacity
GLint podContentIndex
GLint podParentIndex
GLint podTargetIndex
CC3Vector projectedLocation
CGPoint projectedPosition
CC3Quaternion quaternion
CC3Vector referenceUpDirection
GLfloat reflectivity
const char * renderStreamGroupMarker
CC3Vector rightDirection
CC3Vector rotation
GLfloat rotationAngle
CC3Vector rotationAxis
CC3Vector scale
GLfloat shadowExpansionLimitFactor
GLushort shadowLagCount
GLushort shadowLagFactor
GLfloat shadowOffsetFactor
GLfloat shadowOffsetUnits
NSArray * shadowVolumes
GLfloat shadowVolumeVertexOffsetFactor
GLfloat shininess
BOOL shouldAddShadowVolumeEndCapsOnlyWhenNeeded
BOOL shouldAllowTouchableWhenInvisible
BOOL shouldApplyOpacityAndColorToMeshContent
BOOL shouldAutoremoveWhenEmpty
BOOL shouldAutotargetCamera
BOOL shouldBlendAtFullOpacity
BOOL shouldCacheFaces
BOOL shouldCastShadows
BOOL shouldCastShadowsWhenInvisible
BOOL shouldCullBackFaces
BOOL shouldCullFrontFaces
BOOL shouldDisableDepthMask
BOOL shouldDisableDepthTest
BOOL shouldDrawAllBoundingVolumes
BOOL shouldDrawAllDescriptors
BOOL shouldDrawAllLocalContentWireframeBoxes
BOOL shouldDrawAllWireframeBoxes
BOOL shouldDrawBoundingVolume
BOOL shouldDrawDescriptor
BOOL shouldDrawInClipSpace
BOOL shouldDrawWireframeBox
BOOL shouldIgnoreRayIntersection
BOOL shouldInheritTouchability
BOOL shouldLogIntersectionMisses
BOOL shouldLogIntersections
BOOL shouldShadowBackFaces
BOOL shouldShadowFrontFaces
BOOL shouldSmoothLines
BOOL shouldStopActionsWhenRemoved
BOOL shouldTrackTarget
BOOL shouldUseClockwiseFrontFaceWinding
BOOL shouldUseFixedBoundingVolume
BOOL shouldUseLighting
BOOL shouldUseLightProbes
BOOL shouldUseSmoothShading
CC3Vector skeletalScale
ccColor4F specularColor
NSString * structureDescription
CC3Vector targetLocation
CC3TargettingConstraint targettingConstraint
BOOL touchEnabled
NSSet * transformListeners
GLfloat uniformScale
CC3Vector upDirection
BOOL visible
GLint zOrder
- Properties inherited from CC3Identifiable
NSObject *sharedUserData __deprecated
NSString * name
NSString * nameSuffix
GLint podIndex
BOOL shouldIncludeInDeepCopy
GLuint tag
NSObject * userData
- Properties inherited from <CC3Cacheable>
NSString * name

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

CC3BitmapLabelNode displays a rectangular mesh displaying the text of a specified string, built from bitmap character images taken from a texture atlas as defined by a bitmpped font configuration loaded from a font configuration file.

The labelString property specifies the string that is to be displayed in the bitmap font described in the bitmpa font file identified by the fontFileName property.

A compatible bitmap font configuration file, and associated texture, can be created using any of these editors: http://glyphdesigner.71squared.com/ (Commercial, Mac OS X) http://www.bmglyph.com/ (Commercial, Mac OS X - also available through AppStore) http://www.n4te.com/hiero/hiero.jnlp (Free, Java) http://slick.cokeandcode.com/demos/hiero.jnlp (Free, Java) http://www.angelcode.com/products/bmfont/ (Free, Windows only)

The texture that matches the specified font configuration (and identified in the font configuration), is automatically loaded and assigned to the texture property of this mesh node.

The text may be multi-line, and can be left-, center- or right-aligned, as specified by the textAlignment property. The resulting mesh can be positioned with its origin anywhere within the text rectangle using the relativeOrigin property.

For a more granular mesh, each character rectangle can be divided into many smaller divisions as defined by the tessellation property.

The properties of this class can be changed at any time to display a different text string, or to change the visual aspects of the label. Changing any of the properties in this class causes the underlying mesh to be automatically rebuilt.

The vertexContentType property of this mesh may be set to define the content type for each vertex. Content types kCC3VertexContentLocation, kCC3VertexContentNormal, and kCC3VertexContentTextureCoordinate are populated by this method.

If the vertexContentType property is not explicitly set, that property is automatically set to a value of (kCC3VertexContentLocation | kCC3VertexContentNormal | kCC3VertexContentTextureCoordinate), and the mesh will be populated with location, normal and texture coordinates for each vertex.

Property Documentation

- (GLfloat) baseline

Returns the position of the baseline of the font, as a fraction of the lineHeight property, as measured from the bottom of the label.

After setting the fontFileName property, you can use this property to set the relativeOrigin property if you want to position the local origin of this label on the baseline of the font. See the relativeOrigin property for more info.

This property returns zero if the fontFileName property has not been set.

- (NSString*) fontFileName

Indicates the name of the bitmap font file that contains the specifications of the font used to display the text.

This property can be changed at any time.

- (GLfloat) fontSize

Returns the nominal size of the font, in points or pixels.

This property returns zero if the fontFileName property has not been set.

- (NSString*) labelString

Indicates the string to be displayed.

This string may include newline characters (
) to create a multi-line label.

This property can be changed at any time to display a different text string.

- (GLfloat) lineHeight

The line height in the local coordinate system of this node.

This property can be changed at any time to change the size of the label layout.

The initial value of this property is zero. If the value of this property is not explicitly set to another value, it will return the value from the font configuration, once the fontFileName property is set, resulting in this label taking on the unscaled line height of the bitmapped font.

- (CGPoint) relativeOrigin

Indicates the location of the origin of the mesh, and is specified as a fraction of the size of the overall label layout, starting from the bottom-left corner.

The origin determines how the mesh will be positioned by the location property of this node, and is the point around which any rotational transformations take place.

For example, origins of (0,0), (0.5,0.5), and (1,1) indicate that the label mesh should be aligned so that the bottom-left corner, center, or top-right corner of the label text, respectively, should be located at the local origin of the corresponding mesh.

After the fontFileName property has been set, you can make use of the value of the baseline property to locate the local origin on the baseline of the font, by setting this property to (X, self.baseline), where X is a fraction indicating where the origin should be positioned horizontally.

The initial value of this property is {0,0}, indicating that this label node will have its origin at the bottom-left corner of the label text.

This property can be changed at any time.

- (CC3Tessellation) tessellation

Indicates the granularity of the mesh for each character.

For a more granular mesh, each character rectangle can be divided into many smaller divisions within the mesh. This essentially defines how many rectangular faces (quads) should be used to create each character.

Building a rectangular surface from multiple faces can dramatically improve realism when the surface is illuminated with specular lighting or a tightly focused spotlight, or if the mesh is to be deformed in some way by a later process (such as wrapping the text texture around some other shape).

The X & Y elements of this property indicate how each axis if the rectangle for each character should be divided into faces. The number of rectangular faces (quads) in the rectangle for each character will therefore be the multiplicative product of the X & Y elements of this property.

For example, if this property has a value of {3,2}, each character will be constructed from six smaller rectangular faces, arranged into a 3x2 grid.

The initial value of this property is {1,1}, indicating that, within the underlying mesh, each character will be constructed from a single rectangular face.

This property can be changed at any time.

- (NSTextAlignment) textAlignment

For multi-line labels, indicates how the lines should be aligned.

The initial value of this property is NSTextAlignmentLeft, indicating that multi-line text will be left-aligned.

This property can be changed at any time.

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