<commit_before>#include "UnrealEnginePythonPrivatePCH.h"

static PyObject *py_ue_ftransform_inverse(ue_PyFTransform *self, PyObject * args)
{
	return py_ue_new_ftransform(self->transform.Inverse());
}

static PyObject *py_ue_ftransform_normalize_rotation(ue_PyFTransform *self, PyObject * args)
{
	FTransform transform = self->transform;
	transform.NormalizeRotation();
	return py_ue_new_ftransform(transform);
}

static PyObject *py_ue_ftransform_get_relative_transform(ue_PyFTransform *self, PyObject * args)
{
	PyObject *py_obj;
	if (!PyArg_ParseTuple(args, "O", &py_obj))
	{
		return nullptr;
	}

	ue_PyFTransform *py_transform = py_ue_is_ftransform(py_obj);
	if (!py_transform)
		return PyErr_Format(PyExc_Exception, "argument is not a FTransform");
	return py_ue_new_ftransform(self->transform.GetRelativeTransform(py_transform->transform));
}

static PyMethodDef ue_PyFTransform_methods[] = {
	{ "inverse", (PyCFunction)py_ue_ftransform_inverse, METH_VARARGS, "" },
	{ "get_relative_transform", (PyCFunction)py_ue_ftransform_get_relative_transform, METH_VARARGS, "" },
	{ "normalize_rotation", (PyCFunction)py_ue_ftransform_normalize_rotation, METH_VARARGS, "" },
	{ NULL }  /* Sentinel */
};

static PyObject *py_ue_ftransform_get_translation(ue_PyFTransform *self, void *closure)
{
	return py_ue_new_fvector(self->transform.GetTranslation());
}

static PyObject *py_ue_ftransform_get_scale(ue_PyFTransform *self, void *closure)
{
	return py_ue_new_fvector(self->transform.GetScale3D());
}

static PyObject *py_ue_ftransform_get_rotation(ue_PyFTransform *self, void *closure)
{
	return py_ue_new_frotator(self->transform.GetRotation().Rotator());
}

static PyObject *py_ue_ftransform_get_quaternion(ue_PyFTransform *self, void *closure)
{
	return py_ue_new_fquat(self->transform.GetRotation());<commit_msg>added get_matrix() to FTransform<commit_after>#include "UnrealEnginePythonPrivatePCH.h"

static PyObject *py_ue_ftransform_inverse(ue_PyFTransform *self, PyObject * args)
{
	return py_ue_new_ftransform(self->transform.Inverse());
}

static PyObject *py_ue_ftransform_normalize_rotation(ue_PyFTransform *self, PyObject * args)
{
	FTransform transform = self->transform;
	transform.NormalizeRotation();
	return py_ue_new_ftransform(transform);
}

static PyObject *py_ue_ftransform_get_relative_transform(ue_PyFTransform *self, PyObject * args)
{
	PyObject *py_obj;
	if (!PyArg_ParseTuple(args, "O", &py_obj))
	{
		return nullptr;
	}

	ue_PyFTransform *py_transform = py_ue_is_ftransform(py_obj);
	if (!py_transform)
		return PyErr_Format(PyExc_Exception, "argument is not a FTransform");
	return py_ue_new_ftransform(self->transform.GetRelativeTransform(py_transform->transform));
}

static PyObject *py_ue_ftransform_get_matrix(ue_PyFTransform *self, PyObject * args)
{
	FMatrix matrix = self->transform.ToMatrixWithScale();
	UScriptStruct *u_struct = FindObject<UScriptStruct>(ANY_PACKAGE, UTF8_TO_TCHAR("Matrix"));
	if (!u_struct)
	{
		return PyErr_Format(PyExc_Exception, "unable to get Matrix struct");
	}
	return py_ue_new_uscriptstruct(u_struct, (uint8 *)&matrix);
}

static PyMethodDef ue_PyFTransform_methods[] = {
	{ "inverse", (PyCFunction)py_ue_ftransform_inverse, METH_VARARGS, "" },
	{ "get_relative_transform", (PyCFunction)py_ue_ftransform_get_relative_transform, METH_VARARGS, "" },
	{ "normalize_rotation", (PyCFunction)py_ue_ftransform_normalize_rotation, METH_VARARGS, "" },
	{ "get_matrix", (PyCFunction)py_ue_ftransform_get_matrix, METH_VARARGS, "" },
	{ NULL }  /* Sentinel */
};

static PyObject *py_ue_ftransform_get_translation(ue_PyFTransform *self, void *closure)
{
	return py_ue_new_fvector(self->transform.GetTranslation());
}

static PyObject *py_ue_ftransform_get_scale(ue_PyFTransform *self, void *closure)
{
	return py_ue_new_fvector(self->transform.GetScale3D());
}

static PyObject *py_ue_ftransform_get_rotation(ue_PyFTransform *self, void *closure)
{
	return py_ue_new_frotator(self->transform.GetRotation().Rotator());
}

static PyObject *py_ue_ftransform_get_quaternion(ue_PyFTransform *self, void *closure)
{
	return py_ue_new_fquat(self->transform.GetRotation());
{'fraction_non_alphanumeric': 0.11318921544814185, 'fraction_numerical': 0.0009715812484819043, 'mean_word_length': 8.78147268408551, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6959286', 'n_tokens_mistral': 1450, 'n_tokens_neox': 1485, 'n_words': 223}