Ejemplo n.º 1
0
 def is_9DOF(self): 
     tra, scale, rot, rot_axis = self.to_translation_scale_rotation()
     if tra is None: 
         return False   
     tra_mat = tr.translation_matrix(tra)
     scale_mat = numpy.diag([scale[0],scale[1],scale[2],1.0])
     rot_mat = tr.rotation_matrix(rot,rot_axis)
     mat = numpy.dot(tra_mat, numpy.dot(scale_mat, rot_mat ) )
     return tr.is_same_transform(mat,self.data)
Ejemplo n.º 2
0
 def is_9DOF(self): 
     tra, scale, rot, rot_axis = self.to_translation_scale_rotation()
     if tra is None: 
         return False   
     tra_mat = tr.translation_matrix(tra)
     scale_mat = numpy.diag([scale[0],scale[1],scale[2],1.0])
     rot_mat = tr.rotation_matrix(rot,rot_axis)
     mat = numpy.dot(tra_mat, numpy.dot(scale_mat, rot_mat ) )
     return tr.is_same_transform(mat,self.data)
Ejemplo n.º 3
0
 def __init__(self, translation, rotation_angle, rotation_direction, rotation_point=None, map_from="",map_to=""): 
     rot = tr.rotation_matrix(rotation_angle, rotation_direction, rotation_point) 
     tra = tr.translation_matrix(translation) 
     mat = numpy.dot(tra,rot)
     Transform_Affine.__init__(self, mat,map_from,map_to) 
Ejemplo n.º 4
0
 def __init__(self, angle, direction, point=None, map_from="",map_to=""): 
     mat = tr.rotation_matrix(angle, direction, point)
     Transform_Affine.__init__(self, mat,map_from,map_to)
Ejemplo n.º 5
0
 def from_translation_rotation(self, tra, rot, axis=[0,0,1]): 
     return numpy.dot(tr.translation_matrix(tra), tr.rotation_matrix(rot,axis) )
Ejemplo n.º 6
0
 def __init__(self, translation, rotation_angle, rotation_direction, rotation_point=None, map_from="",map_to=""): 
     rot = tr.rotation_matrix(rotation_angle, rotation_direction, rotation_point) 
     tra = tr.translation_matrix(translation) 
     mat = numpy.dot(tra,rot)
     Transform_Affine.__init__(self, mat,map_from,map_to) 
Ejemplo n.º 7
0
 def __init__(self, angle, direction, point=None, map_from="",map_to=""): 
     mat = tr.rotation_matrix(angle, direction, point)
     Transform_Affine.__init__(self, mat,map_from,map_to)
Ejemplo n.º 8
0
 def from_translation_rotation(self, tra, rot, axis=[0,0,1]): 
     return numpy.dot(tr.translation_matrix(tra), tr.rotation_matrix(rot,axis) )