class Disp3D::GMath3D::Quat

Public Instance Methods

to_array() click to toggle source

convert quat to array

# 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