diff options
Diffstat (limited to 'src/graphyx/graphics/GraphicalCollision.scala')
-rw-r--r-- | src/graphyx/graphics/GraphicalCollision.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/graphyx/graphics/GraphicalCollision.scala b/src/graphyx/graphics/GraphicalCollision.scala new file mode 100644 index 0000000..5589f8c --- /dev/null +++ b/src/graphyx/graphics/GraphicalCollision.scala @@ -0,0 +1,18 @@ +/* + * Graphyx + * copyright (c) 2009 Jakob Odersky + * made available under the MIT License +*/ + +package graphyx.graphics + +import sims.collision._ + +case class GraphicalCollision(real: Collision) extends GraphicalObject{ + val points = real.points + val normal = real.normal + def draw() = { + g.setColor(java.awt.Color.GREEN) + for (p <- points) {drawPoint(p); drawVector(normal, p)} + } +}
\ No newline at end of file |