Cocos2d-x  v3.15
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
cocos2d Namespace Reference

Copyright 2013 BlackBerry Inc. More...

Namespaces

 DrawPrimitives
 /
 

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
 The device accelerometer reports values for each axis in units of g-force. More...
 
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. More...
 
class  ActionInterval
 An interval action is an action that takes place within a certain period of time. More...
 
class  ActionManager
 ActionManager is a singleton that manages all the actions. 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  Animate
 Animates a sprite given the name of an Animation. More...
 
class  Animate3D
 Animate3D, Animates a Sprite3D given with an Animation3D. More...
 
class  Animation
 A Animation object is used to perform animations on the Sprite objects. More...
 
class  Animation3D
 static animation data, shared More...
 
class  Animation3DCache
 Animation3D Cache. More...
 
struct  Animation3DData
 animation data More...
 
class  AnimationCache
 Singleton that manages the Animations. More...
 
class  AnimationCurve
 curve of bone's position, rotation or scale More...
 
class  AnimationFrame
 A frame of the animation. More...
 
struct  AnimationFrameData
 Struct that holds the size in pixels, texture coordinates and delays for animated ParticleSystemQuad. More...
 
class  AsyncTaskPool
 This class allows to perform background operations without having to manipulate threads. 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  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...
 
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  BatchCommand
 Command used to draw batches in one TextureAtlas. 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
 Blend Function used for textures. More...
 
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  CallFunc
 Calls a 'callback'. More...
 
class  CallFuncN
 Calls a 'callback' with the node as the first argument. 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  CardinalSplineBy
 Cardinal Spline path. More...
 
class  CardinalSplineTo
 Cardinal Spline path. More...
 
class  CatmullRomBy
 An action that moves the target with a CatmullRom curve by a certain distance. More...
 
class  CatmullRomTo
 An action that moves the target with a CatmullRom curve to a destination point. More...
 
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. More...
 
class  CustomCommand
 Custom command is used for call custom openGL command which can not be done by other commands, such as stencil function, depth functions etc. More...
 
class  DeccelAmplitude
 DeccelAmplitude action. More...
 
class  DelayTime
 Delays the action a certain amount of seconds. 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. 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. More...
 
class  EventListenerAcceleration
 Acceleration event listener. More...
 
class  EventListenerController
 
class  EventListenerCustom
 Custom event listener. More...
 
class  EventListenerFocus
 Focus event listener. More...
 
class  EventListenerKeyboard
 Keyboard event listener. More...
 
class  EventListenerMouse
 Mouse event listener. 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. More...
 
class  EventMouse
 The mouse event. More...
 
class  EventTouch
 Touch event. More...
 
class  FadeIn
 Fades In an object that implements the RGBAProtocol protocol. More...
 
class  FadeOut
 Fades Out an object that implements the RGBAProtocol protocol. 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. More...
 
class  FileUtils
 Helper class to handle file operations. More...
 
class  FileUtilsTizen
 Helper class to handle file operations. More...
 
class  FiniteTimeAction
 Base class actions that do have a finite time duration. 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. More...
 
struct  FontDefinition
 Font attributes. More...
 
struct  FontShadow
 types used for defining fonts properties (i.e. More...
 
struct  FontStroke
 Stroke attributes. More...
 
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 More...
 
class  GLProgram
 GLProgram Class that implements a glProgram. More...
 
class  GLProgramCache
 GLProgramCache Singleton that stores manages GLProgram objects (shaders) More...
 
class  GLProgramState
 GLProgramState holds the 'state' (uniforms and attributes) of the GLProgram. More...
 
class  GLProgramStateCache
 Some GLprogram state could be shared. More...
 
class  GLView
 By GLView you can operate the frame information of EGL view through some function. More...
 
class  Grabber
 FBO class that grabs the contents of the screen. 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  IndexBuffer
 IndexBuffer is an abstraction of low level openGL Buffer Object. 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. 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, More...
 
struct  MaterialDatas
 material datas, since 3.3 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 More...
 
struct  MeshDatas
 mesh datas 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 More...
 
class  MeshVertexData
 the MeshVertexData class. More...
 
struct  ModelData
 model node data, since 3.3 More...
 
class  MotionStreak
 Creates a trailing path. More...
 
class  MotionStreak3D
 Creates a trailing path. More...
 
class  MoveBy
 Moves a Node object x,y pixels by modifying it's position attribute. More...
 
class  MoveTo
 Moves a Node object to the position x,y. More...
 
class  NinePatchImageParser
 A class for paring Android .9 patch image. More...
 
class  Node
 Node is the base element of the Scene Graph. More...
 
struct  NodeData
 Node data, since 3.3. More...
 
struct  NodeDatas
 node datas, since 3.3 More...
 
class  NodeGrid
 Base class for Grid Node. More...
 
struct  NTextureData
 new material, since 3.3 More...
 
class  OBB
 Oriented Bounding Box(OBB) More...
 
class  OrbitCamera
 OrbitCamera action. 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. 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. More...
 
class  Place
 Places the node in a certain position. More...
 
class  Plane
 Defines plane. More...
 
class  PointArray
 An Array that contain control points. More...
 
struct  PointSprite
 Vec2 Sprite component. More...
 
class  PolygonInfo
 PolygonInfo is an object holding the required data to display Sprites. More...
 
class  Primitive
 Primitive can support sending points, lines and triangles to glpipeline, which is an abstraction of primitive data. More...
 
class  PrimitiveCommand
 Command used to render primitive, similar to QuadCommand. 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
 A 2D Quad. More...
 
struct  Quad3
 A 3D Quad. More...
 
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 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. More...
 
class  RepeatForever
 Repeats an action for ever. More...
 
class  ResizeBy
 Resize a Node object by a Size. 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. 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. 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 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. More...
 
class  SplitCols
 SplitCols action. More...
 
class  SplitRows
 SplitRows action. 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 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
 Texture coordinates for a quad. More...
 
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. More...
 
class  TransitionFlipX
 TransitionFlipX: Flips the screen horizontally. More...
 
class  TransitionFlipY
 TransitionFlipY: Flips the screen vertically. 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. More...
 
class  TransitionProgressInOut
 TransitionProgressInOut transition. More...
 
class  TransitionProgressOutIn
 TransitionProgressOutIn transition. More...
 
class  TransitionProgressRadialCCW
 TransitionRadialCCW transition. More...
 
class  TransitionProgressRadialCW
 TransitionRadialCW transition. 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. 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. 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  TrianglesCommand
 Command used to render one or more Triangles, which is similar to QuadCommand. More...
 
class  TurnOffTiles
 TurnOffTiles action. More...
 
class  Twirl
 Twirl action. More...
 
struct  Uniform
 Uniform is a structure to encapsulate data got from glGetActiveUniform and glGetUniformLocation. More...
 
class  UniformValue
 Uniform Value, which is used to store to value send to openGL pipe line by glUniformXXX. More...
 
class  UserDefault
 UserDefault acts as a tiny database. More...
 
struct  V2F_C4B_T2F
 A Vec2 with a vertex point, a tex coord point and a color 4B. More...
 
struct  V2F_C4B_T2F_Quad
 A Quad of V2F_C4B_T2F. More...
 
struct  V2F_C4B_T2F_Triangle
 A Triangle of V2F_C4B_T2F. More...
 
struct  V2F_C4F_T2F
 A Vec2 with a vertex point, a tex coord point and a color 4F. More...
 
struct  V2F_C4F_T2F_Quad
 4 Vertex2FTex2FColor4F Quad. More...
 
struct  V3F_C4B_T2F
 A Vec2 with a vertex point, a tex coord point and a color 4B. More...
 
struct  V3F_C4B_T2F_Quad
 4 Vertex3FTex2FColor4B. More...
 
struct  V3F_T2F
 A Vec2 with a vertex point, a tex coord point. More...
 
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...
 
struct  VertexAttrib
 VertexAttrib is a structure to encapsulate data got from glGetActiveAttrib. 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  VertexAttribValue
 Vertex Attribute Value, which is an abstraction of VertexAttribute and data pointer. More...
 
class  VertexBuffer
 VertexBuffer is an abstraction of low level openGL Vertex Buffer Object. More...
 
class  VertexData
 VertexData is a class used for specify input streams for GPU rendering pipeline, a VertexData will be composed by several streams, every stream will contain a VertexStreamAttribute and the binding VertexBuffer. More...
 
struct  VertexStreamAttribute
 VertexStreamAttribute is used to specify the vertex attribute for drawing, which is correspondent to glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr). 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  TextVAlignment
 Vertical text alignment type. More...
 
enum  TextHAlignment
 Horizontal text alignment type. More...
 
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 (Vec2 &p0, Vec2 &p1, Vec2 &p2, Vec2 &p3, float tension, float t)
 Returns the Cardinal Spline position for a given set of control points, tension and time.
 
var ccCardinalSplineAt ( var p0, var p1, var p2, var p3, var tension, var t)
 Returns the Cardinal Spline position for a given set of control points, tension and time.
 
local ccCardinalSplineAt ( local p0, local p1, local p2, local p3, local tension, local 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.
 
template<typename T >
var random ( var min, var max)
 Returns a random value between min and max.
 
template<typename T >
local random ( local min, local 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...
 
var rand_minus1_1 ()
 Returns a random float between -1 and 1. More...
 
local 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...
 
var rand_0_1 ()
 Returns a random float between 0 and 1. More...
 
local rand_0_1 ()
 Returns a random float between 0 and 1. More...
 
int cc_wcslen (const unsigned short *str)
 Returns the character count in UTF16 string. More...
 
var cc_wcslen ( var str)
 Returns the character count in UTF16 string. More...
 
local cc_wcslen ( local str)
 Returns the character count in UTF16 string. More...
 
void cc_utf8_trim_ws (std::vector< unsigned short > *str)
 Trims the space characters at the end of UTF8 string. More...
 
bool isspace_unicode (unsigned short ch)
 Whether the character is a whitespace character. More...
 
bool iscjk_unicode (unsigned short ch)
 Whether the character is a Chinese/Japanese/Korean character. More...
 
long cc_utf8_strlen (const char *p, int max=-1)
 Returns the length of the string in characters. More...
 
var cc_utf8_strlen ( var p, var 1)
 Returns the length of the string in characters. More...
 
local cc_utf8_strlen ( local p, local 1)
 Returns the length of the string in characters. More...
 
unsigned int cc_utf8_find_last_not_char (const std::vector< unsigned short > &str, unsigned short c)
 Find the last character that is not equal to the character given. More...
 
std::vector< unsigned short > cc_utf16_vec_from_utf16_str (const unsigned short *str)
 Gets unsigned short vector from a given utf16 string. More...
 
unsigned short * cc_utf8_to_utf16 (const char *str_old, int length=-1, int *rUtf16Size=nullptr)
 Creates an utf8 string from a c string. More...
 
var cc_utf8_to_utf16 ( var str_old, var 1, var nullptr)
 Creates an utf8 string from a c string. More...
 
local cc_utf8_to_utf16 ( local str_old, local 1, local nullptr)
 Creates an utf8 string from a c string. More...
 
char * cc_utf16_to_utf8 (const unsigned short *str, int len=-1, long *items_read=nullptr, long *items_written=nullptr)
 Converts a string from UTF-16 to UTF-8. 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. More...
 
var __CCAffineTransformMake ( var a, var b, var c, var d, var tx, var ty)
 Make affine transform. More...
 
local __CCAffineTransformMake ( local a, local b, local c, local d, local tx, local ty)
 Make affine transform. More...
 
Vec2 __CCPointApplyAffineTransform (const Vec2 &point, const AffineTransform &t)
 Multiply point (x,y,1) by a affine transform. More...
 
Size __CCSizeApplyAffineTransform (const Size &size, const AffineTransform &t)
 Multiply size (width,height,0) by a affine transform. More...
 
AffineTransform AffineTransformMakeIdentity ()
 Make identity affine transform. More...
 
Rect RectApplyAffineTransform (const Rect &rect, const AffineTransform &anAffineTransform)
 Transform Rect, which will transform the four vertices of the point. More...
 
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. More...
 
AffineTransform AffineTransformInvert (const AffineTransform &t)
 Get the inverse of affine transform. More...
 
Mat4 TransformConcat (const Mat4 &t1, const Mat4 &t2)
 Concat Mat4, return t1 * t2. More...
 
void ccVertexLineToPolygon (Vec2 *points, float stroke, Vec2 *vertices, unsigned int offset, unsigned int nuPoints)
 converts a line to a polygon
 
var ccVertexLineToPolygon ( var points, var stroke, var vertices, var offset, var nuPoints)
 converts a line to a polygon
 
local ccVertexLineToPolygon ( local points, local stroke, local vertices, local offset, local 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
 
var ccVertexLineIntersect ( var Ax, var Ay, var Bx, var By, var Cx, var Cy, var Dx, var Dy, var T)
 returns whether or not the line intersects
 
local ccVertexLineIntersect ( local Ax, local Ay, local Bx, local By, local Cx, local Cy, local Dx, local Dy, local T)
 returns whether or not the line intersects
 
Vec3operator*= (Vec3 &v, const Mat4 &m)
 Transforms the given vector by the given matrix. More...
 
var operator*= ( var v, var m)
 Transforms the given vector by the given matrix. More...
 
local operator*= ( local v, local 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...
 
var operator* ( var m, var v)
 Transforms the given vector by the given matrix. More...
 
local operator* ( local m, local 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...
 
local operator*= ( local v, local 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...
 
var operator* ( var m, var v)
 Transforms the given vector by the given matrix. More...
 
local operator* ( local m, local 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.
 
var clampf ( var value, var min_inclusive, var max_inclusive)
 Clamp a value between from and to.
 
local clampf ( local value, local min_inclusive, local 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...
 
var operator* ( var x, var v)
 Calculates the scalar product of the given vector with the given value. More...
 
local operator* ( local x, local 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, GLfloat *m)

Variables

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

Detailed Description

Copyright 2013 BlackBerry Inc.

Copyright (c) 2015-2017 Chukong Technologies

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

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

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

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

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.

var 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.

local 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.

Function Documentation

float cocos2d::rand_minus1_1 ( )
inline

Returns a random float between -1 and 1.

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

var rand_minus1_1 ( )
inline

Returns a random float between -1 and 1.

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

local rand_minus1_1 ( )
inline

Returns a random float between -1 and 1.

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

float cocos2d::rand_0_1 ( )
inline

Returns a random float between 0 and 1.

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

var rand_0_1 ( )
inline

Returns a random float between 0 and 1.

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

local rand_0_1 ( )
inline

Returns a random float between 0 and 1.

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

int cocos2d::cc_wcslen ( const unsigned short *  str)

Returns the character count in UTF16 string.

Parameters
strPointer to the start of a UTF-16 encoded string. It must be an NULL terminal UTF8 string.
var cc_wcslen ( var  str)

Returns the character count in UTF16 string.

Parameters
strPointer to the start of a UTF-16 encoded string. It must be an NULL terminal UTF8 string.
local cc_wcslen ( local  str)

Returns the character count in UTF16 string.

Parameters
strPointer to the start of a UTF-16 encoded string. It must be an NULL terminal UTF8 string.
void cocos2d::cc_utf8_trim_ws ( std::vector< unsigned short > *  str)

Trims the space characters at the end of UTF8 string.

var cc_utf8_trim_ws ( var  str)

Trims the space characters at the end of UTF8 string.

local cc_utf8_trim_ws ( local  str)

Trims the space characters at the end of UTF8 string.

bool cocos2d::isspace_unicode ( unsigned short  ch)

Whether the character is a whitespace character.

Parameters
chThe unicode character.
Returns
Whether the character is a white space character.
See also
http://en.wikipedia.org/wiki/Whitespace_character#Unicode
var isspace_unicode ( var  ch)

Whether the character is a whitespace character.

Parameters
chThe unicode character.
Returns
Whether the character is a white space character.
See also
http://en.wikipedia.org/wiki/Whitespace_character#Unicode
local isspace_unicode ( local  ch)

Whether the character is a whitespace character.

Parameters
chThe unicode character.
Returns
Whether the character is a white space character.
See also
http://en.wikipedia.org/wiki/Whitespace_character#Unicode
bool cocos2d::iscjk_unicode ( unsigned short  ch)

Whether the character is a Chinese/Japanese/Korean character.

Parameters
chThe unicode character
Returns
Whether the character is a Chinese character.
See also
http://www.searchtb.com/2012/04/chinese_encode.html
http://tieba.baidu.com/p/748765987
var iscjk_unicode ( var  ch)

Whether the character is a Chinese/Japanese/Korean character.

Parameters
chThe unicode character
Returns
Whether the character is a Chinese character.
See also
http://www.searchtb.com/2012/04/chinese_encode.html
http://tieba.baidu.com/p/748765987
local iscjk_unicode ( local  ch)

Whether the character is a Chinese/Japanese/Korean character.

Parameters
chThe unicode character
Returns
Whether the character is a Chinese character.
See also
http://www.searchtb.com/2012/04/chinese_encode.html
http://tieba.baidu.com/p/748765987
long cocos2d::cc_utf8_strlen ( const char *  p,
int  max = -1 
)

Returns the length of the string in characters.

Parameters
pPointer to the start of a UTF-8 encoded string. It must be an NULL terminal UTF8 string.
maxNot used from 3.1, just keep it for backward compatibility.
var cc_utf8_strlen ( var  p,
var  max = -1 
)

Returns the length of the string in characters.

Parameters
pPointer to the start of a UTF-8 encoded string. It must be an NULL terminal UTF8 string.
maxNot used from 3.1, just keep it for backward compatibility.
local cc_utf8_strlen ( local  p,
local  max = -1 
)

Returns the length of the string in characters.

Parameters
pPointer to the start of a UTF-8 encoded string. It must be an NULL terminal UTF8 string.
maxNot used from 3.1, just keep it for backward compatibility.
unsigned int
cocos2d::cc_utf8_find_last_not_char
( const std::vector< unsigned short > &  str,
unsigned short  c 
)

Find the last character that is not equal to the character given.

Parameters
strThe string to be searched.
cThe character to be searched for.
var cc_utf8_find_last_not_char ( var  str,
var  c 
)

Find the last character that is not equal to the character given.

Parameters
strThe string to be searched.
cThe character to be searched for.
local cc_utf8_find_last_not_char ( local  str,
local  c 
)

Find the last character that is not equal to the character given.

Parameters
strThe string to be searched.
cThe character to be searched for.
std::vector<unsigned short>
cocos2d::cc_utf16_vec_from_utf16_str
( const unsigned short *  str)

Gets unsigned short vector from a given utf16 string.

Parameters
strA given utf16 string.
var cc_utf16_vec_from_utf16_str ( var  str)

Gets unsigned short vector from a given utf16 string.

Parameters
strA given utf16 string.
local cc_utf16_vec_from_utf16_str ( local  str)

Gets unsigned short vector from a given utf16 string.

Parameters
strA given utf16 string.
unsigned short*
cocos2d::cc_utf8_to_utf16
( const char *  str_old,
int  length = -1,
int *  rUtf16Size = nullptr 
)

Creates an utf8 string from a c string.

The result will be null terminated.

Parameters
str_oldPointer to the start of a C string. It must be an NULL terminal UTF8 string.
lengthNot used from 3.1, keep it just for backward compatibility.
rUtf16SizeThe character count in the return UTF16 string.
var cc_utf8_to_utf16 ( var  str_old,
var  length = -1,
var  rUtf16Size = nullptr 
)

Creates an utf8 string from a c string.

The result will be null terminated.

Parameters
str_oldPointer to the start of a C string. It must be an NULL terminal UTF8 string.
lengthNot used from 3.1, keep it just for backward compatibility.
rUtf16SizeThe character count in the return UTF16 string.
local cc_utf8_to_utf16 ( local  str_old,
local  length = -1,
local  rUtf16Size = nullptr 
)

Creates an utf8 string from a c string.

The result will be null terminated.

Parameters
str_oldPointer to the start of a C string. It must be an NULL terminal UTF8 string.
lengthNot used from 3.1, keep it just for backward compatibility.
rUtf16SizeThe character count in the return UTF16 string.
char* cocos2d::cc_utf16_to_utf8 ( const unsigned short *  str,
int  len = -1,
long *  items_read = nullptr,
long *  items_written = nullptr 
)

Converts a string from UTF-16 to UTF-8.

The result will be null terminated.

Parameters
utf16An UTF-16 encoded string, It must be an NULL terminal UTF16 string.
lenNot used from 3.1, keep it just for backward compatibility.
items_readNot used from 3.1, keep it just for backward compatibility.
items_writtenNot used from 3.1, keep it just for backward compatibility.
var cc_utf16_to_utf8 ( var  str,
var  len = -1,
var  items_read = nullptr,
var  items_written = nullptr 
)

Converts a string from UTF-16 to UTF-8.

The result will be null terminated.

Parameters
utf16An UTF-16 encoded string, It must be an NULL terminal UTF16 string.
lenNot used from 3.1, keep it just for backward compatibility.
items_readNot used from 3.1, keep it just for backward compatibility.
items_writtenNot used from 3.1, keep it just for backward compatibility.
local cc_utf16_to_utf8 ( local  str,
local  len = -1,
local  items_read = nullptr,
local  items_written = nullptr 
)

Converts a string from UTF-16 to UTF-8.

The result will be null terminated.

Parameters
utf16An UTF-16 encoded string, It must be an NULL terminal UTF16 string.
lenNot used from 3.1, keep it just for backward compatibility.
items_readNot used from 3.1, keep it just for backward compatibility.
items_writtenNot used from 3.1, keep it just for backward compatibility.
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
var ccNextPOT ( var  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
local ccNextPOT ( local  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
AffineTransform
cocos2d::__CCAffineTransformMake
( float  a,
float  b,
float  c,
float  d,
float  tx,
float  ty 
)

Make affine transform.

var __CCAffineTransformMake ( var  a,
var  b,
var  c,
var  d,
var  tx,
var  ty 
)

Make affine transform.

local __CCAffineTransformMake ( local  a,
local  b,
local  c,
local  d,
local  tx,
local  ty 
)

Make affine transform.

Vec2
cocos2d::__CCPointApplyAffineTransform
( const Vec2 &  point,
const AffineTransform &  t 
)

Multiply point (x,y,1) by a affine transform.

var __CCPointApplyAffineTransform ( var  point,
var  t 
)

Multiply point (x,y,1) by a affine transform.

local __CCPointApplyAffineTransform ( local  point,
local  t 
)

Multiply point (x,y,1) by a affine transform.

Size
cocos2d::__CCSizeApplyAffineTransform
( const Size &  size,
const AffineTransform &  t 
)

Multiply size (width,height,0) by a affine transform.

var __CCSizeApplyAffineTransform ( var  size,
var  t 
)

Multiply size (width,height,0) by a affine transform.

local __CCSizeApplyAffineTransform ( local  size,
local  t 
)

Multiply size (width,height,0) by a affine transform.

AffineTransform
cocos2d::AffineTransformMakeIdentity
( )

Make identity affine transform.

var AffineTransformMakeIdentity ( )

Make identity affine transform.

local AffineTransformMakeIdentity ( )

Make identity affine transform.

Rect
cocos2d::RectApplyAffineTransform
( const Rect &  rect,
const AffineTransform &  anAffineTransform 
)

Transform Rect, which will transform the four vertices of the point.

var RectApplyAffineTransform ( var  rect,
var  anAffineTransform 
)

Transform Rect, which will transform the four vertices of the point.

local RectApplyAffineTransform ( local  rect,
local  anAffineTransform 
)

Transform Rect, which will transform the four vertices of the point.

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

Transform vec2 and Rect by Mat4.

var RectApplyTransform ( var  rect,
var  transform 
)

Transform vec2 and Rect by Mat4.

local RectApplyTransform ( local  rect,
local  transform 
)

Transform vec2 and Rect by Mat4.

bool
cocos2d::AffineTransformEqualToTransform
( const AffineTransform &  t1,
const AffineTransform &  t2 
)

Compare affine transform.

var AffineTransformEqualToTransform ( var  t1,
var  t2 
)

Compare affine transform.

local
AffineTransformEqualToTransform
( local  t1,
local  t2 
)

Compare affine transform.

AffineTransform
cocos2d::AffineTransformInvert
( const AffineTransform &  t)

Get the inverse of affine transform.

var AffineTransformInvert ( var  t)

Get the inverse of affine transform.

local AffineTransformInvert ( local  t)

Get the inverse of affine transform.

Mat4 cocos2d::TransformConcat ( const Mat4 &  t1,
const Mat4 &  t2 
)

Concat Mat4, return t1 * t2.

var TransformConcat ( var  t1,
var  t2 
)

Concat Mat4, return t1 * t2.

local TransformConcat ( local  t1,
local  t2 
)

Concat Mat4, return t1 * t2.

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.
Vec3& cocos2d::operator*= ( var  v,
var  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.
Vec3& cocos2d::operator*= ( local  v,
local  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.
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.
Vec3 cocos2d::operator* ( var  m,
var  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.
Vec3 cocos2d::operator* ( local  m,
local  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.
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.
Vec4& cocos2d::operator*= ( var  v,
var  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.
Vec4& cocos2d::operator*= ( local  v,
local  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.
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.
Vec4 cocos2d::operator* ( var  m,
var  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.
Vec4 cocos2d::operator* ( local  m,
local  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.
void cocos2d::CGAffineToGL ( const AffineTransform &  t,
GLfloat *  m 
)

Conversion between mat4*4 and AffineTransform.

Parameters
mThe Mat4*4 pointer.
tAffine transform.
var CGAffineToGL ( var  t,
var  m 
)

Conversion between mat4*4 and AffineTransform.

Parameters
mThe Mat4*4 pointer.
tAffine transform.
local CGAffineToGL ( local  t,
local  m 
)

Conversion between mat4*4 and AffineTransform.

Parameters
mThe Mat4*4 pointer.
tAffine transform.
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.
Vec2 cocos2d::operator* ( var  x,
var  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.
Vec2 cocos2d::operator* ( local  x,
local  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.
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.
Vec3 cocos2d::operator* ( var  x,
var  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.
Vec3 cocos2d::operator* ( local  x,
local  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.
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.
Vec4 cocos2d::operator* ( var  x,
var  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.
Vec4 cocos2d::operator* ( local  x,
local  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.