コード例 #1
0
def restitutionCoefficient():
    cor = rigidbody3d.cor()
    ncollisions = rigidbody3d.numCollisions()
    assert cor.shape == (ncollisions, )
    for col_idx in range(0, ncollisions):
        indices = rigidbody3d.collisionIndices(col_idx)
        assert indices[0] <= 2
        assert indices[1] == -1
        if indices[0] == 0:
            cor[col_idx] = 0.0
        elif indices[0] == 1:
            cor[col_idx] = 0.5
        else:
            cor[col_idx] = 1.0
コード例 #2
0
def restitutionCoefficient():
  cor = rigidbody3d.cor()
  ncollisions = rigidbody3d.numCollisions()
  assert cor.shape == (ncollisions,)
  for col_idx in range( 0, ncollisions ):
    indices = rigidbody3d.collisionIndices( col_idx )
    assert indices[0] <= 2
    assert indices[1] == -1
    if indices[0] == 0:
      cor[col_idx] = 0.0
    elif indices[0] == 1:
      cor[col_idx] = 0.5
    else:
      cor[col_idx] = 1.0
コード例 #3
0
ファイル: different_friction.py プロジェクト: whztt07/scisim
def frictionCoefficient():
  assert rigidbody3d.numCollisions() == 3
  coeffs = rigidbody3d.mu()
  coeffs[0] = 0.0
  coeffs[1] = 0.2
  coeffs[2] = 5.0