Matrix4f Transform::GetTransformation() const { Matrix4f translationMatrix; Matrix4f scaleMatrix; translationMatrix.InitTranslation(Vector3f(m_pos.GetX(), m_pos.GetY(), m_pos.GetZ())); scaleMatrix.InitScale(Vector3f(m_scale, m_scale, m_scale)); Matrix4f result = translationMatrix * m_rot.ToRotationMatrix() * scaleMatrix; return GetParentMatrix() * result; }
wxSVGMatrix wxSVGLocatable::GetParentMatrix(const wxSVGElement* element) { wxSVGMatrix matrix; wxSvgXmlNode* parent = element->GetParentNode(); if (parent) { wxSVGElement* parentElement = parent->GetSvgElement(); if (parentElement) { matrix = GetParentMatrix(parentElement); wxSVGTransformable* transformableParent = wxSVGTransformable::GetSVGTransformable(*parentElement); if (transformableParent != NULL) transformableParent->UpdateMatrix(matrix); } } return matrix; }