Skip to content

Include the reflection rule as a field of a new wall/disk object #182

Description

@dpsanders

Currently, to define a new collision rule, e.g. random or "pinball" dynamics, you have to duplicate each wall type and define collision functions with each new type. This leads to a significant amount of code duplication (e.g. RandomWall and RandomDisk objects).

Instead, the suggestion is to include the collision function (specular, random, pinball, etc.) as a parametrised field of each wall object. This should reduce code repetition, with no (?) loss in performance.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions