File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,20 @@ class matrix3x4_tExt
175175 + str (__getitem__ (matrix, 1 )) + " ,\n "
176176 + str (__getitem__ (matrix, 2 )) + " ]" );
177177 }
178+
179+ static Vector* get_position (matrix3x4_t & matrix)
180+ {
181+ Vector* result = new Vector ();
182+ MatrixPosition (matrix, *result);
183+ return result;
184+ }
185+
186+ static QAngle* get_angles (matrix3x4_t & matrix)
187+ {
188+ QAngle* result = new QAngle ();
189+ MatrixAngles (matrix, *result);
190+ return result;
191+ }
178192};
179193
180194#endif // _MATHLIB_H
Original file line number Diff line number Diff line change @@ -540,6 +540,18 @@ void export_matrix3x4_t(scope _mathlib)
540540 manage_new_object_policy (),
541541 " Return a single row of the matrix (0 - 2).\n\n "
542542 " :rtype: tuple" )
543+
544+ .add_property (
545+ " position" ,
546+ make_function (&matrix3x4_tExt::get_position, manage_new_object_policy ()),
547+ " Extract the position from the matrix.\n\n "
548+ " :rtype: Vector" )
549+
550+ .add_property (
551+ " angles" ,
552+ make_function (&matrix3x4_tExt::get_angles, manage_new_object_policy ()),
553+ " Extract the angles from the matrix.\n\n "
554+ " :rtype: QAngle" )
543555
544556 ADD_MEM_TOOLS (matrix3x4_t )
545557 ;
You can’t perform that action at this time.
0 commit comments