Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
Base

Copyright 2013 BlackBerry Inc. More...

Namespaces

 cocos2d
 Copyright 2013 BlackBerry Inc.
 

Classes

class  AsyncTaskPool
 This class allows to perform background operations without having to manipulate threads. More...
 
class  Configuration
 Configuration contains some openGL variables. More...
 
class  Controller
 A Controller object represents a connected physical game controller. More...
 
class  Director
 Class that creates and handles the main Window and manages how and when to execute the Scenes. 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  EventListenerTouchOneByOne
 Single touch event listener. More...
 
class  EventListenerTouchAllAtOnce
 Multiple touches event listener. More...
 
class  EventMouse
 The mouse event. More...
 
class  EventTouch
 Touch event. More...
 
struct  IMEKeyboardNotificationInfo
 Keyboard notification event type. More...
 
class  IMEDelegate
 Input method editor delegate. More...
 
class  IMEDispatcher
 Input Method Edit Message Dispatcher. More...
 
class  Map< K, V >
 Similar to std::unordered_map, but it will manage reference count automatically internally. More...
 
class  RandomHelper
 A helper class for creating random number. More...
 
class  Clonable
 Interface that defines how to clone an Ref. More...
 
class  Ref
 Ref is used for reference count management. More...
 
class  Scheduler
 Scheduler is responsible for triggering the scheduled callbacks. 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  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...
 
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...
 
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...
 
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...
 
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...
 
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...
 
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...
 
struct  ScriptEvent
 The ScriptEvent wrapper the different script data corresponding to the ScriptEventType in to the unified struct. More...
 
class  ScriptEngineProtocol
 Don't make ScriptEngineProtocol inherits from Ref 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...
 
class  ScriptEngineManager
 ScriptEngineManager is a singleton which manager an object instance of ScriptEngineProtocl, such as LuaEngine. More...
 
class  Touch
 Encapsulates the Touch information, such as touch point, id and so on, and provides the methods that commonly used. 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  Tex2F
 A TEXCOORD composed of 2 floats: u, y. More...
 
struct  PointSprite
 The point data of Sprite which contains position, color & szie. More...
 
struct  Quad2
 A 2D Quad. More...
 
struct  Quad3
 A 3D Quad. More...
 
struct  V2F_C4B_T2F
 A Vec2 with a vertex point, a tex coord point and a color 4B. More...
 
struct  V2F_C4B_PF
 A Vec2 with a vertex point, a color 4B and point size. More...
 
struct  V2F_C4F_T2F
 A Vec2 with a vertex point, a tex coord point and a color 4F. More...
 
struct  V3F_C4B_T2F
 A Vec2 with a vertex point, a tex coord point and a color 4B. More...
 
struct  V3F_T2F
 A Vec3 with a vertex point, a tex coord point. More...
 
struct  V2F_C4B_T2F_Triangle
 A Triangle of V2F_C4B_T2F. More...
 
struct  V2F_C4B_T2F_Quad
 A Quad of V2F_C4B_T2F. More...
 
struct  V3F_C4B_T2F_Quad
 A Quad of Vertex3FTex2FColor4B. More...
 
struct  V2F_C4F_T2F_Quad
 A Quad of Vertex2FTex2FColor4F. More...
 
struct  V3F_T2F_Quad
 A Quad with V3F_T2F More...
 
struct  BlendFunc
 Blend Function used for textures. More...
 
struct  T2F_Quad
 Texture coordinates for a quad. More...
 
struct  AnimationFrameData
 Struct that holds the size in pixels, texture coordinates and delays for animated ParticleSystemQuad. More...
 
struct  FontShadow
 types used for defining fonts properties (i.e. More...
 
struct  FontStroke
 Stroke attributes. More...
 
struct  FontDefinition
 Font attributes. More...
 
struct  Acceleration
 The device accelerometer reports values for each axis in units of g-force. More...
 
class  UserDefault
 UserDefault acts as a tiny database. More...
 
struct  AffineTransform
 Affine transform a b 0 c d 0 tx ty 1. More...
 
class  Size
 A size, which has width and height, could be used to represent the size in 2D. More...
 
class  Rect
 Rectangle area. More...
 
class  Mat4
 Defines a 4 x 4 floating point matrix representing a 3D transformation. More...
 
class  MathUtil
 Defines a math utility class. More...
 
class  Quaternion
 Defines a 4-element quaternion that represents the orientation of an object in space. 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...
 
class  AutoReleasePool
 A pool for managing autorelease objects. More...
 

Macros

#define MATH_DEG_TO_RAD(x)   ((x) * 0.0174532925f)
 Util macro for conversion from degrees to radians. More...
 
#define MATH_RAD_TO_DEG(x)   ((x)* 57.29577951f)
 Util macro for conversion from radians to degrees. More...
 

Enumerations

enum  Key
 Controllers' standard key Controller receives only standard key which contained within enum Key by default.
 
enum  MATRIX_STACK_TYPE { MATRIX_STACK_MODELVIEW, MATRIX_STACK_PROJECTION, MATRIX_STACK_TEXTURE }
 Matrix stack type. More...
 
enum  Projection { _2D, _3D, CUSTOM, DEFAULT = _3D }
 Possible OpenGL projections used by director. More...
 
enum  Type
 Type Event type.
 
enum  KeyCode
 KeyCode The key (code).
 
enum  Type
 Type Event type.
 
enum  MouseEventType
 MouseEventType Different types of MouseEvent.
 
enum  EventCode
 EventCode Touch event code.
 
enum  ConfigType
 ConfigType enum.
 
enum  DispatchMode { , ONE_BY_ONE }
 Dispatch mode, how the touches are dispatched. More...
 
enum  GlyphCollection
 Possible GlyphCollection used by Label. More...
 
enum  LabelEffect
 Possible LabelEffect used by Label.
 
enum  Type {
  NONE = 0, BYTE, INTEGER, FLOAT,
  DOUBLE, BOOLEAN, STRING, VECTOR,
  MAP, INT_KEY_MAP
}
 Value type wrapped by Value. More...
 

Functions

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...
 
#define MATH_FLOAT_SMALL   1.0e-37f
 Util macro for const float such as epsilon, small float and float precision tolerance.
 

Detailed Description

Copyright 2013 BlackBerry Inc.

Copyright (c) 2014-2015 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

Macro Definition Documentation

#define MATH_DEG_TO_RAD (   x)    ((x) * 0.0174532925f)

Util macro for conversion from degrees to radians.

#define MATH_RAD_TO_DEG (   x)    ((x)* 57.29577951f)

Util macro for conversion from radians to degrees.

var MATH_RAD_TO_DEG (   var)    ((x)* 57.29577951f)

Util macro for conversion from radians to degrees.

local MATH_RAD_TO_DEG (   local)    ((x)* 57.29577951f)

Util macro for conversion from radians to degrees.

Enumeration Type Documentation

enum MATRIX_STACK_TYPE
strong

Matrix stack type.

Enumerator
MATRIX_STACK_MODELVIEW 

Model view matrix stack.

MATRIX_STACK_PROJECTION 

projection matrix stack

MATRIX_STACK_TEXTURE 

texture matrix stack

var MATRIX_STACK_TYPE
strong

Matrix stack type.

Enumerator
MATRIX_STACK_MODELVIEW 

Model view matrix stack.

MATRIX_STACK_PROJECTION 

projection matrix stack

MATRIX_STACK_TEXTURE 

texture matrix stack

local MATRIX_STACK_TYPE
strong

Matrix stack type.

Enumerator
MATRIX_STACK_MODELVIEW 

Model view matrix stack.

MATRIX_STACK_PROJECTION 

projection matrix stack

MATRIX_STACK_TEXTURE 

texture matrix stack

enum Projection
strong

Possible OpenGL projections used by director.

Enumerator
_2D 

Sets a 2D projection (orthogonal projection).

_3D 

Sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500.

CUSTOM 

It calls "updateProjection" on the projection delegate.

DEFAULT 

Default projection is 3D projection.

var Projection
strong

Possible OpenGL projections used by director.

Enumerator
_2D 

Sets a 2D projection (orthogonal projection).

_3D 

Sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500.

CUSTOM 

It calls "updateProjection" on the projection delegate.

DEFAULT 

Default projection is 3D projection.

local Projection
strong

Possible OpenGL projections used by director.

Enumerator
_2D 

Sets a 2D projection (orthogonal projection).

_3D 

Sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500.

CUSTOM 

It calls "updateProjection" on the projection delegate.

DEFAULT 

Default projection is 3D projection.

enum DispatchMode
strong

Dispatch mode, how the touches are dispatched.

Enumerator
ONE_BY_ONE 

All at once.

var DispatchMode
strong

Dispatch mode, how the touches are dispatched.

Enumerator
ONE_BY_ONE 

All at once.

local DispatchMode
strong

Dispatch mode, how the touches are dispatched.

Enumerator
ONE_BY_ONE 

All at once.

enum GlyphCollection
strong

Possible GlyphCollection used by Label.

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

var GlyphCollection
strong

Possible GlyphCollection used by Label.

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

local GlyphCollection
strong

Possible GlyphCollection used by Label.

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

enum Type
strong

Value type wrapped by Value.

Enumerator
NONE 

no value is wrapped, an empty Value

BYTE 

wrap byte

INTEGER 

wrap integer

FLOAT 

wrap float

DOUBLE 

wrap double

BOOLEAN 

wrap bool

STRING 

wrap string

VECTOR 

wrap vector

MAP 

wrap ValueMap

INT_KEY_MAP 

wrap ValueMapIntKey

var Type
strong

Value type wrapped by Value.

Enumerator
NONE 

no value is wrapped, an empty Value

BYTE 

wrap byte

INTEGER 

wrap integer

FLOAT 

wrap float

DOUBLE 

wrap double

BOOLEAN 

wrap bool

STRING 

wrap string

VECTOR 

wrap vector

MAP 

wrap ValueMap

INT_KEY_MAP 

wrap ValueMapIntKey

local Type
strong

Value type wrapped by Value.

Enumerator
NONE 

no value is wrapped, an empty Value

BYTE 

wrap byte

INTEGER 

wrap integer

FLOAT 

wrap float

DOUBLE 

wrap double

BOOLEAN 

wrap bool

STRING 

wrap string

VECTOR 

wrap vector

MAP 

wrap ValueMap

INT_KEY_MAP 

wrap ValueMapIntKey

Function Documentation

Rect cocos2d::RectFromString ( const std::string &  str)

Returns a Core Graphics rectangle structure corresponding to the data in a given string.

A string object whose contents are of the form "{{x,y},{w, h}}", where x is the x coordinate, y is the y coordinate, w is the width, and h is the height. These components can represent integer or float values. An example of a valid string is "{{3,2},{4,5}}". The string is not localized, so items are always separated with a comma. A Core Graphics structure that represents a rectangle. If the string is not well-formed, the function returns Rect::ZERO.

var RectFromString ( var  str)

Returns a Core Graphics rectangle structure corresponding to the data in a given string.

A string object whose contents are of the form "{{x,y},{w, h}}", where x is the x coordinate, y is the y coordinate, w is the width, and h is the height. These components can represent integer or float values. An example of a valid string is "{{3,2},{4,5}}". The string is not localized, so items are always separated with a comma. A Core Graphics structure that represents a rectangle. If the string is not well-formed, the function returns Rect::ZERO.

local RectFromString ( local  str)

Returns a Core Graphics rectangle structure corresponding to the data in a given string.

A string object whose contents are of the form "{{x,y},{w, h}}", where x is the x coordinate, y is the y coordinate, w is the width, and h is the height. These components can represent integer or float values. An example of a valid string is "{{3,2},{4,5}}". The string is not localized, so items are always separated with a comma. A Core Graphics structure that represents a rectangle. If the string is not well-formed, the function returns Rect::ZERO.

Vec2 cocos2d::PointFromString ( const std::string &  str)

Returns a Core Graphics point structure corresponding to the data in a given string.

A string object whose contents are of the form "{x,y}", where x is the x coordinate and y is the y coordinate. The x and y values can represent integer or float values. An example of a valid string is "{3.0,2.5}". The string is not localized, so items are always separated with a comma. A Core Graphics structure that represents a point. If the string is not well-formed, the function returns Vec2::ZERO.

var PointFromString ( var  str)

Returns a Core Graphics point structure corresponding to the data in a given string.

A string object whose contents are of the form "{x,y}", where x is the x coordinate and y is the y coordinate. The x and y values can represent integer or float values. An example of a valid string is "{3.0,2.5}". The string is not localized, so items are always separated with a comma. A Core Graphics structure that represents a point. If the string is not well-formed, the function returns Vec2::ZERO.

local PointFromString ( local  str)

Returns a Core Graphics point structure corresponding to the data in a given string.

A string object whose contents are of the form "{x,y}", where x is the x coordinate and y is the y coordinate. The x and y values can represent integer or float values. An example of a valid string is "{3.0,2.5}". The string is not localized, so items are always separated with a comma. A Core Graphics structure that represents a point. If the string is not well-formed, the function returns Vec2::ZERO.

Size cocos2d::SizeFromString ( const std::string &  str)

Returns a Core Graphics size structure corresponding to the data in a given string.

A string object whose contents are of the form "{w, h}", where w is the width and h is the height. The w and h values can be integer or float values. An example of a valid string is "{3.0,2.5}". The string is not localized, so items are always separated with a comma. A Core Graphics structure that represents a size. If the string is not well-formed, the function returns Size::ZERO.

var SizeFromString ( var  str)

Returns a Core Graphics size structure corresponding to the data in a given string.

A string object whose contents are of the form "{w, h}", where w is the width and h is the height. The w and h values can be integer or float values. An example of a valid string is "{3.0,2.5}". The string is not localized, so items are always separated with a comma. A Core Graphics structure that represents a size. If the string is not well-formed, the function returns Size::ZERO.

local SizeFromString ( local  str)

Returns a Core Graphics size structure corresponding to the data in a given string.

A string object whose contents are of the form "{w, h}", where w is the width and h is the height. The w and h values can be integer or float values. An example of a valid string is "{3.0,2.5}". The string is not localized, so items are always separated with a comma. A Core Graphics structure that represents a size. If the string is not well-formed, the function returns Size::ZERO.