File tree 2 files changed +26
-0
lines changed
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,20 @@ class matrix3x4_tExt
175
175
+ str (__getitem__ (matrix, 1 )) + " ,\n "
176
176
+ str (__getitem__ (matrix, 2 )) + " ]" );
177
177
}
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
+ }
178
192
};
179
193
180
194
#endif // _MATHLIB_H
Original file line number Diff line number Diff line change @@ -540,6 +540,18 @@ void export_matrix3x4_t(scope _mathlib)
540
540
manage_new_object_policy (),
541
541
" Return a single row of the matrix (0 - 2).\n\n "
542
542
" :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" )
543
555
544
556
ADD_MEM_TOOLS (matrix3x4_t )
545
557
;
You can’t perform that action at this time.
0 commit comments