Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by IntelliJ IDEA.
- * User: teamon
- * Date: 2009-11-07
- * Time: 15:57:46
- */
- import TUIO.TuioObject
- abstract class WnkObject(tobj: TuioObject) {
- var x = calculateX(tobj)
- var y = calculateY(tobj)
- var angle = tobj.getAngle
- var angleDegrees = tobj.getAngleDegrees.toInt
- create
- def updateTuioObject(tobj: TuioObject) {
- x = calculateX(tobj)
- y = calculateY(tobj)
- angle = tobj.getAngle
- angleDegrees = tobj.getAngleDegrees.toInt
- update
- }
- def calculateX(tobj: TuioObject) = (tobj.getX * 1024).toInt
- def calculateY(tobj: TuioObject) = (tobj.getY * 768).toInt
- //
- def fxClass
- def create {}
- def update {}
- def destroy {}
- }
- class SampleObject(tobj: TuioObject) extends WnkObject(tobj) {
- override def fxClass = "SampleCircle"
- }
Add Comment
Please, Sign In to add comment