NA NA
More...
|
| cocos2d |
| Copyright 2013 BlackBerry Inc.
|
|
|
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.
|
|
NA NA
Copyright 2013 BlackBerry Inc.
Copyright (c) 2014-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
◆ MATH_DEG_TO_RAD
#define MATH_DEG_TO_RAD |
( |
|
x | ) |
((x) * 0.0174532925f) |
Util macro for conversion from degrees to radians.
◆ MATH_RAD_TO_DEG
#define MATH_RAD_TO_DEG |
( |
|
x | ) |
((x)* 57.29577951f) |
Util macro for conversion from radians to degrees.
◆ MATRIX_STACK_TYPE
Matrix stack type.
Enumerator |
---|
MATRIX_STACK_MODELVIEW | Model view matrix stack.
|
MATRIX_STACK_PROJECTION | projection matrix stack
|
MATRIX_STACK_TEXTURE | texture matrix stack
|
◆ RectFromString()
Rect cocos2d::RectFromString |
( |
const std::string & |
str | ) |
|
Returns a Core Graphics rectangle structure corresponding to the data in a given string.
- Parameters
-
str | 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. |
- 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
-
str | 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. |
- 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
-
str | 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. |
- Returns
- A Core Graphics structure that represents a size. If the string is not well-formed, the function returns Size::ZERO.