material.go 644 B

1234567891011121314151617181920212223
  1. // Copyright 2016 The G3N Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Package physics implements a basic physics engine.
  5. package physics
  6. type Material struct {
  7. name string
  8. friction float32
  9. restitution float32
  10. }
  11. type ContactMaterial struct {
  12. mat1 *Material
  13. mat2 *Material
  14. friction float32
  15. restitution float32
  16. contactEquationStiffness float32
  17. contactEquationRelaxation float32
  18. frictionEquationStiffness float32
  19. frictionEquationRelaxation float32
  20. }