2021-12-24 21:11:44 +08:00
|
|
|
|
//
|
2020-10-18 00:27:23 +08:00
|
|
|
|
// Created by liangshuochen on 12/06/2017.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#include "TransformObject.h"
|
|
|
|
|
|
|
|
|
|
DRAGONBONES_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
|
|
Matrix TransformObject::_helpMatrix;
|
|
|
|
|
Transform TransformObject::_helpTransform;
|
|
|
|
|
Point TransformObject::_helpPoint;
|
|
|
|
|
|
|
|
|
|
void TransformObject::_onClear()
|
|
|
|
|
{
|
|
|
|
|
globalTransformMatrix.identity();
|
|
|
|
|
global.identity();
|
|
|
|
|
offset.identity();
|
2021-12-25 10:04:45 +08:00
|
|
|
|
origin = nullptr;
|
2020-10-18 00:27:23 +08:00
|
|
|
|
userData = nullptr;
|
|
|
|
|
|
|
|
|
|
_globalDirty = false;
|
2021-12-25 10:04:45 +08:00
|
|
|
|
_armature = nullptr;
|
2020-10-18 00:27:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TransformObject::updateGlobalTransform()
|
|
|
|
|
{
|
|
|
|
|
if (_globalDirty)
|
|
|
|
|
{
|
|
|
|
|
_globalDirty = false;
|
|
|
|
|
global.fromMatrix(globalTransformMatrix);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DRAGONBONES_NAMESPACE_END
|