@@ -26,6 +26,76 @@ static PyObject *py_ue_ftransform_get_relative_transform(ue_PyFTransform *self,
2626 return py_ue_new_ftransform (self->transform .GetRelativeTransform (py_transform->transform ));
2727}
2828
29+ static PyObject *py_ue_ftransform_transform_vector (ue_PyFTransform *self, PyObject * args)
30+ {
31+ PyObject *py_obj;
32+ if (!PyArg_ParseTuple (args, " O" , &py_obj))
33+ {
34+ return nullptr ;
35+ }
36+
37+ ue_PyFVector *py_vec = py_ue_is_fvector (py_obj);
38+ if (!py_vec)
39+ return PyErr_Format (PyExc_Exception, " argument is not a FVector" );
40+ return py_ue_new_fvector (self->transform .TransformVector (py_vec->vec ));
41+ }
42+
43+ static PyObject *py_ue_ftransform_transform_vector_no_scale (ue_PyFTransform *self, PyObject * args)
44+ {
45+ PyObject *py_obj;
46+ if (!PyArg_ParseTuple (args, " O" , &py_obj))
47+ {
48+ return nullptr ;
49+ }
50+
51+ ue_PyFVector *py_vec = py_ue_is_fvector (py_obj);
52+ if (!py_vec)
53+ return PyErr_Format (PyExc_Exception, " argument is not a FVector" );
54+ return py_ue_new_fvector (self->transform .TransformVectorNoScale (py_vec->vec ));
55+ }
56+
57+ static PyObject *py_ue_ftransform_transform_position (ue_PyFTransform *self, PyObject * args)
58+ {
59+ PyObject *py_obj;
60+ if (!PyArg_ParseTuple (args, " O" , &py_obj))
61+ {
62+ return nullptr ;
63+ }
64+
65+ ue_PyFVector *py_vec = py_ue_is_fvector (py_obj);
66+ if (!py_vec)
67+ return PyErr_Format (PyExc_Exception, " argument is not a FVector" );
68+ return py_ue_new_fvector (self->transform .TransformPosition (py_vec->vec ));
69+ }
70+
71+ static PyObject *py_ue_ftransform_transform_position_no_scale (ue_PyFTransform *self, PyObject * args)
72+ {
73+ PyObject *py_obj;
74+ if (!PyArg_ParseTuple (args, " O" , &py_obj))
75+ {
76+ return nullptr ;
77+ }
78+
79+ ue_PyFVector *py_vec = py_ue_is_fvector (py_obj);
80+ if (!py_vec)
81+ return PyErr_Format (PyExc_Exception, " argument is not a FVector" );
82+ return py_ue_new_fvector (self->transform .TransformPositionNoScale (py_vec->vec ));
83+ }
84+
85+ static PyObject *py_ue_ftransform_transform_rotation (ue_PyFTransform *self, PyObject * args)
86+ {
87+ PyObject *py_obj;
88+ if (!PyArg_ParseTuple (args, " O" , &py_obj))
89+ {
90+ return nullptr ;
91+ }
92+
93+ ue_PyFQuat *py_quat = py_ue_is_fquat (py_obj);
94+ if (!py_quat)
95+ return PyErr_Format (PyExc_Exception, " argument is not a FQuat" );
96+ return py_ue_new_fquat (self->transform .TransformRotation (py_quat->quat ));
97+ }
98+
2999static PyObject *py_ue_ftransform_get_matrix (ue_PyFTransform *self, PyObject * args)
30100{
31101 FTransform transform = self->transform ;
@@ -44,6 +114,11 @@ static PyMethodDef ue_PyFTransform_methods[] = {
44114 { " get_relative_transform" , (PyCFunction)py_ue_ftransform_get_relative_transform, METH_VARARGS, " " },
45115 { " normalize_rotation" , (PyCFunction)py_ue_ftransform_normalize_rotation, METH_VARARGS, " " },
46116 { " get_matrix" , (PyCFunction)py_ue_ftransform_get_matrix, METH_VARARGS, " " },
117+ { " transform_vector" , (PyCFunction)py_ue_ftransform_transform_vector, METH_VARARGS, " " },
118+ { " transform_vector_no_scale" , (PyCFunction)py_ue_ftransform_transform_vector_no_scale, METH_VARARGS, " " },
119+ { " transform_position" , (PyCFunction)py_ue_ftransform_transform_position, METH_VARARGS, " " },
120+ { " transform_position_no_scale" , (PyCFunction)py_ue_ftransform_transform_position_no_scale, METH_VARARGS, " " },
121+ { " transform_rotation" , (PyCFunction)py_ue_ftransform_transform_rotation, METH_VARARGS, " " },
47122 { NULL } /* Sentinel */
48123};
49124
0 commit comments