blob: 3d8999ca99eabb85d72918fe7d8765a6ea559414 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/*
* 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)
}
}
|