Cocos2d-x  v4
Base

Copyright 2013 BlackBerry Inc. More...

Namespaces

 cocos2d
 Copyright 2013 BlackBerry Inc.
 

Classes

class  AutoreleasePool
 A pool for managing autorelease objects. More...
 
class  Controller
 A Controller object represents a connected physical game controller. @js NA. More...
 
class  Director
 Class that creates and handles the main Window and manages how and when to execute the Scenes. More...
 
class  Scheduler
 Scheduler is responsible for triggering the scheduled callbacks. More...
 
class  Touch
 Encapsulates the Touch information, such as touch point, id and so on, and provides the methods that commonly used. More...
 
struct  AffineTransform
 

Macros

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

Enumerations

enum  MATRIX_STACK_TYPE { MATRIX_STACK_MODELVIEW, MATRIX_STACK_PROJECTION, MATRIX_STACK_TEXTURE }
 Matrix stack type. 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.

@js NA @lua NA

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

Enumeration Type Documentation

◆ MATRIX_STACK_TYPE

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

Function Documentation

◆ RectFromString()

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

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

Parameters
strA 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.
Returns
A Core Graphics structure that represents a rectangle. If the string is not well-formed, the function returns Rect::ZERO.

◆ PointFromString()

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

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

Parameters
strA 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.
Returns
A Core Graphics structure that represents a point. If the string is not well-formed, the function returns Vec2::ZERO.

◆ SizeFromString()

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

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

Parameters
strA 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.
Returns
A Core Graphics structure that represents a size. If the string is not well-formed, the function returns Size::ZERO.