mirror of
https://github.com/jhasse/poly2tri.git
synced 2025-09-17 18:45:38 +02:00
Added bird model
This commit is contained in:
@@ -39,6 +39,7 @@ import org.newdawn.slick.{BasicGame, GameContainer, Graphics, Color, AppGameCont
|
||||
import org.newdawn.slick.geom.{Polygon, Circle}
|
||||
|
||||
import scala.collection.mutable.ArrayBuffer
|
||||
import scala.io.Source
|
||||
|
||||
// TODO: Lots of documentation!
|
||||
|
||||
@@ -67,6 +68,7 @@ class Poly2TriDemo extends BasicGame("Poly2Tri") {
|
||||
def init(container: GameContainer) {
|
||||
poly
|
||||
earClipPoly
|
||||
bird
|
||||
}
|
||||
|
||||
def update(gc: GameContainer, delta: Int) {
|
||||
@@ -285,6 +287,12 @@ class Poly2TriDemo extends BasicGame("Poly2Tri") {
|
||||
|
||||
}
|
||||
|
||||
def bird {
|
||||
|
||||
for (line <- Source.fromFile("data/bird.dat").getLines)
|
||||
print(line)
|
||||
}
|
||||
|
||||
def earClipPoly {
|
||||
|
||||
val polyX = Array(400f, 500f, 520f, 460f, 580f, 480f, 360f, 360f, 300f, 200f, 120f, 200f, 340f, 208f, 180f, 300f)
|
||||
|
Reference in New Issue
Block a user