summaryrefslogtreecommitdiff
path: root/src/graphyx/graphics/Scene.scala
blob: bb1fd9e49fe9ab83b02dd3058e81770382e17171 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * Graphyx
 * copyright (c) 2009 Jakob Odersky
 * made available under the MIT License
*/

package graphyx.graphics

import sims.geometry._
import sims.collision._
import sims.dynamics._
import sims.dynamics.joints._
import collection.mutable._

case class Scene(real: World) {
  val world: GraphicalWorld = GraphicalWorld(real)
  val shapes = for (s: Shape <- real.shapes) yield Parser.toGraphical(s)
  val joints = for (j: Joint <- real.joints) yield Parser.toGraphical(j)
  val bodies = for (b: Body <- real.bodies) yield Parser.toGraphical(b)
  val collisions = for (c: Collision <- real.detector.collisions) yield Parser.toGraphical(c)
  val pairs = for (p: Pair <- real.detector.asInstanceOf[GridDetector].pairs) yield Parser.toGraphical(p)
  val aabbs = for (s: Shape <- real.shapes) yield Parser.toGraphical(s.AABB)
  val fps = 0
}