v2.0.2
Instance Methods | Class Methods | Properties | List of all members
CC3Billboard Class Reference

#import <CC3Billboard.h>

Inheritance diagram for CC3Billboard:
Inheritance graph
[legend]

Instance Methods

(void) - addShadowVolumesForLight:
 
(void) - alignToCamera:
 
(BOOL) - doesIntersectBounds:
 
(void) - draw2dWithinBounds:withRenderer:withVisitor:
 
(id) - initWithBillboard:
 
(id) - initWithName:withBillboard:
 
(id) - initWithTag:withName:withBillboard:
 
(void) - populateAsBoundingRectangle
 
(void) - resetBillboardBoundingRect
 
- 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:
 
- Instance Methods inherited from CC3LocalContentNode
(void) - checkDrawingOrder
 
(CC3Box- localContentBoundingBoxRelativeTo:
 
- Instance Methods inherited from CC3Node
(void) - addAndLocalizeChild:
 
(void) - addAnimation:asTrack:
 
(GLuint) - addAnimationFrom:to:
 
(void) - addAnimationFrom:to:asTrack:
 
(GLuint) - addAnimationFrom:to:ofBaseTrack:
 
(void) - addAnimationFrom:to:ofBaseTrack:asTrack:
 
(GLuint) - addAnimationFromCAFFile:
 
(void) - addAnimationFromCAFFile:asTrack:
 
(GLuint) - addAnimationFromCAFFile:linkedToCSFFile:
 
(void) - addAnimationFromCAFFile:linkedToCSFFile:asTrack:
 
(GLuint) - addAnimationFromFrame:toFrame:
 
(void) - addAnimationFromFrame:toFrame:asTrack:
 
(GLuint) - addAnimationFromFrame:toFrame:ofBaseTrack:
 
(void) - addAnimationFromFrame:toFrame:ofBaseTrack:asTrack:
 
(GLuint) - addAnimationFromPODFile:
 
(void) - addAnimationFromPODFile:asTrack:
 
(GLuint) - addAnimationInResource:
 
(void) - addAnimationInResource:asTrack:
 
(void) - addAnimationState:
 
(void) - addAxesDirectionMarkers
 
(void) - addChild:
 
(void) - addContentFromPODFile:
 
(void) - addContentFromPODFile:withName:
 
(void) - addContentFromPODResourceFile:
 
(void) - addContentFromPODResourceFile:withName:
 
(void) - addDirectionMarker
 
(void) - addDirectionMarkerColored:inDirection:
 
(void) - addShadowVolumes
 
(void) - addTransformListener:
 
(void) - alignInvertedTextures
 
(void) - alignTextures
 
(GLfloat) - animationBlendingWeightOnTrack:
 
(CCTime) - animationTimeOnTrack:
 
(NSString *) - appendStructureDescriptionTo:withIndent:
 
(void) - applyEffectNamed:inPFXResourceFile:
 
(void) - applyEffectNamed:inPFXResourceNamed:
 
(void) - applyLocalTransformsTo:
 
(CC3Node *) - asBumpMapLightTrackingWrapper
 
(CC3Node *) - asCameraTrackingWrapper
 
(CC3Node *) - asOrientingWrapper
 
(CC3Node *) - asTrackingWrapper
 
(void) - bindRestPose
 
(CC3Box- boundingBoxRelativeTo:
 
(void) - buildTransformMatrixWithVisitor:
 
(void) - cleanupActions
 
(CC3Node *) - closestNodeIntersectedByGlobalRay:
 
(BOOL) - containsAnimationOnTrack:
 
(id) - copy
 
(id) - copyWithName:
 
(void) - createBoundingVolume
 
(void) - createBoundingVolumes
 
(void) - createGLBuffers
 
(void) - createSkinnedBoundingVolumes
 
(CC3NodeBoundingVolume *) - defaultBoundingVolume
 
(void) - deleteBoundingVolumes
 
(void) - deleteGLBuffers
 
(NSString *) - describeAnimationStateForFrames:
 
(NSString *) - describeAnimationStateForFrames:fromTime:toTime:
 
(NSString *) - describeCurrentAnimationState
 
(void) - disableAllAnimation
 
(void) - disableAllAnimationOnTrack:
 
(void) - disableAllLocationAnimation
 
(void) - disableAllQuaternionAnimation
 
(void) - disableAllScaleAnimation
 
(void) - disableAnimation
 
(void) - disableAnimationOnTrack:
 
(void) - disableLocationAnimation
 
(void) - disableQuaternionAnimation
 
(void) - disableScaleAnimation
 
(BOOL) - doesIntersectBoundingVolume:
 
(BOOL) - doesIntersectFrustum:
 
(BOOL) - doesIntersectGlobalRay:
 
(BOOL) - doesIntersectNode:
 
(void) - doNotBufferVertexBitangents
 
(void) - doNotBufferVertexBoneIndices
 
(void) - doNotBufferVertexBoneWeights
 
(void) - doNotBufferVertexColors
 
(void) - doNotBufferVertexContent
 
(void) - doNotBufferVertexIndices
 
(void) - doNotBufferVertexLocations
 
(void) - doNotBufferVertexNormals
 
(void) - doNotBufferVertexPointSizes
 
(void) - doNotBufferVertexTangents
 
(void) - doNotBufferVertexTextureCoordinates
 
(void) - enableAllAnimation
 
(void) - enableAllAnimationOnTrack:
 
(void) - enableAllLocationAnimation
 
(void) - enableAllQuaternionAnimation
 
(void) - enableAllScaleAnimation
 
(void) - enableAnimation
 
(void) - enableAnimationOnTrack:
 
(void) - enableLocationAnimation
 
(void) - enableQuaternionAnimation
 
(void) - enableScaleAnimation
 
(void) - ensureRigidSkeleton
 
(void) - establishAnimationFrameAt:
 
(void) - establishAnimationFrameAt:onTrack:
 
(NSArray *) - flatten
 
(void) - flattenInto:
 
(void) - flipNormals
 
(void) - freezeAllInanimatesOnTrack:
 
(void) - freezeIfInanimateOnTrack:
 
(CCAction *) - getActionByTag:
 
(CC3NodeAnimation *) - getAnimationOnTrack:
 
(CC3NodeAnimationState *) - getAnimationStateOnTrack:
 
(CC3MeshNode *) - getMeshNodeNamed:
 
(CC3Node *) - getNodeNamed:
 
(CC3Node *) - getNodeTagged:
 
(CC3ShadowVolumeMeshNode *) - getShadowVolumeForLight:
 
(CC3Vector- globalLocationOfGlobalRayIntesection:
 
(CC3Matrix *) - globalRotationMatrix
 
(BOOL) - hasShadowVolumes
 
(BOOL) - hasShadowVolumesForLight:
 
(void) - hide
 
(BOOL) - isAnimationEnabledOnTrack:
 
(BOOL) - isDescendantOf:
 
(BOOL) - isShadowVisible
 
(void) - linkToPODNodes:
 
(CC3Vector- locationOfGlobalRayIntesection:
 
(void) - markAnimationDirty
 
(void) - markBoundingVolumeDirty
 
(void) - markTransformDirty
 
(PODStructPtr- nodePODStructAtIndex:fromPODResource:
 
(CC3NodePuncturingVisitor *) - nodesIntersectedByGlobalRay:
 
(void) - nodeWasDestroyed:
 
(void) - nodeWasTransformed:
 
(NSInteger) - numberOfRunningActions
 
(void) - pauseAllActions
 
(void) - prewarmForShadowVolumes
 
(void) - reattachBonesFrom:
 
(void) - releaseRedundantContent
 
(void) - remove
 
(void) - removeAllChildren
 
(void) - removeAllDirectionMarkers
 
(void) - removeAllTransformListeners
 
(void) - removeAnimation:
 
(void) - removeAnimationState:
 
(void) - removeAnimationTrack:
 
(void) - removeChild:
 
(void) - removeShaders
 
(void) - removeShadowVolumes
 
(void) - removeShadowVolumesForLight:
 
(void) - removeTransformListener:
 
(void) - resumeAllActions
 
(void) - retainVertexBitangents
 
(void) - retainVertexBoneIndices
 
(void) - retainVertexBoneWeights
 
(void) - retainVertexColors
 
(void) - retainVertexContent
 
(void) - retainVertexIndices
 
(void) - retainVertexLocations
 
(void) - retainVertexNormals
 
(void) - retainVertexPointSizes
 
(void) - retainVertexTangents
 
(void) - retainVertexTextureCoordinates
 
(void) - rotateBy:
 
(void) - rotateByAngle:aroundAxis:
 
(void) - rotateByAngle:aroundAxis:atLocation:
 
(void) - rotateByQuaternion:
 
(CCAction *) - runAction:
 
(CCAction *) - runAction:withTag:
 
(void) - selectShaders
 
(void) - setAnimationBlendingWeight:onTrack:
 
(void) - setSkeletalBoundingVolume:
 
(void) - show
 
(void) - stopAction:
 
(void) - stopActionByTag:
 
(void) - stopAllActions
 
(void) - touchDisableAll
 
(void) - touchEnableAll
 
(void) - trackTargetWithVisitor:
 
(void) - transformAndDrawWithVisitor:
 
(void) - translateBy:
 
(void) - updateAfterTransform:
 
(void) - updateBeforeTransform:
 
(void) - wasAdded
 
(void) - wasRemoved
 
- Instance Methods inherited from CC3Identifiable
(id) - copyAsClass:
 
(void) - copyUserDataFrom:
 
(id) - copyWithName:asClass:
 
(id) - copyWithZone:withName:
 
(id) - copyWithZone:withName:asClass:
 
(BOOL) - deriveNameFrom:
 
(BOOL) - deriveNameFrom:usingSuffix:
 
(NSString *) - fullDescription
 
(id) - init
 
(id) - initAtIndex:fromPODResource:
 
(void) - initUserData
 
(id) - initWithName:
 
(id) - initWithTag:
 
(id) - initWithTag:withName:
 
(GLuint) - nextTag
 
(void) - populateFrom:
 

Class Methods

(GLfloat) + deviceScaleFactor
 
(id) + nodeWithBillboard:
 
(id) + nodeWithName:withBillboard:
 

Properties

CCNode * billboard
 
CGRect billboardBoundingRect
 
CC3NodeBoundingAreaboundingVolume
 
BOOL isBillboard
 
CGPoint maximumBillboardScale
 
CGPoint minimumBillboardScale
 
CGPoint offsetPosition
 
BOOL shouldAlwaysMeasureBillboardBoundingRect
 
BOOL shouldDrawAs2DOverlay
 
BOOL shouldMaximizeBillboardBoundingRect
 
BOOL shouldNormalizeScaleToDevice
 
BOOL shouldUpdateUnseenBillboard
 
GLuint textureUnitIndex
 
GLfloat unityScaleDistance
 
- 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
 
CC3Materialmaterial
 
CC3Meshmesh
 
CCOpacity opacity
 
int podMaterialIndex
 
GLfloat reflectivity
 
CC3ShaderContextshaderContext
 
CC3ShaderProgramshaderProgram
 
GLfloat shininess
 
BOOL shouldApplyOpacityToColor
 
BOOL shouldCacheFaces
 
BOOL shouldDrawLowAlpha
 
BOOL shouldUseLighting
 
BOOL shouldUseLightProbes
 
ccColor4F specularColor
 
CC3Texturetexture
 
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
 
CC3WireframeBoundingBoxNodelocalContentWireframeBoxNode
 
BOOL shouldDrawLocalContentWireframeBox
 
- Properties inherited from CC3Node
CC3Vector sceneUpDirection __deprecated
 
CC3Vector worldUpDirection __deprecated
 
GLfloat scaleTolerance __deprecated
 
CC3TargettingConstraint
axisRestriction 
__deprecated
 
CC3Vector globalLightLocation __deprecated
 
CC3Matrix *transformMatrix __deprecated
 
CC3Matrix *transformMatrixInverted __deprecated
 
CC3Node *dirtiestAncestor __deprecated
 
CC3Matrix
*parentGlobalTransformMatrix 
__deprecated
 
CC3Matrix *parentTransformMatrix __deprecated
 
CC3Scene *world __deprecated
 
BOOL
shouldCleanupActionsWhenRemoved 
__deprecated
 
BOOL shouldCleanupWhenRemoved __deprecated
 
CC3CameraactiveCamera
 
ccColor4F ambientColor
 
CC3NodeAnimationanimation
 
CC3NodeAnimationStateanimationState
 
ccBlendFunc blendFunc
 
CC3Box boundingBox
 
CC3NodeBoundingVolumeboundingVolume
 
GLfloat boundingVolumePadding
 
GLfloat cameraDistanceProduct
 
CC3Vector centerOfGeometry
 
NSArray * children
 
CCColorRef color
 
BOOL containsAnimation
 
GLfloat decalOffsetFactor
 
GLfloat decalOffsetUnits
 
GLenum depthFunction
 
CC3NodeDescriptordescriptorNode
 
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
 
CC3MatrixglobalTransformMatrix
 
CC3MatrixglobalTransformMatrixInverted
 
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
 
CC3MatrixlocalTransformMatrix
 
CC3Vector location
 
CC3NormalScaling normalScalingMethod
 
CCOpacity opacity
 
CC3Nodeparent
 
CC3PerformanceStatisticsperformanceStatistics
 
GLint podContentIndex
 
GLint podParentIndex
 
GLint podTargetIndex
 
CC3Vector projectedLocation
 
CGPoint projectedPosition
 
CC3Quaternion quaternion
 
CC3Vector referenceUpDirection
 
GLfloat reflectivity
 
const char * renderStreamGroupMarker
 
CC3Vector rightDirection
 
CC3NoderootAncestor
 
CC3Vector rotation
 
GLfloat rotationAngle
 
CC3Vector rotationAxis
 
CC3Rotatorrotator
 
CC3Vector scale
 
CC3Scenescene
 
CC3ShaderContextshaderContext
 
CC3ShaderProgramshaderProgram
 
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
 
CC3SoftBodyNodesoftBodyNode
 
ccColor4F specularColor
 
NSString * structureDescription
 
CC3Nodetarget
 
CC3Vector targetLocation
 
CC3TargettingConstraint targettingConstraint
 
CC3Texturetexture
 
CC3NodetouchableNode
 
BOOL touchEnabled
 
NSSet * transformListeners
 
GLfloat uniformScale
 
CC3Vector upDirection
 
BOOL visible
 
CC3WireframeBoundingBoxNodewireframeBoxNode
 
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
 

Detailed Description

This CC3Node displays a 2D Cocos2D CCNode as part of the 3D scene.

The 2D node can be displayed in one of two ways, as determined by the value of the shouldDrawAs2DOverlay property:

CC3Billboards are useful for drawing a label, health-bar, speech-balloon, or some other 2D artifact in or on the 3D scene, and have that 2D artifact move along with this node as it moves through the 3D scene.

CC3Billboard is a type of CC3Node, and can therefore participate in a structural node assembly. An instance can be the child of another node, and the CC3Billboard itself can have child nodes.

The size of the 2D node will be automatically scaled based on the distance between the 3D billboard node and the 3D camera to keep the 2D artifact at the correct perspective as this node moves toward or away from the camera.

The perspective sizing of the 2D node can be influenced by two properties: minimumBillboardScale and maximumBillboardScale, which can define a minimum and maximum limits to which the node will be sized, respectively, relative to a nominal size. This capability is useful when the 2D node is a label, health-bar, or speech-balloon, and it is desirable to keep the text at a readable size, regardless of how near or far the node moves in the 3D scene, relative to the camera.

Since the scale of the 2D billboard is often automatically adjusted, you should be careful when setting the scale property of the 2D billboard. In particular, when the 2D node is embedded in the 3D scene, (the shouldDrawAs2DOverlay property is set to the default NO), the scale property of the 2D node will be directly manipulated if the value of the shouldNormalizeScaleToDevice property on this CC3Billboard is set to YES, and any value you set for the 2D node scale property will be ignored.

As with all CC3Nodes, CC3Billboards support the protocol CCRGBAProtocol. When wrapping a 2D CCNode billboard that also supports CCRGBAProtocol, changes to the CC3Billboard color and opacity properties will change those same properties in the encapsulated 2D CCNode billboard. When reading the color and opacity properties of the CC3Billboard, the value returned will be that of the 2D CCNode.

A CC3Billboard can, and should, have a bounding volume, but the bounding volume must be an instance of a subclass of CC3NodeBoundingArea, which maps the 2D boundary of the 2D node into the 3D scene, and when shouldDrawAs2DOverlay is YES, handles testing the 2D bounds of the 2D node against the bounds of the 2D drawing plane. The default bounding volume, as returned by the defaultBoundingVolume method, and created when the createBoundingVolume method is invoked, is an instance of CC3BillboardBoundingBoxArea.

Method Documentation

- (void) addShadowVolumesForLight: (CC3Light *)  aLight

Overridden to establish the underlying mesh, and to set the following properties to accommodate that a billboard is an open, planar mesh: shouldShadowBackFaces = YES shadowOffsetUnits = 0 shadowVolumeVertexOffsetFactor = kCC3DefaultShadowVolumeVertexOffsetFactor.

See the notes for the CC3Node addShadowVolumesForLight: method for detailed information about adding shadow volumes to nodes.

Implements CC3Node.

Provided by category CC3Billboard(ShadowVolumes).

- (void) alignToCamera: (CC3Camera *)  camera

Invoked automatically by the CC3Scene to configure the 2D node relative to the location of the camera, including ensuring the correct perspective.

If the value of the shouldDrawAs2DOverlay property is NO, the 2D node is embedded in the 3D scene. As such, the 2D node will naturally be drawn with the correct perspective projection, but invoking this method enforces the sizing restrictions specified in the minimumBillboardScale and maximumBillboardScale properties.

If the value of the shouldDrawAs2DOverlay property is YES, the 2D node is overlaid on the 3D scene at a 2D position determined by projecting the location of the node onto the camera view. This position is cached in the projectedPosition property of this node.

In addition, with the shouldDrawAs2DOverlay property set to YES, since the 2D node is drawn over the whole 3D scene, As such, the 2D node will not have natural perspective projection. To mimic perspetive sizing, this method scales the 2D node according to the distance between this node and the camera, relative to a scale of one at the unityScaleDistance, taking into consideration the sizing restrictions specified in the minimumBillboardScale and maximumBillboardScale properties.

This method is invoked automatically by CC3Scene. Usually, the application never needs to invoke this method directly.

+ (GLfloat) deviceScaleFactor

The scaling factor used to adjust the scale of the 2D overlay node so that it's size relative to the 3D artifacts appears consistent across all device screen resolutions, if the shouldNormalizeScaleToDevice property is set to YES.

The value returned depends on the device screen window size and is normalized to the original iPhone/iPod Touch screen size of 480 x 320. The value returned for an original iPhone or iPod Touch will be 1.0. The value returned for other devices depends on the screen resolution, and formally, on the screen height as measured in pixels. Devices with larger screen heights in pixels will return a value greater than 1.0. Devices with smaller screen heights in pixels will return a value less than 1.0

- (BOOL) doesIntersectBounds: (CGRect)  bounds

Returns whether the local content of this node intersects the given bounding rectangle.

This check does not include checking children, only the local content.

If the value of the shouldDrawAs2DOverlay property is YES, this method is invoked during the drawing operations of each frame to determine whether this node should be culled from the visible nodes and not drawn. A return value of YES will cause the node to be drawn, a return value of NO will cause the node to be culled and not drawn.

Culling nodes that are not visible to the camera is an important performance enhancement. The node should strive to be as accurate as possible in returning whether it intersects the viewport. Incorrectly returning YES will cause wasted processing within the GL engine. Incorrectly returning NO will cause a node that should at least be partially visible to not be drawn.

In this implementation, if this node has a boundingVolume, this method delegates to it. Otherwise, it simply returns YES. Subclasses may override to change this standard behaviour.

The boundingVolume of a CC3Billboard must be an instance of a subclass of CC3NodeBoundingArea.

- (void) draw2dWithinBounds: (CGRect)  bounds
withRenderer: (CCRenderer *)  renderer
withVisitor: (CC3NodeDrawingVisitor *)  visitor 

If the value of the shouldDrawAs2DOverlay property is YES, and the 2D node is within the given bounds, draws the 2D node at the projected 2D position calculated in the alignToCamera: method.

This method is invoked automatically by CC3Scene at the end of each frame drawing cycle. Usually, the application never needs to invoke this method directly.

- (id) initWithBillboard: (CCNode *)  a2DNode

Initializes this unnamed instance with an automatically generated unique tag value, and the specified 2D node to be drawn.

- (id) initWithName: (NSString *)  aName
withBillboard: (CCNode *)  a2DNode 

Initializes this instance with an automatically generated unique tag value, and the specified name and 2D node to be drawn.

- (id) initWithTag: (GLuint)  aTag
withName: (NSString *)  aName
withBillboard: (CCNode *)  a2DNode 

Initializes this instance with the specified tag, name and 2D node to be drawn.

+ (id) nodeWithBillboard: (CCNode *)  a2DNode

Allocates and initializes an autoreleased unnamed instance with an automatically generated unique tag value, and the specified 2D node to be drawn.

+ (id) nodeWithName: (NSString *)  aName
withBillboard: (CCNode *)  a2DNode 

Allocates and initializes an autoreleased instance with an automatically generated unique tag value, and the specified name and 2D node to be drawn.

- (void) populateAsBoundingRectangle

Populates the underlying mesh so that it tracks the rectangular size of the 2D billboard CCNode.

In most cases, an underlying mesh is not necessary, as the 2D node performs its own drawing. However, there are situations where access to a rectangular mesh is useful or necessary, including the node picking algorithm, and when attaching shadow volumes to this node.

This method is automatically invoked when a shadow volume is added to this node, or if this node has been made touchable for selection using the node picking algorithm. This is performed automatically, and the application does not need to invoke this method when engaging node picking, or using shadow volumes.

This method can be used by the application in other circumstancs where access to an underlying rectangular mesh that is the same size as the 2D billboard node would be useful.

- (void) resetBillboardBoundingRect

Resets the value of the billboardBoundingRect property so that it will be measured again from the 2D node the next time the billboardBoundingRect is accessed.

You can use this method after you change the 2D node is a way that changes its boundary, to force the bounding rectangle of the 2D node to be re-measured and re-cached. An example might be when you change the text of a 2D label, which will change the boundary of the label.

Property Documentation

- (CCNode*) billboard
readwritenonatomicretain

The 2D artifact that this node will display.

This can be any CCNode subclass.

- (CGRect) billboardBoundingRect
readwritenonatomicassign

The rectangle, in pixels, bounding the 2D CCNode, in the local coordinate system of the 2D node.

This property is used by Cocos3D when each frame is drawn, to test whether this node is within the field of view of the camera and should be drawn. It is accessed on each rendering frame. The value of this property is also used when picking nodes from touch events.

The value of this property can be set directly, or it can be measured automatically from the size of the 2D node when accesssed as follows:

  • If the value of this property is left unset, the value will be lazily measured from the size of the 2D node the first time this property is accessed. The value of this property will then be cached for subsequent accesses, and will not be remeasured from the 2D node unless the resetBillboardBoundingRect method is invoked.
  • If the value of either of the shouldAlwaysMeasureBillboardBoundingRect or shouldDrawAs2DOverlay properties is YES, the value of this property will be measured from the size of the 2D node each time this property is accessed.
  • If the value of the shouldMaximizeBillboardBoundingRect property is YES, the value of this property will be measured from the size of the 2D node each time this property is accessed, and the maximum value of this property will be retained. In this situation, for a 2D node that changes shape and size over time, such as a particle system, the value of this property will grow over time to to the maximum size that the 2D node has become since this property was initialized or last reset using the resetBillboardBoundingRect method.

The choice of how to use this property depends on the type of 2D node being held. If the value of the shouldDrawAs2DOverlay property is set to NO (the default), the 2D node is embedded in the 3D scene, and the following applies:

  • For static 2D nodes, such as buttons, 2D sprites, or static text labels, the simplest thing to do is leave this property with the default value and allow it to be lazily measured from the 2D node the first time it is accessed, and cached for subsequent accesses.
  • For 2D nodes whose boundary change under app control, such as a text label, you can also allow this property to be lazily initialized, and then use the resetBillboardBoundingRect method whenever you know the size or shape of the 2D node has changed (eg- the text of the label has changed), to reset this property so that it will be measured again from the 2D node the next time this property is accessed.
  • For 2D nodes whose boundary changes dynamically, such as a text label that is frequently changed, or a 2D node whose scale or rotation changes under control of a CCAction, or a particle system, you can cause the boundary of the 2D node to be measured on each access of this property by setting the value of the shouldAlwaysMeasureBillboardBoundingRect property to YES.
  • For a particle system with many particles, measuring the boundary of the 2D every time this property is accessed (which is on each rendering frame) can be very computationally expensive. For a particle system that has a reasonable maximum boundary (like a flame, explosion, etc), you can pre-compute the boundary, and explicitly set this property to that pre-computed value. If the value of the shouldAlwaysMeasureBillboardBoundingRect property is left set to NO, then this pre-computed boundary will be retained and used for the life of the particle system, and the boundary will not be measured on each frame render.
  • To pre-compute the maximum boundary of a dynamic node like a particle system, you can temporarily set the shouldMaximizeBillboardBoundingRect property to YES (either at development time, or runtime start-up), running the particle system, and then extracting (or logging at development time) the maximum boundary that is accumulated.
  • For a particle system that spans a large amount of screen space, like rain or stars, you can either pre-compute a large boundary, or simply set the boundingVolume of this node to nil, in which case this property will be ignored, and the particle system will be drawn on every frame render, regardless of where the camera is pointed.

If the shouldDrawAs2DOverlay property is set to YES, the 2D node will be drawn as a 2D overlay, and the value of this property will be measured from the 2D node each time this property is accessed. This is because the boundary of the 2D overlay node changes dynamically as either the node or the camera is moved.

The initial value of this property is CGRectNull. If this node contains a 2D node, the value returned will be measured from the 2D node the first time this property is accessed, and cached for future access. If this node does not contain a 2D node, this property will simply return the CGRectNull value.

- (CC3NodeBoundingArea*) boundingVolume
readwritenonatomicretain

The bounding volume of this node must be an instance of CC3NodeBoundingArea or one of its subclasses.

- (BOOL) isBillboard
readnonatomicassign

Returns whether this node is a billboard.

Returns YES.

- (CGPoint) maximumBillboardScale
readwritenonatomicassign

The maximum scale to which the 2D node will be allowed to grow as it approaches the camera.

Setting this property to a non-zero value will stop the 2D node from growing too large as the 3D object approaches the camera. For example, you may want to keep a name label or speech-balloon at a readable text size, even if the character it is attached to is right in front of the camera.

The value of this property is relative to the unityScaleDistance. The 2D node will not grow to a size larger than its size at the unity distance multiplied by the value of this property. For example, if this property is set to 2.0, the 2D node will not grow to more than twice the size it appears when at the unityScaleDistance.

If this property is zero, no maximum will be applied. If this property is non-zero and is equal to the minimumBillboardScale, the 2D node will always be displayed at that single scale, regardless of how near or far this node is from the camera.

It is possible to specify different scales for each of the X and Y dimensions, if such behaviour makes sense.

- (CGPoint) minimumBillboardScale
readwritenonatomicassign

The minimum scale to which the 2D node will be allowed to shrink as it moves away from the camera.

Setting this property to a non-zero value will stop the 2D node from shrinking away to nothing as the 3D object recedes far from the camera. For example, you may want to keep a name label or speech-balloon readable, even if the character it is attached to is far from the camera.

The value of this property is relative to the unityScaleDistance. The 2D node will not shrink to a size smaller than its size at the unity distance multiplied by the value of this property. For example, if this property is set to 0.5, the 2D node will not shrink to less than one-half the size it appears when at the unityScaleDistance.

If this property is zero, no minimum will be applied. If this property is non-zero and is equal to the maximumBillboardScale, the 2D node will always be displayed at that single scale, regardless of how near or far this node is from the camera.

It is possible to specify different scales for each of the X and Y dimensions, if such behaviour makes sense.

- (CGPoint) offsetPosition
readwritenonatomicassign

An offset, measured in 2D display points, at which the 2D node should be positioned relative to the 2D projectedPosition of this node.

The initial value is {0, 0}. This property can be useful in helping to center or positionally justify the 2D artifact.

This property only has effect when the shouldDrawAs2DOverlay property is set to YES, indicating that the 2D node is being drawn as a 2D overlay to the 3D scene.

- (BOOL) shouldAlwaysMeasureBillboardBoundingRect
readwritenonatomicassign

Indicates whether the value of the billboardBoundingRect property should be measured from the 2D node each time the billboardBoundingRect property is accessed.

If the values of this property and the shouldMaximizeBillboardBoundingRect property are both set to NO, the boundary of the 2D node will only be measured the first time the billboardBoundingRect is accessed.

You can set this property to YES for dynamic 2D nodes whose boundary changes frequently or unpredicatably.

You should exercise caution in deciding to set this property to YES. The billboardBoundingRect property is accessed at least once per rendering frame during node culling, and the cost of re-measuring the boundary of some types of 2D nodes can be quite high. In particular, measuring the boundary of a particle system involves iterating though every particle vertex.

For 2D nodes whose boundary is expensive to measure, consider leaving this property set to NO, and either pre-calculating the maximum value of the billboardBoundingRect, and setting it explicitly, or using the resetBillboardBoundingRect method to measure the boundary of the 2D node only when necessary.

The initial value of this property is NO.

- (BOOL) shouldDrawAs2DOverlay
readwritenonatomicassign

Indicates whether this instance should be drawn in 2D as an overlay on top of the 3D scene, or embedded into the 3D scene.

When set to NO, the 2D CCNode will be drawn at the Z-depth of this node, and will be occluded if other 3D nodes are between this node and the camera. And, like other 3D nodes, it can be rotated in 3D to face away from the camera, and can be selected by touch events.

When set to YES, the 2D CCNode will be drawn after the 3D scene has completed drawing, and the GL engine has reverted to 2D rendering. The 2D node will ignore 3D depth testing, and will be drawn on top of all 3D nodes, even if there are other 3D nodes between this node and the camera. The CCNode will always appear to face directly towards the camera, and cannot be selected by touch events.

The initial value of this property is NO, indicating that the 2D node will be embedded into the 3D scene.

In most cases, you will simply want to leave this property with the default NO value. However, there are some cases where you want the 2D node to truly be displayed on top of the whole 3D scene. An example might be an identifier label or speech-balloon attached to a character in the game. You might want to display the label or speech-balloon even when the character is not visible becuase it is behind another object, or inside a building. You can attach this node to the character node and set the value of this property to YES. The label or speech- balloon will then move around as the character moves, but will remain visible even if the character moves behind another object in the scene.

- (BOOL) shouldMaximizeBillboardBoundingRect
readwritenonatomicassign

If the value of this property is set to YES, the boundary of the 2D node will be measured each time the billboardBoundingRect property is accessed, and the resulting value will be accumulated in the billboardBoundingRect property so that the resulting value of the billboardBoundingRect property will be an ever-growing rectangle that covers all areas covered by the 2D node since initialization of this node, or since the resetBillboardBoundingRect method was last invoked.

If the values of this property and the shouldAlwaysMeasureBillboardBoundingRect property are both set to NO, the boundary of the 2D node will only be measured the first time the billboardBoundingRect is accessed.

This property can be useful when pre-computing an appropriate fixed boundary for a dynamic 2D node such as a particle system, and is often used at development time. The resulting accumulated boundary can then be explicitly set into the billboardBoundingRect property (with both this property and the shouldAlwaysMeasureBillboardBoundingRect property set to NO) so that the cost of measuring the 2D boundary is not incurred during each rendering frame at runtime.

If a truly dynamic boundary is required at runtime, there is no advantage to using this property instead of the shouldAlwaysMeasureBillboardBoundingRect property. The performance cost is the same, and the resulting boundary will be less accurate.

The initial value of this property is NO.

- (BOOL) shouldNormalizeScaleToDevice
readwritenonatomicassign

Indicates whether the size of the 2D billboard node should be adjusted so that its size relative to the 3D artifacts appears to be the same across all devices.

The 3D camera frustum is consistent across all devices, making the view of the 3D scene consistent across all devices. The result is that on devices with larger screen resolutions, the 2D overlay node will be drawn across more pixels, and may appear visually larger.

If this property is set to YES, the scale of the 2D overlay node will be adjusted so that it appears to be the same size across all devices, relative to the 3D nodes.

If this property is set to NO, the 2D overlay node will be drawn in the same absolute pixel size across all devices, which may make it appear to be smaller or larger, relative to the 3D artifacts around it, on different devices.

This property has different effects, depending on the value of the shouldDrawAs2DOverlay property. If that property is set to YES, and the 2D node is being drawn as an overlay over the entire 3D scene, all 2D nodes will be adjusted.

However, if the shouldDrawAs2DOverlay property is set to NO, indicating that the 2D node is embedded in the 3D scene, the 2D node will be scaled by the value of the billboardContentScaleFactor property of the 2D node. Most 2D nodes do not require scaling adjustment when being drawn embedded in the 3D scene and will return 1.0 for this property. However, some 2D nodes, such as text labels and particle systems actively compensate for the screen resolution when drawing to a retina screen, and do need to be adjusted.

The initial value of this property is YES.

- (BOOL) shouldUpdateUnseenBillboard
readwritenonatomicassign

Indicates whether scheduled updates of the contained 2D billboard should continue when this node is outside the camera's view frustum.

The initial value of this property is YES, and for most 2D billboards that are not actively updated, this property can be left with that value. However, for certain active billboards such as particle systems, you can set this property to NO to pause unnecessary update activity when the billboard is not in view.

Since setting this property to NO will cause this node to attempt to pause and resume scheduled updates on the contained 2D billboard whenever this node transitions from being inside the camera frustum to outside, and vice-versa, you should only set this property to NO for 2D billboards that have a scheduled update.

The property does not affect any CCAction activities that might be running on the contained 2D billboard.

- (GLuint) textureUnitIndex
readwritenonatomicassign

The index of the GL texture unit to use when drawing the 2D CCNode.

The initial value of this property is zero. Cocos2D uses texture unit zero by default, and in most cases it is recommended that you use this initial value.

The value of this property must be between zero and one less than the maximum number of supported texture units. The maximum number of texture units is platform dependent, and can be read from the CC3OpenGL.sharedGL.maxNumberOfTextureUnits property.

- (GLfloat) unityScaleDistance
readwritenonatomicassign

The distance from the camera, in 3D space, at which the 2D artifact will be displayed at unity scale (its natural size).

This effect this property has depends on the value of the shouldDrawAs2DOverlay property.

If the value of the shouldDrawAs2DOverlay property is NO, the 2D node is embedded in the 3D scene and, like all other nodes, the size of the 2D node naturally changes as this node moves closer to or farther away from the camera. As such, this property has no effect on the size of the 2D node, and is used only as a reference when calculating the effect of the minimumBillboardScale and maximumBillboardScale properties.

If the value of the shouldDrawAs2DOverlay property is YES, the 2D node is overlaid on the 3D scene. To make it look like this billboard is a part of the scene, the scale of the 2D node is automatically adjusted. If this node is closer to the camera than the distance value of this property, the 2D artifact will be scaled up proportionally. If this node is farther from the camera than this distance, the 2D artifact will be scaled down proportionally.

If the value of this property is zero, the camera's near clip plane distance will be used as the unity scale distance.

The initial value of this property is zero.


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