Class: GMath3D::Quat
- Inherits:
-
Object
- Object
- GMath3D::Quat
- Defined in:
- lib/disp3D_ext.rb
Instance Method Summary collapse
-
#to_array ⇒ Object
convert quat to array.
Instance Method Details
#to_array ⇒ Object
convert quat to array
7 8 9 10 11 12 13 14 15 |
# File 'lib/disp3D_ext.rb', line 7 def to_array rot_mat = Matrix.from_quat(self) rot_mat_array = [ [rot_mat[0,0], rot_mat[0,1], rot_mat[0,2], 0], [rot_mat[1,0], rot_mat[1,1], rot_mat[1,2], 0], [rot_mat[2,0], rot_mat[2,1], rot_mat[2,2], 0], [0,0,0,1]] return rot_mat_array end |