Exemplo n.º 1
0
 def test_set_zero(self):
     vector = iDynTree.Vector3()
     vector[0] = 10
     vector[1] = -6
     vector[2] = 1.4
     vector.set_zero()
     for element in vector:
         self.assertEqual(element, 0)
Exemplo n.º 2
0
 def test_mesh_scale(self):
   mesh = iDynTree.ExternalMesh()
   scale = iDynTree.Vector3()
   scale[0] = 1
   scale[1] = 2
   scale[2] = 3
   mesh.scale = scale
   self.assertEqual(list(mesh.scale), list(scale))
Exemplo n.º 3
0
 def test_buffer(self):
     vector = iDynTree.Vector3()
     np_array = np.array(vector, copy=False)
     self.assertEqual(len(np_array), len(vector))
     np_array[0] = 3.14
     self.assertEqual(3.14, vector[0])
Exemplo n.º 4
0
 def test_fix_vector_accessor(self):
     vector = iDynTree.Vector3()
     vector[1] = 3.14
     self.assertEqual(3.14, vector[1])