AffineTransform Class

Module: cc Parent Module: cc

AffineTransform class represent an affine transform matrix. It's composed basically by translation, rotation, scale transformations.

Index

Methods
  • create Create a AffineTransform object with all contents in the matrix.
  • identity Create a identity transformation matrix: ...
  • clone Clone a AffineTransform object from the specified transform.
  • concat Concatenate a transform matrix to another
  • invert Get the invert transform of an AffineTransform object.
  • invert Get an AffineTransform object from a given matrix 4x4.
  • transformVec2 Apply the affine transformation on a point.
  • transformSize Apply the affine transformation on a size.
  • transformRect Apply the affine transformation on a rect.
  • transformObb Apply the affine transformation on a rect, and truns to an Oriented Bounding Box.

Details

Methods

create

Create a AffineTransform object with all contents in the matrix.

meta description
Returns AffineTransform
Defined in cocos2d/core/utils/affine-transform.js:55
Parameters
identity

Create a identity transformation matrix:
[ 1, 0, 0,
0, 1, 0 ]

meta description
Returns AffineTransform
Defined in cocos2d/core/utils/affine-transform.js:72
clone

Clone a AffineTransform object from the specified transform.

meta description
Returns AffineTransform
Defined in cocos2d/core/utils/affine-transform.js:90
Parameters
concat

Concatenate a transform matrix to another The results are reflected in the out affine transform out = t1 * t2 This function is memory free, you should create the output affine transform by yourself and manage its memory.

meta description
Returns AffineTransform
Defined in cocos2d/core/utils/affine-transform.js:102
Parameters
invert

Get the invert transform of an AffineTransform object. This function is memory free, you should create the output affine transform by yourself and manage its memory.

meta description
Returns AffineTransform
Defined in cocos2d/core/utils/affine-transform.js:129
Parameters
invert

Get an AffineTransform object from a given matrix 4x4. This function is memory free, you should create the output affine transform by yourself and manage its memory.

meta description
Returns AffineTransform
Defined in cocos2d/core/utils/affine-transform.js:152
Parameters
transformVec2

Apply the affine transformation on a point. This function is memory free, you should create the output Vec2 by yourself and manage its memory.

meta description
Returns Vec2
Defined in cocos2d/core/utils/affine-transform.js:173
Parameters
transformSize

Apply the affine transformation on a size. This function is memory free, you should create the output Size by yourself and manage its memory.

meta description
Returns Size
Defined in cocos2d/core/utils/affine-transform.js:200
Parameters
transformRect

Apply the affine transformation on a rect. This function is memory free, you should create the output Rect by yourself and manage its memory.

meta description
Returns Rect
Defined in cocos2d/core/utils/affine-transform.js:217
Parameters
transformObb

Apply the affine transformation on a rect, and truns to an Oriented Bounding Box. This function is memory free, you should create the output vectors by yourself and manage their memory.

meta description
Defined in cocos2d/core/utils/affine-transform.js:254
Parameters

results matching ""

    No results matching ""