Skip to content

Commit

Permalink
apply rotation of cylinder axis using matrix (fix #20)
Browse files Browse the repository at this point in the history
  • Loading branch information
yosuke committed Aug 18, 2015
1 parent 2f59d93 commit c88aff2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion simtrans/sdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ def readShape(self, d):
m.data = model.CylinderData()
m.data.radius = float(g.find('radius').text)
m.data.height = float(g.find('length').text)
m.rot = tf.quaternion_multiply(m.getrotation(), tf.quaternion_about_axis(numpy.pi/2, [1,0,0]))
m.matrix = numpy.dot(m.getmatrix(), tf.rotation_matrix(numpy.pi/2, [1,0,0]))
m.trans = None
m.rot = None
elif g.tag == 'sphere':
m.shapeType = model.ShapeModel.SP_SPHERE
m.data = model.SphereData()
Expand Down

0 comments on commit c88aff2

Please sign in to comment.