blob: 3d8999ca99eabb85d72918fe7d8765a6ea559414 (
plain) (
tree)
|
|
/*
* Graphyx
* copyright (c) 2009 Jakob Odersky
* made available under the MIT License
*/
package graphyx.graphics
import sims.collision._
case class GraphicalAABB(real: AABB) extends AABB(real.minVertex, real.maxVertex) with GraphicalObject {
override def draw() = {
g.setColor(java.awt.Color.BLACK)
g.drawRect((minVertex.x * scale * ppm).toInt,
correctY(maxVertex.y * scale * ppm).toInt,
((maxVertex - minVertex).x * scale * ppm).toInt,
((maxVertex - minVertex).y * scale * ppm).toInt)
}
}
|