Cocos2d-x  v4
cocos2d Namespace Reference

Copyright 2013 BlackBerry Inc. More...

Namespaces

 backend
 Command used to render one or more Triangles, which is similar to QuadCommand.
 

Classes

class  AABB
 Axis Aligned Bounding Box (AABB), usually calculate some rough but fast collision detection. More...
 
class  AccelAmplitude
 AccelAmplitude action. More...
 
class  AccelDeccelAmplitude
 AccelDeccelAmplitude action. More...
 
struct  Acceleration
 
class  Action
 Base class for Action objects. More...
 
class  ActionCamera
 Base class for Camera actions. More...
 
class  ActionEase
 Base class for Easing actions. More...
 
class  ActionFloat
 Action used to animate any value in range [from,to] over specified time interval. More...
 
class  ActionInstant
 Instant actions are immediate actions. They don't have a duration like the IntervalAction actions. More...
 
class  ActionInterval
 An interval action is an action that takes place within a certain period of time. It has an start time, and a finish time. The finish time is the parameter duration plus the start time. More...
 
class  ActionManager
 ActionManager is a singleton that manages all the actions. Normally you won't need to use this singleton directly. 99% of the cases you will use the Node interface, which uses this singleton. But there are some cases where you might need to use this singleton. Examples: More...
 
struct  ActionObjectScriptData
 For Lua, Wrapper the script data that should be used to find the handler corresponding to the Lua function by the nativeobject pointer and store the value pointer which would be converted concretely by the different events,then the converted data would be passed into the Lua stack. More...
 
class  ActionTween
 ActionTween. More...
 
class  ActionTweenDelegate
 The delegate class for ActionTween. More...
 
struct  AffineTransform
 
class  AmbientLight
 @js NA More...
 
class  Animate
 Animates a sprite given the name of an Animation. More...
 
class  Animate3D
 Animate3D, Animates a Sprite3D given with an Animation3D. More...
 
class  Animation
 
class  Animation3D
 static animation data, shared More...
 
class  Animation3DCache
 Animation3D Cache. More...
 
struct  Animation3DData
 animation data @js NA @lua NA More...
 
class  AnimationCache
 Singleton that manages the Animations. More...
 
class  AnimationCurve
 curve of bone's position, rotation or scale More...
 
class  AnimationFrame
 
struct  AnimationFrameData
 
class  AsyncTaskPool
 This class allows to perform background operations without having to manipulate threads. @js NA. More...
 
class  AtlasNode
 AtlasNode is a subclass of Node that implements the RGBAProtocol and TextureProtocol protocol. More...
 
class  AttachNode
 attach a node to a bone usage: auto sprite = Sprite3D::create("girl.c3b"); auto weapon = Sprite3D::create("weapon.c3b"); auto attachNode = sprite->getAttachNode("left hand"); attachNode->addChild(weapon); More...
 
class  AudioEngine
 Offers a interface to play audio. More...
 
class  AudioProfile
 @js NA More...
 
class  AutoPolygon
 AutoPolygon is a helper Object AutoPolygon's purpose is to process an image into 2d polygon mesh in runtime It has functions for each step in the process, from tracing all the points, to triangulation the result can be then passed to Sprite::create() to create a Polygon Sprite. More...
 
class  AutoreleasePool
 A pool for managing autorelease objects. More...
 
class  BaseLight
 @js NA More...
 
struct  BasicScriptData
 For Lua, Wrapper the script data that should be used to find the handler corresponding to the Lua function by the nativeobject pointer and store the value pointer which would be converted concretely by the different events,then the converted data would be passed into the Lua stack. More...
 
class  BezierBy
 An action that moves the target with a cubic Bezier curve by a certain distance. More...
 
class  BezierTo
 An action that moves the target with a cubic Bezier curve to a destination point. More...
 
class  BillBoard
 Inherit from Sprite, achieve BillBoard. More...
 
struct  BlendFunc
 
class  Blink
 Blinks a Node object by modifying it's visible attribute. More...
 
class  Bone3D
 Defines a basic hierarchical structure of transformation spaces. More...
 
class  Bundle3D
 Defines a bundle file that contains a collection of assets. More...
 
class  BundleReader
 BundleReader is an interface for reading sequence of bytes. More...
 
class  CallbackCommand
 Callback command is used to invoke a callback function when this command is executed. More...
 
class  CallFunc
 Calls a 'callback'. More...
 
class  CallFuncN
 Calls a 'callback' with the node as the first argument. N means Node. @js NA. More...
 
class  Camera
 Defines a camera . More...
 
class  CameraBackgroundBrush
 Defines a brush to clear the background of camera. More...
 
class  CameraBackgroundColorBrush
 Color brush clear buffer with given depth and color. More...
 
class  CameraBackgroundDepthBrush
 Depth brush clear depth buffer with given depth. More...
 
class  CameraBackgroundSkyBoxBrush
 Skybox brush clear buffer with a skybox. More...
 
class  CaptureScreenCallbackCommand
 CaptureScreenCallbackCommand is used to capture the screen. More...
 
class  CardinalSplineBy
 
class  CardinalSplineTo
 
class  CatmullRomBy
 
class  CatmullRomTo
 
class  ClippingNode
 ClippingNode is a subclass of Node. More...
 
class  ClippingRectangleNode
 Clipping Rectangle Node. More...
 
class  Clonable
 Interface that defines how to clone an Ref. More...
 
struct  Color3B
 RGB color composed of bytes 3 bytes. More...
 
struct  Color4B
 RGBA color composed of 4 bytes. More...
 
struct  Color4F
 RGBA color composed of 4 floats. More...
 
struct  CommonScriptData
 For Lua, the CommonScriptData is used to find the Lua function pointer by the handler, then call the Lua function by push the eventName, eventSource(if it not nullptr), eventSourceClassName(if it is nullptr or "", and the eventSource is not nullptr,would give the default string "cc.Ref") into the Lua stack as the parameter when the common event such as is triggered. More...
 
class  Configuration
 Configuration contains some openGL variables. More...
 
class  Controller
 A Controller object represents a connected physical game controller. @js NA. More...
 
class  CustomCommand
 Custom command is used to draw all things except triangle commands. More...
 
class  DeccelAmplitude
 DeccelAmplitude action. More...
 
class  DelayTime
 Delays the action a certain amount of seconds. More...
 
class  DirectionLight
 @js NA More...
 
class  Director
 Class that creates and handles the main Window and manages how and when to execute the Scenes. More...
 
class  DrawNode
 Node that draws dots, segments and polygons. Faster than the "drawing primitives" since they draws everything in one single batch. More...
 
class  EaseBackIn
 EaseBackIn action. More...
 
class  EaseBackInOut
 EaseBackInOut action. More...
 
class  EaseBackOut
 EaseBackOut action. More...
 
class  EaseBezierAction
 Ease Bezier. More...
 
class  EaseBounce
 EaseBounce abstract class. More...
 
class  EaseBounceIn
 EaseBounceIn action. More...
 
class  EaseBounceInOut
 EaseBounceInOut action. More...
 
class  EaseBounceOut
 EaseBounceOut action. More...
 
class  EaseCircleActionIn
 Ease Circle In. More...
 
class  EaseCircleActionInOut
 Ease Circle InOut. More...
 
class  EaseCircleActionOut
 Ease Circle Out. More...
 
class  EaseCubicActionIn
 Ease Cubic In. More...
 
class  EaseCubicActionInOut
 Ease Cubic InOut. More...
 
class  EaseCubicActionOut
 Ease Cubic Out. More...
 
class  EaseElastic
 Ease Elastic abstract class. More...
 
class  EaseElasticIn
 Ease Elastic In action. More...
 
class  EaseElasticInOut
 Ease Elastic InOut action. More...
 
class  EaseElasticOut
 Ease Elastic Out action. More...
 
class  EaseExponentialIn
 Ease Exponential In action. More...
 
class  EaseExponentialInOut
 Ease Exponential InOut. More...
 
class  EaseExponentialOut
 Ease Exponential Out. More...
 
class  EaseIn
 EaseIn action with a rate. More...
 
class  EaseInOut
 EaseInOut action with a rate. More...
 
class  EaseOut
 EaseOut action with a rate. More...
 
class  EaseQuadraticActionIn
 Ease Quadratic In. More...
 
class  EaseQuadraticActionInOut
 Ease Quadratic InOut. More...
 
class  EaseQuadraticActionOut
 Ease Quadratic Out. More...
 
class  EaseQuarticActionIn
 Ease Quartic In. More...
 
class  EaseQuarticActionInOut
 Ease Quartic InOut. More...
 
class  EaseQuarticActionOut
 Ease Quartic Out. More...
 
class  EaseQuinticActionIn
 Ease Quintic In. More...
 
class  EaseQuinticActionInOut
 Ease Quintic InOut. More...
 
class  EaseQuinticActionOut
 Ease Quintic Out. More...
 
class  EaseRateAction
 Base class for Easing actions with rate parameters. More...
 
class  EaseSineIn
 Ease Sine In. More...
 
class  EaseSineInOut
 Ease Sine InOut. More...
 
class  EaseSineOut
 Ease Sine Out. More...
 
class  Event
 Base class of all kinds of events. More...
 
class  EventAcceleration
 Accelerometer event. More...
 
class  EventCustom
 Custom event. More...
 
class  EventDispatcher
 This class manages event listener subscriptions and event dispatching. More...
 
class  EventFocus
 Focus event. More...
 
class  EventKeyboard
 Keyboard event. More...
 
class  EventListener
 The base class of event listener. If you need custom listener which with different callback, you need to inherit this class. For instance, you could refer to EventListenerAcceleration, EventListenerKeyboard, EventListenerTouchOneByOne, EventListenerCustom. More...
 
class  EventListenerAcceleration
 Acceleration event listener. @js NA. More...
 
class  EventListenerController
 
class  EventListenerCustom
 Custom event listener. More...
 
class  EventListenerFocus
 Focus event listener. More...
 
class  EventListenerKeyboard
 Keyboard event listener. @js cc._EventListenerKeyboard. More...
 
class  EventListenerMouse
 Mouse event listener. @js cc._EventListenerMouse. More...
 
class  EventListenerPhysicsContact
 Contact listener. More...
 
class  EventListenerPhysicsContactWithBodies
 This event listener only be called when bodyA and bodyB have contacts. More...
 
class  EventListenerPhysicsContactWithGroup
 This event listener only be called when shapeA or shapeB is in the group your specified. More...
 
class  EventListenerPhysicsContactWithShapes
 This event listener only be called when shapeA and shapeB have contacts. More...
 
class  EventListenerTouchAllAtOnce
 Multiple touches event listener. More...
 
class  EventListenerTouchOneByOne
 Single touch event listener. @js cc._EventListenerTouchOneByOne. More...
 
class  EventMouse
 The mouse event. More...
 
class  EventTouch
 Touch event. More...
 
class  FadeIn
 Fades In an object that implements the RGBAProtocol protocol. It modifies the opacity from 0 to 255. The "reverse" of this action is FadeOut. More...
 
class  FadeOut
 Fades Out an object that implements the RGBAProtocol protocol. It modifies the opacity from 255 to 0. The "reverse" of this action is FadeIn. More...
 
class  FadeOutBLTiles
 FadeOutBLTiles action. More...
 
class  FadeOutDownTiles
 FadeOutDownTiles action. More...
 
class  FadeOutTRTiles
 FadeOutTRTiles action. More...
 
class  FadeOutUpTiles
 FadeOutUpTiles action. More...
 
class  FadeTo
 Fades an object that implements the RGBAProtocol protocol. It modifies the opacity from the current value to a custom one. More...
 
class  FastTMXLayer
 FastTMXLayer represents the TMX layer. More...
 
class  FastTMXTiledMap
 FastTMXTiledMap knows how to parse and render a TMX map. More...
 
class  FileUtils
 Helper class to handle file operations. More...
 
class  FiniteTimeAction
 Base class actions that do have a finite time duration. Possible actions: More...
 
class  FlipX
 Flips the sprite horizontally. More...
 
class  FlipX3D
 FlipX3D action. More...
 
class  FlipY
 Flips the sprite vertically. More...
 
class  FlipY3D
 FlipY3D action. More...
 
class  Follow
 Follow is an action that "follows" a node. Eg: More...
 
struct  FontDefinition
 
struct  FontShadow
 types used for defining fonts properties (i.e. More...
 
struct  FontStroke
 
class  Frustum
 the frustum is a six-side geometry, usually use the frustum to do fast-culling: check a entity whether is a potential visible entity @js NA @lua NA More...
 
class  GLView
 By GLView you can operate the frame information of EGL view through some function. More...
 
class  Grid3D
 Grid3D is a 3D grid implementation. More...
 
class  Grid3DAction
 Base class for Grid3D actions. More...
 
class  GridAction
 Base class for Grid actions. More...
 
class  GridBase
 Base class for Other grid. More...
 
class  GroupCommand
 GroupCommand is used to group several command together, and more, it can be nested. More...
 
class  Hide
 Hide the node. More...
 
class  IMEDelegate
 Input method editor delegate. More...
 
class  IMEDispatcher
 Input Method Edit Message Dispatcher. More...
 
struct  IMEKeyboardNotificationInfo
 Keyboard notification event type. More...
 
class  JumpBy
 Moves a Node object simulating a parabolic jump movement by modifying it's position attribute. More...
 
class  JumpTiles3D
 JumpTiles3D action. More...
 
class  JumpTo
 Moves a Node object to a parabolic position simulating a jump movement by modifying it's position attribute. More...
 
struct  KeypadScriptData
 For Lua, the KeypadScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push the actionType converted to string type into the Lua stack as the parameters when the Keypad event is triggered. More...
 
class  Label
 Label is a subclass of Node that knows how to render text labels. More...
 
class  LabelAtlas
 LabelAtlas is a subclass of AtlasNode. More...
 
class  Layer
 Layer is a subclass of Node that implements the TouchEventsDelegate protocol. More...
 
class  LayerColor
 LayerColor is a subclass of Layer that implements the RGBAProtocol protocol. More...
 
class  LayerGradient
 LayerGradient is a subclass of LayerColor that draws gradients across the background. More...
 
class  LayerMultiplex
 MultipleLayer is a Layer with the ability to multiplex it's children. Features: More...
 
class  LayerRadialGradient
 LayerRadialGradient is a subclass of Layer that draws radial gradients across the background. More...
 
class  Lens3D
 Lens3D action. More...
 
class  Liquid
 Liquid action. More...
 
class  LuaBridge
 Build bridge between ObjC and Lua. More...
 
class  LuaCallFunc
 The LuaCallFunc is wrapped to call the callback function in the Lua Conveniently and don't insert useless code to processing the lua in the CallFuncN. More...
 
class  LuaEngine
 The Lua engine integrated into the cocos2d-x to process the interactive operation between lua and c++. More...
 
class  LuaObjcBridge
 Build a bridge between ObjectC and Lua script. More...
 
class  LuaStack
 LuaStack is used to manager the operation on the lua_State,eg., push data onto the lua_State, execute the function depended on the lua_State. More...
 
class  LuaValue
 Wrap different general types of data into a same specific type named LuaValue. More...
 
class  Map
 Similar to std::unordered_map, but it will manage reference count automatically internally. More...
 
class  Mat4
 Defines a 4 x 4 floating point matrix representing a 3D transformation. More...
 
class  Material
 Material. More...
 
struct  MaterialData
 material data, @js NA @lua NA More...
 
struct  MaterialDatas
 material datas, since 3.3 @js NA @lua NA More...
 
class  MathUtil
 Defines a math utility class. More...
 
class  Menu
 A Menu for touch handling. More...
 
class  MenuItem
 MenuItem base class. More...
 
class  MenuItemAtlasFont
 A MenuItemAtlasFont. More...
 
class  MenuItemFont
 A MenuItemFont. More...
 
class  MenuItemImage
 MenuItemImage accepts images as items. More...
 
class  MenuItemLabel
 An abstract class for "label" MenuItemLabel items. More...
 
class  MenuItemSprite
 MenuItemSprite accepts Node<RGBAProtocol> objects as items. More...
 
class  MenuItemToggle
 A MenuItemToggle. More...
 
class  Mesh
 Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on. More...
 
struct  MeshData
 mesh data @js NA @lua NA More...
 
struct  MeshDatas
 mesh datas @js NA @lua NA More...
 
class  MeshIndexData
 the MeshIndexData class. More...
 
class  MeshSkin
 MeshSkin, A class maintain a collection of bones that affect Mesh vertex. More...
 
struct  MeshVertexAttrib
 mesh vertex attribute @js NA @lua NA More...
 
class  MeshVertexData
 the MeshVertexData class. More...
 
struct  ModelData
 model node data, since 3.3 @js NA @lua NA More...
 
class  MotionStreak
 Creates a trailing path. More...
 
class  MotionStreak3D
 Creates a trailing path. It is created from a line segment sweeping along the path. More...
 
class  MoveBy
 Moves a Node object x,y pixels by modifying it's position attribute. x and y are relative to the position of the object. Several MoveBy actions can be concurrently called, and the resulting movement will be the sum of individual movements. More...
 
class  MoveTo
 Moves a Node object to the position x,y. x and y are absolute coordinates by modifying it's position attribute. Several MoveTo actions can be concurrently called, and the resulting movement will be the sum of individual movements. More...
 
class  NinePatchImageParser
 A class for paring Android .9 patch image. More...
 
class  Node
 Node is the base element of the Scene Graph. Elements of the Scene Graph must be Node objects or subclasses of it. The most common Node objects are: Scene, Layer, Sprite, Menu, Label. More...
 
struct  NodeData
 Node data, since 3.3 @js NA @lua NA. More...
 
struct  NodeDatas
 node datas, since 3.3 @js NA @lua NA More...
 
class  NodeGrid
 Base class for Grid Node. More...
 
struct  NTextureData
 new material, since 3.3 @js NA @lua NA More...
 
class  OBB
 Oriented Bounding Box(OBB) More...
 
class  OrbitCamera
 OrbitCamera action. Orbits the camera around the center of the screen using spherical coordinates. More...
 
class  PageTurn3D
 This action simulates a page turn from the bottom right hand corner of the screen. More...
 
class  ParallaxNode
 ParallaxNode: A node that simulates a parallax scroller. More...
 
class  ParticleBatchNode
 ParticleBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call (often known as "batch draw"). More...
 
class  ParticleExplosion
 An explosion particle system. More...
 
class  ParticleFire
 A fire particle system. More...
 
class  ParticleFireworks
 A fireworks particle system. More...
 
class  ParticleFlower
 A flower particle system. More...
 
class  ParticleGalaxy
 A galaxy particle system. More...
 
class  ParticleMeteor
 A meteor particle system. More...
 
class  ParticleRain
 A rain particle system. More...
 
class  ParticleSmoke
 An smoke particle system. More...
 
class  ParticleSnow
 An snow particle system. More...
 
class  ParticleSpiral
 An spiral particle system. More...
 
class  ParticleSun
 A sun particle system. More...
 
class  ParticleSystem
 Particle System base class. Attributes of a Particle System: More...
 
class  ParticleSystemQuad
 ParticleSystemQuad is a subclass of ParticleSystem. More...
 
class  PhysicsBody
 A body affect by physics. More...
 
class  PhysicsContact
 Contact information. More...
 
class  PhysicsContactPostSolve
 Postsolve value generated when onContactPostSolve called. More...
 
class  PhysicsContactPreSolve
 Presolve value generated when onContactPreSolve called. More...
 
class  PhysicsHelper
 A physics helper class. More...
 
class  PhysicsJoint
 An PhysicsJoint object connects two physics bodies together. More...
 
class  PhysicsJointDistance
 Set the fixed distance with two bodies. More...
 
class  PhysicsJointFixed
 A fixed joint fuses the two bodies together at a reference point. More...
 
class  PhysicsJointGear
 Keeps the angular velocity ratio of a pair of bodies constant. More...
 
class  PhysicsJointGroove
 Attach body a to a line, and attach body b to a dot. More...
 
class  PhysicsJointLimit
 A limit joint imposes a maximum distance between the two bodies, as if they were connected by a rope. More...
 
class  PhysicsJointMotor
 Keeps the relative angular velocity of a pair of bodies constant. More...
 
class  PhysicsJointPin
 A pin joint allows the two bodies to independently rotate around the anchor point as if pinned together. More...
 
class  PhysicsJointRatchet
 Works like a socket wrench. More...
 
class  PhysicsJointRotaryLimit
 Likes a limit joint, but works with rotary. More...
 
class  PhysicsJointRotarySpring
 Likes a spring joint, but works with rotary. More...
 
class  PhysicsJointSpring
 Connecting two physics bodies together with a spring. More...
 
class  PhysicsShape
 A shape for body. More...
 
class  PhysicsShapeBox
 A box shape. More...
 
class  PhysicsShapeCircle
 A circle shape. More...
 
class  PhysicsShapeEdgeBox
 An edge box shape. More...
 
class  PhysicsShapeEdgeChain
 A chain shape. More...
 
class  PhysicsShapeEdgePolygon
 An edge polygon shape. More...
 
class  PhysicsShapeEdgeSegment
 A segment shape. More...
 
class  PhysicsShapePolygon
 A polygon shape. More...
 
class  PhysicsWorld
 An PhysicsWorld object simulates collisions and other physical properties. You do not create PhysicsWorld objects directly; instead, you can get it from an Scene object. More...
 
class  Place
 Places the node in a certain position. More...
 
class  Plane
 Defines plane @js NA @lua NA. More...
 
class  PointArray
 An Array that contain control points. More...
 
class  PointLight
 @js NA More...
 
struct  PointSprite
 
class  PolygonInfo
 PolygonInfo is an object holding the required data to display Sprites. More...
 
class  ProgressFromTo
 Progress from a percentage to another percentage. More...
 
class  ProgressTimer
 ProgressTimer is a subclass of Node. More...
 
class  ProgressTo
 Progress to percentage. More...
 
class  Properties
 Defines a properties file for loading text files. More...
 
class  ProtectedNode
 A inner node type mainly used for UI module. More...
 
struct  Quad2
 
struct  Quad3
 
class  QuadCommand
 Command used to render one or more Quads, similar to TrianglesCommand. More...
 
class  Quaternion
 Defines a 4-element quaternion that represents the orientation of an object in space. More...
 
class  RandomHelper
 A helper class for creating random number. More...
 
class  Ray
 Ray is a line with one end. More...
 
class  Rect
 Rectangle area. More...
 
class  Ref
 Ref is used for reference count management. More...
 
struct  Reference
 reference data @js NA @lua NA More...
 
class  RemoveSelf
 Remove the node. More...
 
class  RenderCommand
 Base class of the RenderCommand hierarchy. More...
 
class  RenderQueue
 Class that knows how to sort RenderCommand objects. More...
 
class  RenderState
 Defines the rendering state of the graphics device. More...
 
class  RenderTexture
 RenderTexture is a generic rendering target. More...
 
class  Repeat
 Repeats an action a number of times. To repeat an action forever use the RepeatForever action. More...
 
class  RepeatForever
 Repeats an action for ever. To repeat the an action for a limited number of times use the Repeat action. More...
 
class  ResizeBy
 Resize a Node object by a Size. Works on all nodes where setContentSize is effective. But it's mostly useful for nodes where 9-slice is enabled. More...
 
class  ResizeTo
 Resize a Node object to the final size by modifying it's Size attribute. More...
 
class  ReuseGrid
 ReuseGrid action. More...
 
class  ReverseTime
 Executes an action in reverse order, from time=duration to time=0. More...
 
class  Ripple3D
 Ripple3D action. More...
 
class  RotateBy
 Rotates a Node object clockwise a number of degrees by modifying it's rotation attribute. More...
 
class  RotateTo
 Rotates a Node object to a certain angle by modifying it's rotation attribute. The direction will be decided by the shortest angle. More...
 
class  ScaleBy
 Scales a Node object a zoom factor by modifying it's scale attribute. More...
 
class  ScaleTo
 Scales a Node object to a zoom factor by modifying it's scale attribute. More...
 
class  Scene
 Scene is a subclass of Node that is used only as an abstract concept. More...
 
class  Scheduler
 Scheduler is responsible for triggering the scheduled callbacks. More...
 
struct  SchedulerScriptData
 For Lua, the SchedulerScriptData is used to find the Lua function pointer by the handler, then call the Lua function by push the elapse into the Lua stack as a parameter when scheduler update event is triggered. More...
 
class  SchedulerScriptHandlerEntry
 The SchedulerScriptHandlerEntry is used to store the handler corresponding to the Lua function pointer and assign the handler a unique id like ScriptHandlerEntry. More...
 
class  ScriptEngineManager
 ScriptEngineManager is a singleton which manager an object instance of ScriptEngineProtocol, such as LuaEngine. More...
 
class  ScriptEngineProtocol
 Don't make ScriptEngineProtocol inherits from Object since setScriptEngine is invoked only once in AppDelegate.cpp, It will affect the lifecycle of ScriptEngine instance, the autorelease pool will be destroyed before destructing ScriptEngine. More...
 
struct  ScriptEvent
 The ScriptEvent wrapper the different script data corresponding to the ScriptEventType in to the unified struct. More...
 
class  ScriptHandlerEntry
 This classes is wrapped to store the handler corresponding to the Lua function pointer and assign the handler a unique id @js NA. More...
 
class  ScriptHandlerMgr
 In order to reduce the coupling of lua script engine and native c++ engine. More...
 
class  Sequence
 Runs actions sequentially, one after another. More...
 
class  Shaky3D
 Shaky3D action. More...
 
class  ShakyTiles3D
 ShakyTiles3D action. More...
 
class  ShatteredTiles3D
 ShatteredTiles3D action. More...
 
class  Show
 Show the node. More...
 
class  ShuffleTiles
 ShuffleTiles action. More...
 
class  Skeleton3D
 Skeleton. More...
 
class  SkewBy
 Skews a Node object by skewX and skewY degrees. More...
 
class  SkewTo
 Skews a Node object to given angles by modifying it's skewX and skewY attributes. More...
 
struct  SkinData
 skin data @js NA @lua NA More...
 
class  Skybox
 Sky box technology is usually used to simulate infinity sky, mountains and other phenomena. More...
 
class  Spawn
 Spawn a new action immediately. More...
 
class  Speed
 Changes the speed of an action, making it take longer (speed>1) or shorter (speed<1) time. Useful to simulate 'slow motion' or 'fast forward' effect. More...
 
class  SplitCols
 SplitCols action. More...
 
class  SplitRows
 SplitRows action. More...
 
class  SpotLight
 @js NA More...
 
class  Sprite
 Sprite is a 2d image ( http://en.wikipedia.org/wiki/Sprite_(computer_graphics) ). More...
 
class  Sprite3D
 Sprite3D: A sprite can be loaded from 3D model files, .obj, .c3t, .c3b, then can be drawn as sprite. More...
 
class  Sprite3DCache
 Sprite3DCache. More...
 
class  Sprite3DMaterial
 Sprite3DMaterial: Material for Sprite3D. More...
 
class  Sprite3DMaterialCache
 the sprite3D material is only texture for now @js NA @lua NA More...
 
class  SpriteBatchNode
 SpriteBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call (often known as "batch draw"). More...
 
class  SpriteFrame
 A SpriteFrame has: More...
 
class  SpriteFrameCache
 Singleton that handles the loading of the sprite frames. More...
 
class  StopGrid
 StopGrid action. More...
 
struct  T2F_Quad
 
class  TargetedAction
 Overrides the target of an action so that it always runs on the target specified at action creation rather than the one specified by runAction. More...
 
class  Technique
 Technique. More...
 
class  Terrain
 Terrain Defines a Terrain that is capable of rendering large landscapes from 2D heightmap images. More...
 
struct  Tex2F
 A vertex composed of 2 floats: x, y. More...
 
class  TextFieldDelegate
 A input protocol for TextField. More...
 
class  TextFieldTTF
 A simple text input field with TTF font. More...
 
class  Texture2D
 Texture2D class. More...
 
class  TextureAtlas
 A class that implements a Texture Atlas. More...
 
class  TextureCache
 Singleton that handles the loading of textures. More...
 
class  TextureCube
 TextureCube is a collection of six separate square textures that are put onto the faces of an imaginary cube. More...
 
class  TiledGrid3D
 TiledGrid3D is a 3D grid implementation. More...
 
class  TiledGrid3DAction
 Base class for TiledGrid3D actions. More...
 
class  TintBy
 Tints a Node that implements the NodeRGB protocol from current tint to a custom one. More...
 
class  TintTo
 Tints a Node that implements the NodeRGB protocol from current tint to a custom one. More...
 
class  TMXLayer
 TMXLayer represents the TMX layer. More...
 
class  TMXObjectGroup
 TMXObjectGroup represents the TMX object group. More...
 
class  TMXTiledMap
 TMXTiledMap knows how to parse and render a TMX map. More...
 
class  ToggleVisibility
 Toggles the visibility of a node. More...
 
class  Touch
 Encapsulates the Touch information, such as touch point, id and so on, and provides the methods that commonly used. More...
 
struct  TouchesScriptData
 For Lua, the TouchesScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push touches data and actionType into the Lua stack as the parameters when the touches event is triggered. More...
 
struct  TouchScriptData
 For Lua, the TouchScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push touch data and actionType converted to string type into the Lua stack as the parameters when the touch event is triggered. More...
 
class  TransitionCrossFade
 TransitionCrossFade: Cross fades two scenes using the RenderTexture object. More...
 
class  TransitionEaseScene
 TransitionEaseScene can ease the actions of the scene protocol. More...
 
class  TransitionFade
 TransitionFade: Fade out the outgoing scene and then fade in the incoming scene.'''. More...
 
class  TransitionFadeBL
 TransitionFadeBL: Fade the tiles of the outgoing scene from the top-right corner to the bottom-left corner. More...
 
class  TransitionFadeDown
 TransitionFadeDown: Fade the tiles of the outgoing scene from the top to the bottom. More...
 
class  TransitionFadeTR
 TransitionFadeTR: Fade the tiles of the outgoing scene from the left-bottom corner the to top-right corner. More...
 
class  TransitionFadeUp
 TransitionFadeUp: Fade the tiles of the outgoing scene from the bottom to the top. More...
 
class  TransitionFlipAngular
 TransitionFlipAngular: Flips the screen half horizontally and half vertically. The front face is the outgoing scene and the back face is the incoming scene. More...
 
class  TransitionFlipX
 TransitionFlipX: Flips the screen horizontally. The front face is the outgoing scene and the back face is the incoming scene. More...
 
class  TransitionFlipY
 TransitionFlipY: Flips the screen vertically. The front face is the outgoing scene and the back face is the incoming scene. More...
 
class  TransitionJumpZoom
 TransitionJumpZoom: Zoom out and jump the outgoing scene, and then jump and zoom in the incoming. More...
 
class  TransitionMoveInB
 TransitionMoveInB: Move in from to the bottom the incoming scene. More...
 
class  TransitionMoveInL
 TransitionMoveInL: Move in from to the left the incoming scene. More...
 
class  TransitionMoveInR
 TransitionMoveInR: Move in from to the right the incoming scene. More...
 
class  TransitionMoveInT
 TransitionMoveInT: Move in from to the top the incoming scene. More...
 
class  TransitionPageTurn
 A transition which peels back the bottom right hand corner of a scene to transition to the scene beneath it simulating a page turn. More...
 
class  TransitionProgress
 A base class of progress transition. More...
 
class  TransitionProgressHorizontal
 TransitionProgressHorizontal transition. A clock-wise radial transition to the next scene. More...
 
class  TransitionProgressInOut
 TransitionProgressInOut transition. More...
 
class  TransitionProgressOutIn
 TransitionProgressOutIn transition. More...
 
class  TransitionProgressRadialCCW
 TransitionRadialCCW transition. A counter clock-wise radial transition to the next scene. More...
 
class  TransitionProgressRadialCW
 TransitionRadialCW transition. A counter clock-wise radial transition to the next scene. More...
 
class  TransitionProgressVertical
 TransitionProgressVertical transition. More...
 
class  TransitionRotoZoom
 TransitionRotoZoom: Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming. More...
 
class  TransitionScene
 Base class for Transition scenes. More...
 
class  TransitionSceneOriented
 A Transition that supports orientation like. Possible orientation: LeftOver, RightOver, UpOver, DownOver. More...
 
class  TransitionShrinkGrow
 Shrink the outgoing scene while grow the incoming scene. More...
 
class  TransitionSlideInB
 TransitionSlideInB: Slide in the incoming scene from the bottom border. More...
 
class  TransitionSlideInL
 TransitionSlideInL: Slide in the incoming scene from the left border. More...
 
class  TransitionSlideInR
 TransitionSlideInR: Slide in the incoming scene from the right border. More...
 
class  TransitionSlideInT
 TransitionSlideInT: Slide in the incoming scene from the top border. More...
 
class  TransitionSplitCols
 TransitionSplitCols: The odd columns goes upwards while the even columns goes downwards. More...
 
class  TransitionSplitRows
 TransitionSplitRows: The odd rows goes to the left while the even rows goes to the right. More...
 
class  TransitionTurnOffTiles
 TransitionTurnOffTiles: Turn off the tiles of the outgoing scene in random order. More...
 
class  TransitionZoomFlipAngular
 TransitionZoomFlipAngular: Flips the screen half horizontally and half vertically doing a little zooming out/in. The front face is the outgoing scene and the back face is the incoming scene. More...
 
class  TransitionZoomFlipX
 TransitionZoomFlipX: Flips the screen horizontally doing a zoom out/in The front face is the outgoing scene and the back face is the incoming scene. More...
 
class  TransitionZoomFlipY
 TransitionZoomFlipY: Flips the screen vertically doing a little zooming out/in The front face is the outgoing scene and the back face is the incoming scene. More...
 
class  TurnOffTiles
 TurnOffTiles action. More...
 
class  Twirl
 Twirl action. More...
 
class  UserDefault
 UserDefault acts as a tiny database. More...
 
struct  V2F_C4B_T2F
 
struct  V2F_C4B_T2F_Quad
 
struct  V2F_C4B_T2F_Triangle
 
struct  V2F_C4F_T2F
 
struct  V2F_C4F_T2F_Quad
 
struct  V3F_C4B_T2F
 
struct  V3F_C4B_T2F_Quad
 
struct  V3F_C4F
 
struct  V3F_T2F
 
class  Vec2
 Defines a 2-element floating point vector. More...
 
class  Vec3
 Defines a 3-element floating point vector. More...
 
class  Vec4
 Defines 4-element floating point vector. More...
 
class  VertexAttribBinding
 Defines a binding between the vertex layout of a Mesh and the vertex input attributes of a vertex shader (Effect). More...
 
class  Waves
 Waves action. More...
 
class  Waves3D
 Waves3D action. More...
 
class  WavesTiles3D
 WavesTiles3D action. More...
 

Typedefs

typedef std::function< bool(PhysicsWorld &world, const PhysicsRayCastInfo &info, void *data)> PhysicsRayCastCallbackFunc
 Called for each fixture found in the query. More...
 

Enumerations

enum  CameraFlag
 Note: Scene creates a default camera. More...
 
enum  { TMXOrientationOrtho, TMXOrientationHex, TMXOrientationIso, TMXOrientationStaggered }
 Possible orientations of the TMX map. More...
 
enum  { TMXStaggerAxis_X, TMXStaggerAxis_Y }
 Possible stagger axis of the TMX map. More...
 
enum  { TMXStaggerIndex_Odd, TMXStaggerIndex_Even }
 Possible stagger index of the TMX map. More...
 
enum  EvaluateType
 Evaluate Type.
 
enum  MATRIX_STACK_TYPE { MATRIX_STACK_MODELVIEW, MATRIX_STACK_PROJECTION, MATRIX_STACK_TEXTURE }
 Matrix stack type. More...
 
enum  ScriptEventType
 @js NA More...
 
enum  TextVAlignment
 
enum  TextHAlignment
 
enum  GlyphCollection
 Possible GlyphCollection used by Label. More...
 
enum  LabelEffect
 Effects used by Label More...
 
enum  LuaBridgeError { ,
  kLuaBridgeErrorInvalidParameters = -1, kLuaBridgeErrorClassNotFound = -2, kLuaBridgeErrorMethodNotFound = -3, kLuaBridgeErrorExceptionOccurred = -4,
  kLuaBridgeErrorMethodSignature = -5, kLuaBridgeErrorJavaVMError = -6
}
 LuaBridge Error enum, with inline docs. More...
 

Functions

Vec2 ccCardinalSplineAt (const Vec2 &p0, const Vec2 &p1, const Vec2 &p2, const Vec2 &p3, float tension, float t)
 Returns the Cardinal Spline position for a given set of control points, tension and time.
 
bool isScreenPointInRect (const Vec2 &pt, const Camera *camera, const Mat4 &w2l, const Rect &rect, Vec3 *p)
 This is a helper function, checks a GL screen point is in content rectangle space. More...
 
Rect RectFromString (const std::string &str)
 Returns a Core Graphics rectangle structure corresponding to the data in a given string. More...
 
Vec2 PointFromString (const std::string &str)
 Returns a Core Graphics point structure corresponding to the data in a given string. More...
 
Size SizeFromString (const std::string &str)
 Returns a Core Graphics size structure corresponding to the data in a given string. More...
 
template<typename T >
random (T min, T max)
 Returns a random value between min and max.
 
int random ()
 Returns a random int between 0 and RAND_MAX.
 
float rand_minus1_1 ()
 Returns a random float between -1 and 1. More...
 
float rand_0_1 ()
 Returns a random float between 0 and 1. More...
 
int ccNextPOT (int value)
 Returns the Next Power of Two value. More...
 
AffineTransform __CCAffineTransformMake (float a, float b, float c, float d, float tx, float ty)
 Make affine transform.
 
Vec2 __CCPointApplyAffineTransform (const Vec2 &point, const AffineTransform &t)
 Multiply point (x,y,1) by a affine transform.
 
Size __CCSizeApplyAffineTransform (const Size &size, const AffineTransform &t)
 Multiply size (width,height,0) by a affine transform.
 
AffineTransform AffineTransformMakeIdentity ()
 Make identity affine transform.
 
Rect RectApplyAffineTransform (const Rect &rect, const AffineTransform &anAffineTransform)
 Transform Rect, which will transform the four vertices of the point.
 
AffineTransform AffineTransformTranslate (const AffineTransform &t, float tx, float ty)
 Translation, equals 1 0 1 0 1 0 * affine transform tx ty 1.
 
AffineTransform AffineTransformRotate (const AffineTransform &aTransform, float anAngle)
 Rotation, equals cos(angle) sin(angle) 0 -sin(angle) cos(angle) 0 * AffineTransform 0 0 1.
 
AffineTransform AffineTransformScale (const AffineTransform &t, float sx, float sy)
 Scale, equals sx 0 0 0 sy 0 * affineTransform 0 0 1.
 
AffineTransform AffineTransformConcat (const AffineTransform &t1, const AffineTransform &t2)
 Concat two affine transform, t1 * t2.
 
bool AffineTransformEqualToTransform (const AffineTransform &t1, const AffineTransform &t2)
 Compare affine transform.
 
AffineTransform AffineTransformInvert (const AffineTransform &t)
 Get the inverse of affine transform.
 
Mat4 TransformConcat (const Mat4 &t1, const Mat4 &t2)
 Concat Mat4, return t1 * t2.
 
void ccVertexLineToPolygon (Vec2 *points, float stroke, Vec2 *vertices, unsigned int offset, unsigned int nuPoints)
 converts a line to a polygon
 
bool ccVertexLineIntersect (float Ax, float Ay, float Bx, float By, float Cx, float Cy, float Dx, float Dy, float *T)
 returns whether or not the line intersects
 
Vec3operator*= (Vec3 &v, const Mat4 &m)
 Transforms the given vector by the given matrix. More...
 
Vec3 operator* (const Mat4 &m, const Vec3 &v)
 Transforms the given vector by the given matrix. More...
 
Vec4operator*= (Vec4 &v, const Mat4 &m)
 Transforms the given vector by the given matrix. More...
 
Vec4 operator* (const Mat4 &m, const Vec4 &v)
 Transforms the given vector by the given matrix. More...
 
float clampf (float value, float min_inclusive, float max_inclusive)
 Clamp a value between from and to.
 
Vec2 operator* (float x, const Vec2 &v)
 Calculates the scalar product of the given vector with the given value. More...
 
Vec3 operator* (float x, const Vec3 &v)
 Calculates the scalar product of the given vector with the given value. More...
 
Vec4 operator* (float x, const Vec4 &v)
 Calculates the scalar product of the given vector with the given value. More...
 
Rect RectApplyTransform (const Rect &rect, const Mat4 &transform)
 
void CGAffineToGL (const AffineTransform &t, float *m)
 

Variables

const std::string STD_STRING_EMPTY
 A static global empty std::string install.
 

Detailed Description

Copyright 2013 BlackBerry Inc.

Copyright (c) 2015-2017 Chukong Technologies Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Original file from GamePlay3D: http://gameplay3d.org

This file was modified to fit the cocos2d-x project

Typedef Documentation

◆ PhysicsRayCastCallbackFunc

typedef std::function<bool(PhysicsWorld& world, const PhysicsRayCastInfo& info, void* data)> PhysicsRayCastCallbackFunc

Called for each fixture found in the query.

You control how the ray cast proceeds by returning a float: return true: continue return false: terminate the ray cast

Parameters
fixturethe fixture hit by the ray
pointthe point of initial intersection
normalthe normal vector at the point of intersection
Returns
true to continue, false to terminate

Enumeration Type Documentation

◆ CameraFlag

enum CameraFlag
strong

Note: Scene creates a default camera.

And the default camera mask of Node is 1, therefore it can be seen by the default camera. During rendering the scene, it draws the objects seen by each camera in the added order except default camera. The default camera is the last one being drawn with. It's usually a good idea to render 3D objects in a separate camera. And set the 3d camera flag to CameraFlag::USER1 or anything else except DEFAULT. Dedicate The DEFAULT camera for UI, because it is rendered at last. You can change the camera order to get different result when depth test is not enabled. For each camera, transparent 3d sprite is rendered after opaque 3d sprite and other 2d objects.

◆ ScriptEventType

@js NA

ScriptEventType enum

◆ TextVAlignment

enum TextVAlignment
strong

Vertical text alignment type.

Note
If any of these enums are edited and/or reordered, update Texture2D.m.

◆ TextHAlignment

enum TextHAlignment
strong

Horizontal text alignment type.

Note
If any of these enums are edited and/or reordered, update Texture2D.m.

◆ GlyphCollection

enum GlyphCollection
strong

Possible GlyphCollection used by Label.

Specify a collections of characters to be load when Label created. Consider using DYNAMIC.

◆ LabelEffect

enum LabelEffect
strong

Effects used by Label

◆ LuaBridgeError

LuaBridge Error enum, with inline docs.

Enumerator
kLuaBridgeErrorInvalidParameters 

< value 0

kLuaBridgeErrorClassNotFound 

< value -1

kLuaBridgeErrorMethodNotFound 

< value -2

kLuaBridgeErrorExceptionOccurred 

< value -3

kLuaBridgeErrorMethodSignature 

< value -4

kLuaBridgeErrorJavaVMError 

< value -5

Function Documentation

◆ rand_minus1_1()

float cocos2d::rand_minus1_1 ( )
inline

Returns a random float between -1 and 1.

It can be seeded using std::srand(seed);

◆ rand_0_1()

float cocos2d::rand_0_1 ( )
inline

Returns a random float between 0 and 1.

It can be seeded using std::srand(seed);

◆ ccNextPOT()

int cocos2d::ccNextPOT ( int  value)

Returns the Next Power of Two value.

Examples:

  • If "value" is 15, it will return 16.
  • If "value" is 16, it will return 16.
  • If "value" is 17, it will return 32.
    Parameters
    valueThe value to get next power of two.
    Returns
    Returns the next power of two value.
    Since
    v0.99.5

◆ RectApplyTransform()

Rect cocos2d::RectApplyTransform ( const Rect rect,
const Mat4 transform 
)

Transform vec2 and Rect by Mat4.

◆ operator*=() [1/2]

Vec3& cocos2d::operator*= ( Vec3 v,
const Mat4 m 
)
inline

Transforms the given vector by the given matrix.

Note: this treats the given vector as a vector and not as a point.

Parameters
vThe vector to transform.
mThe matrix to transform by.
Returns
This vector, after the transformation occurs.

◆ operator*() [1/5]

Vec3 cocos2d::operator* ( const Mat4 m,
const Vec3 v 
)
inline

Transforms the given vector by the given matrix.

Note: this treats the given vector as a vector and not as a point.

Parameters
mThe matrix to transform by.
vThe vector to transform.
Returns
The resulting transformed vector.

◆ operator*=() [2/2]

Vec4& cocos2d::operator*= ( Vec4 v,
const Mat4 m 
)
inline

Transforms the given vector by the given matrix.

Note: this treats the given vector as a vector and not as a point.

Parameters
vThe vector to transform.
mThe matrix to transform by.
Returns
This vector, after the transformation occurs.

◆ operator*() [2/5]

Vec4 cocos2d::operator* ( const Mat4 m,
const Vec4 v 
)
inline

Transforms the given vector by the given matrix.

Note: this treats the given vector as a vector and not as a point.

Parameters
mThe matrix to transform by.
vThe vector to transform.
Returns
The resulting transformed vector.

◆ CGAffineToGL()

void cocos2d::CGAffineToGL ( const AffineTransform t,
float *  m 
)

Conversion between mat4*4 and AffineTransform.

Parameters
mThe Mat4*4 pointer.
tAffine transform.

◆ operator*() [3/5]

Vec2 cocos2d::operator* ( float  x,
const Vec2 v 
)
inline

Calculates the scalar product of the given vector with the given value.

Parameters
xThe value to scale by.
vThe vector to scale.
Returns
The scaled vector.

◆ operator*() [4/5]

Vec3 cocos2d::operator* ( float  x,
const Vec3 v 
)
inline

Calculates the scalar product of the given vector with the given value.

Parameters
xThe value to scale by.
vThe vector to scale.
Returns
The scaled vector.

◆ operator*() [5/5]

Vec4 cocos2d::operator* ( float  x,
const Vec4 v 
)
inline

Calculates the scalar product of the given vector with the given value.

Parameters
xThe value to scale by.
vThe vector to scale.
Returns
The scaled vector.