SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
+




Scala LWJGL
          3D   	
 
                     @chimerast
+
                              	
 

    n 
          n    Twitter: @chimerast
          n    Blog: http://chimera.st/
          n    Scala : 1
          n    LWJGL : 3

    n               NEET
          n          Web/
          n    Seasar Foundation          S2Wicket 1.4
          n    wicket-ja, java-ja

    n                      3D
          n                3D
          n    DirectX7 Immediate Mode
+
                	
 

    n 
          n 


    n 
          n 
          n 


    n 
          n 


    n 
          n 
          n 
+
    Scala                                3D              	
 

    n 
          n               3D             (or        )

    n 
          n                    MikuMikuDance   3D


    n 
          n    Scala
          n    LWJGL
          n    Slick
+
    MikuMikuDance	
 

    n 
          n    http://www.geocities.jp/higuchuu4/
          n 

          n    DirectX

                                                     http://www.nicovideo.jp/watch/sm9647253

    n 
          n 

          n 

          n 

                n    JVM
+
    Scala
    A Scalable Language	
 

    n                            +
          n 


    n 
          n    Java                             1
          n    3D

            scala> List(3,2,5,1).reduceLeft(math.max)
            res0: Int = 5	
 

    n    Java
          n 
+
    LWJGL
    Lightweight Java Game Library	
 

    n                                                +
          n    http://www.lwjgl.org/
          n    OpenGL
                n  3D             API
                n 
          n    OpenAL
                n                       3D     API
                n 
          n    OpenCL
                n  GPGPU          GPU                    API
          n 
          n 
+
    Slick
    2D Game Library based on LWJGL	
 

    n                  LWJGL       2D
          n    http://slick.cokeandcode.com/
          n    LWJGL(OpenGL)           2D



    n 
          n    2D
                n 

                n 

                n    SVG
+
    LWJGL
                                        	
 
    n    https://github.com/chimerast/scala-lwjgl-sample
          n               sbt

    n 
          n          3D

          n                     3D

    n    LWJGL native                         java.library.path

          n    sbt              fork
+
                              	
 

    n    3D

    n 


          n    IK    (   )
          n 


    n 

          n 

                n 

          n 

                n 
+
                                          	
 
    n 
          n 

          n          60fps(1    60   )
                n        16ms
+
    Java/Scala
                                                       	
 
    n                             (GC)
          n 

          n 


    n    C++
          n    JIT                       C++                JIT

          n                              SIMD               C+
                +
                n    SIMD        1CPU
                      n                   10
                      n     3D
+
                                                	
 

    n 
          n 
                n              Array[Float]
          n 


          n                                   Scala immutable.List
          n               GC

    n 
          n    Java
                n  OpenGL                     GPU
                n  GPU SIMD
          n 
+
    Scala
                                                                                                	
 
        :              	
                  .apply	
       .update	
      .foreach	
  .prepend	
  .append	
        .insert	
 

    java.util.ArrayList[AnyRef]	
                11	
            19	
          16	
    19,746	
         158	
       39,317	
 

    java.util.LinkedList[AnyRef]	
           38.622	
      388,877	
           43	
       152	
         141	
           320

    Array[AnyRef]	
                                1	
           21	
         174	
              -	
       -	
             -	
 

    mutable.ArrayBuffer[AnyRef]	
                11	
            19	
         122	
    19,734	
         172	
       40,118	
 

    mutable.ListBuffer[AnyRef]	
             94,595	
       94,861	
          367	
       119	
         170	
       95,643	
 

    mutable.Queue[AnyRef]	
                  99.916	
      100,672	
          497	
       142	
         230	
              -	
 

    immutable.List[AnyRef]	
                 94,543	
  4,718,559	
            312	
       175	
  2,482,455	
               -	
 

    immutable.Vector[AnyRef]	
                  107	
          517	
          211	
       779	
         662	
              -	
 


         Scala
    http://d.hatena.ne.jp/chimerast/20110304/1299237142
    Array[AnyRef].apply              JIT                         (DCE)
                                                                                          	
                JIT
+
    MikuMikuDance                                                	
 

    n    PMD                (.pmd)
          n    3D

    n    VMD                 (.vmd)
          n    3D

    n                                           2ch

          n                          - MMD       (PMD)    	
          	
 
                http://bit.ly/fFYlS
          n 

    n 
          n    AS3 (b2ox ): http://www.libspark.org/browser/as3/FLARMMD
          n    XNA (wilfrem ): http://sourceforge.jp/projects/mmdx/
+
    PMD                                                    	
 

    n                                            in MMD
          n                       3D
          n 
          n 
          n 
          n    IK
          n 
                n 


    n    Direct3D OpenGL
          n 
                n    OpenGL            DirectX
                n             z
+
    VMD               	
 

    n 
          n 

          n 

          n 


    n 


          n 
+
       in Scala	
 
val file = new File(path)
using(new RandomAccessFile(file, "r")) { f =>
  val channel = f.getChannel
  val buffer = channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size)
  buffer.order(ByteOrder.LITTLE_ENDIAN)

       Some(new PMDModel(file, buffer))
}	
 

class      PMDModel(file: File, buffer: ByteBuffer) {
  val      header = new PMDHeader(buffer)
  val      vertices = Array.fill(buffer.getInt) { new PMDVertex(buffer) }
  val      indices = Array.fill(buffer.getInt) { buffer.getShort }
  val      materials = Array.fill(buffer.getInt) { new PMDMaterial(buffer) }
  val      bones = Array.fill(buffer.getShort) { new PMDBone(buffer) }
  val      iks = Array.fill(buffer.getShort) { new PMDIKData(buffer) }
  val      skins = Array.fill(buffer.getShort) { new PMDSkinData(buffer) }
  val      skinIndex = Array.fill(buffer.get) { buffer.getShort }
  val      boneDispName = Array.fill(buffer.get) { buffer.getString(50) }
  val      boneDisp = Array.fill(buffer.getInt) { new PMDBoneDisp(buffer) }
}
+
                                                    	
 

    n    IK
          n 


    n 
          n    JBullet: http://jbullet.advel.cz/

    n 
          n 

                n 

          n    Prolog     =
+
          	
 

    n 

Contenu connexe

Tendances

Tendances (13)

Creating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsCreating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector Graphics
 
Qt Widget In-Depth
Qt Widget In-DepthQt Widget In-Depth
Qt Widget In-Depth
 
05 - Qt External Interaction and Graphics
05 - Qt External Interaction and Graphics05 - Qt External Interaction and Graphics
05 - Qt External Interaction and Graphics
 
Using Multi-Touch and Gestures with Qt
Using Multi-Touch and Gestures with QtUsing Multi-Touch and Gestures with Qt
Using Multi-Touch and Gestures with Qt
 
Qt on Real Time Operating Systems
Qt on Real Time Operating SystemsQt on Real Time Operating Systems
Qt on Real Time Operating Systems
 
Qt Animation
Qt AnimationQt Animation
Qt Animation
 
Advanced Visualization with OpenGL in Oil & Gas
Advanced Visualization with OpenGL in Oil & GasAdvanced Visualization with OpenGL in Oil & Gas
Advanced Visualization with OpenGL in Oil & Gas
 
Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1
 
Advanced Scenegraph Rendering Pipeline
Advanced Scenegraph Rendering PipelineAdvanced Scenegraph Rendering Pipeline
Advanced Scenegraph Rendering Pipeline
 
04 - Qt Data
04 - Qt Data04 - Qt Data
04 - Qt Data
 
Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well
 
Dx11 performancereloaded
Dx11 performancereloadedDx11 performancereloaded
Dx11 performancereloaded
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
 

En vedette

sbt 0.10 for beginners?
sbt 0.10 for beginners?sbt 0.10 for beginners?
sbt 0.10 for beginners?
k4200
 
Sns suite presentation
Sns suite presentationSns suite presentation
Sns suite presentation
Jason Namkung
 
私とScalaと2010 @hito_asa
私とScalaと2010 @hito_asa私とScalaと2010 @hito_asa
私とScalaと2010 @hito_asa
Hitoshi Asai
 
rpscala35-scala2.9.0
rpscala35-scala2.9.0rpscala35-scala2.9.0
rpscala35-scala2.9.0
Kenji Yoshida
 
Scala design pattern
Scala design patternScala design pattern
Scala design pattern
Kenji Yoshida
 
Grass
GrassGrass
Grass
k4200
 

En vedette (15)

Lifthub (rpscala #31)
Lifthub (rpscala #31)Lifthub (rpscala #31)
Lifthub (rpscala #31)
 
Scala勉強会 in 渋谷 2010→2011(鹿島)
Scala勉強会 in 渋谷 2010→2011(鹿島)Scala勉強会 in 渋谷 2010→2011(鹿島)
Scala勉強会 in 渋谷 2010→2011(鹿島)
 
Rpscala18th
Rpscala18thRpscala18th
Rpscala18th
 
20120718 scalaで転職
20120718 scalaで転職20120718 scalaで転職
20120718 scalaで転職
 
Scala lang evolution
Scala lang evolutionScala lang evolution
Scala lang evolution
 
Lifthub (#rpscala 26)
Lifthub (#rpscala 26)Lifthub (#rpscala 26)
Lifthub (#rpscala 26)
 
sbt 0.10 for beginners?
sbt 0.10 for beginners?sbt 0.10 for beginners?
sbt 0.10 for beginners?
 
Sns suite presentation
Sns suite presentationSns suite presentation
Sns suite presentation
 
私とScalaと2010 @hito_asa
私とScalaと2010 @hito_asa私とScalaと2010 @hito_asa
私とScalaと2010 @hito_asa
 
Rpscala2011 0601
Rpscala2011 0601Rpscala2011 0601
Rpscala2011 0601
 
Scala repl
Scala replScala repl
Scala repl
 
rpscala35-scala2.9.0
rpscala35-scala2.9.0rpscala35-scala2.9.0
rpscala35-scala2.9.0
 
Scala design pattern
Scala design patternScala design pattern
Scala design pattern
 
scala-kaigi1-sbt
scala-kaigi1-sbtscala-kaigi1-sbt
scala-kaigi1-sbt
 
Grass
GrassGrass
Grass
 

Similaire à Real-Time 3D Programming in Scala

State of the art: Server-side JavaScript - MoscowJS
State of the art: Server-side JavaScript - MoscowJSState of the art: Server-side JavaScript - MoscowJS
State of the art: Server-side JavaScript - MoscowJS
Alexandre Morgaut
 
State of the art - server side JavaScript - web-5 2012
State of the art - server side JavaScript - web-5 2012State of the art - server side JavaScript - web-5 2012
State of the art - server side JavaScript - web-5 2012
Alexandre Morgaut
 
State of the art: Server-Side JavaScript - dejeuner fulljs
State of the art: Server-Side JavaScript - dejeuner fulljsState of the art: Server-Side JavaScript - dejeuner fulljs
State of the art: Server-Side JavaScript - dejeuner fulljs
Alexandre Morgaut
 
State of the art: server-side javaScript - NantesJS
State of the art: server-side javaScript - NantesJSState of the art: server-side javaScript - NantesJS
State of the art: server-side javaScript - NantesJS
Alexandre Morgaut
 
Efficient Graphics with Qt
Efficient Graphics with QtEfficient Graphics with Qt
Efficient Graphics with Qt
Ariya Hidayat
 

Similaire à Real-Time 3D Programming in Scala (20)

7nm "Navi" GPU - A GPU Built For Performance
7nm "Navi" GPU - A GPU Built For Performance 7nm "Navi" GPU - A GPU Built For Performance
7nm "Navi" GPU - A GPU Built For Performance
 
State of the art: Server-side JavaScript - MoscowJS
State of the art: Server-side JavaScript - MoscowJSState of the art: Server-side JavaScript - MoscowJS
State of the art: Server-side JavaScript - MoscowJS
 
State of the art server side java script
State of the art server side java scriptState of the art server side java script
State of the art server side java script
 
State of the art - server side JavaScript - web-5 2012
State of the art - server side JavaScript - web-5 2012State of the art - server side JavaScript - web-5 2012
State of the art - server side JavaScript - web-5 2012
 
[DSC 2016] 系列活動:李泳泉 / 星火燎原 - Spark 機器學習初探
[DSC 2016] 系列活動:李泳泉 / 星火燎原 - Spark 機器學習初探[DSC 2016] 系列活動:李泳泉 / 星火燎原 - Spark 機器學習初探
[DSC 2016] 系列活動:李泳泉 / 星火燎原 - Spark 機器學習初探
 
Genome Browser based on Google Maps API
Genome Browser based on Google Maps APIGenome Browser based on Google Maps API
Genome Browser based on Google Maps API
 
Syysgraph 2018 - Modern Graphics Abstractions & Real-Time Ray Tracing
Syysgraph 2018 - Modern Graphics Abstractions & Real-Time Ray TracingSyysgraph 2018 - Modern Graphics Abstractions & Real-Time Ray Tracing
Syysgraph 2018 - Modern Graphics Abstractions & Real-Time Ray Tracing
 
State of the art: Server-Side JavaScript - dejeuner fulljs
State of the art: Server-Side JavaScript - dejeuner fulljsState of the art: Server-Side JavaScript - dejeuner fulljs
State of the art: Server-Side JavaScript - dejeuner fulljs
 
3 673 (1)
3 673 (1)3 673 (1)
3 673 (1)
 
Building a Big Data Machine Learning Platform
Building a Big Data Machine Learning PlatformBuilding a Big Data Machine Learning Platform
Building a Big Data Machine Learning Platform
 
Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019
Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019
Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019
 
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
 
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
 
State of the art: server-side javaScript - NantesJS
State of the art: server-side javaScript - NantesJSState of the art: server-side javaScript - NantesJS
State of the art: server-side javaScript - NantesJS
 
最新の異常検知手法(NIPS 2018)
最新の異常検知手法(NIPS 2018)最新の異常検知手法(NIPS 2018)
最新の異常検知手法(NIPS 2018)
 
Efficient Graphics with Qt
Efficient Graphics with QtEfficient Graphics with Qt
Efficient Graphics with Qt
 
NvFX GTC 2013
NvFX GTC 2013NvFX GTC 2013
NvFX GTC 2013
 
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love story
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
 

Plus de Hideyuki Takeuchi

オープンソースプロジェクト E2D3のご紹介
オープンソースプロジェクト E2D3のご紹介オープンソースプロジェクト E2D3のご紹介
オープンソースプロジェクト E2D3のご紹介
Hideyuki Takeuchi
 

Plus de Hideyuki Takeuchi (9)

もっとデータ可視化をカジュアルに! OSSプロジェクト「E2D3」
もっとデータ可視化をカジュアルに! OSSプロジェクト「E2D3」もっとデータ可視化をカジュアルに! OSSプロジェクト「E2D3」
もっとデータ可視化をカジュアルに! OSSプロジェクト「E2D3」
 
オープンソースプロジェクト E2D3のご紹介
オープンソースプロジェクト E2D3のご紹介オープンソースプロジェクト E2D3のご紹介
オープンソースプロジェクト E2D3のご紹介
 
どんなデータでもキレイに魅せる! 〜HTML5/JavaScriptでグラフを描画する今時の手法〜
どんなデータでもキレイに魅せる! 〜HTML5/JavaScriptでグラフを描画する今時の手法〜どんなデータでもキレイに魅せる! 〜HTML5/JavaScriptでグラフを描画する今時の手法〜
どんなデータでもキレイに魅せる! 〜HTML5/JavaScriptでグラフを描画する今時の手法〜
 
SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法
SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法
SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法
 
とあるCTØの切込隊長日誌(スタートアップ) ビジネス篇
とあるCTØの切込隊長日誌(スタートアップ) ビジネス篇とあるCTØの切込隊長日誌(スタートアップ) ビジネス篇
とあるCTØの切込隊長日誌(スタートアップ) ビジネス篇
 
Web時代の大富豪的プログラミングのススメ
Web時代の大富豪的プログラミングのススメWeb時代の大富豪的プログラミングのススメ
Web時代の大富豪的プログラミングのススメ
 
Reactive Programming
Reactive ProgrammingReactive Programming
Reactive Programming
 
ScalaCL in ScalaKaigi
ScalaCL in ScalaKaigiScalaCL in ScalaKaigi
ScalaCL in ScalaKaigi
 
Communication between Wicket and Flex
Communication between Wicket and FlexCommunication between Wicket and Flex
Communication between Wicket and Flex
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Real-Time 3D Programming in Scala

  • 1. + Scala LWJGL 3D @chimerast
  • 2. + n  n  Twitter: @chimerast n  Blog: http://chimera.st/ n  Scala : 1 n  LWJGL : 3 n  NEET n  Web/ n  Seasar Foundation S2Wicket 1.4 n  wicket-ja, java-ja n  3D n  3D n  DirectX7 Immediate Mode
  • 3. + n  n  n  n  n  n  n  n  n  n 
  • 4. + Scala 3D n  n  3D (or ) n  n  MikuMikuDance 3D n  n  Scala n  LWJGL n  Slick
  • 5. + MikuMikuDance n  n  http://www.geocities.jp/higuchuu4/ n  n  DirectX http://www.nicovideo.jp/watch/sm9647253 n  n  n  n  n  JVM
  • 6. + Scala A Scalable Language n  + n  n  n  Java 1 n  3D scala> List(3,2,5,1).reduceLeft(math.max) res0: Int = 5 n  Java n 
  • 7. + LWJGL Lightweight Java Game Library n  + n  http://www.lwjgl.org/ n  OpenGL n  3D API n  n  OpenAL n  3D API n  n  OpenCL n  GPGPU GPU API n  n 
  • 8. + Slick 2D Game Library based on LWJGL n  LWJGL 2D n  http://slick.cokeandcode.com/ n  LWJGL(OpenGL) 2D n  n  2D n  n  n  SVG
  • 9. + LWJGL n  https://github.com/chimerast/scala-lwjgl-sample n  sbt n  n  3D n  3D n  LWJGL native java.library.path n  sbt fork
  • 10. + n  3D n  n  IK ( ) n  n  n  n  n  n 
  • 11. + n  n  n  60fps(1 60 ) n  16ms
  • 12. + Java/Scala n  (GC) n  n  n  C++ n  JIT C++ JIT n  SIMD C+ + n  SIMD 1CPU n  10 n  3D
  • 13. + n  n  n  Array[Float] n  n  Scala immutable.List n  GC n  n  Java n  OpenGL GPU n  GPU SIMD n 
  • 14. + Scala : .apply .update .foreach .prepend .append .insert java.util.ArrayList[AnyRef] 11 19 16 19,746 158 39,317 java.util.LinkedList[AnyRef] 38.622 388,877 43 152 141 320 Array[AnyRef] 1 21 174 - - - mutable.ArrayBuffer[AnyRef] 11 19 122 19,734 172 40,118 mutable.ListBuffer[AnyRef] 94,595 94,861 367 119 170 95,643 mutable.Queue[AnyRef] 99.916 100,672 497 142 230 - immutable.List[AnyRef] 94,543 4,718,559 312 175 2,482,455 - immutable.Vector[AnyRef] 107 517 211 779 662 - Scala http://d.hatena.ne.jp/chimerast/20110304/1299237142 Array[AnyRef].apply JIT (DCE) JIT
  • 15. + MikuMikuDance n  PMD (.pmd) n  3D n  VMD (.vmd) n  3D n  2ch n  - MMD (PMD) http://bit.ly/fFYlS n  n  n  AS3 (b2ox ): http://www.libspark.org/browser/as3/FLARMMD n  XNA (wilfrem ): http://sourceforge.jp/projects/mmdx/
  • 16. + PMD n  in MMD n  3D n  n  n  n  IK n  n  n  Direct3D OpenGL n  n  OpenGL DirectX n  z
  • 17. + VMD n  n  n  n  n  n 
  • 18. + in Scala val file = new File(path) using(new RandomAccessFile(file, "r")) { f => val channel = f.getChannel val buffer = channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size) buffer.order(ByteOrder.LITTLE_ENDIAN) Some(new PMDModel(file, buffer)) } class PMDModel(file: File, buffer: ByteBuffer) { val header = new PMDHeader(buffer) val vertices = Array.fill(buffer.getInt) { new PMDVertex(buffer) } val indices = Array.fill(buffer.getInt) { buffer.getShort } val materials = Array.fill(buffer.getInt) { new PMDMaterial(buffer) } val bones = Array.fill(buffer.getShort) { new PMDBone(buffer) } val iks = Array.fill(buffer.getShort) { new PMDIKData(buffer) } val skins = Array.fill(buffer.getShort) { new PMDSkinData(buffer) } val skinIndex = Array.fill(buffer.get) { buffer.getShort } val boneDispName = Array.fill(buffer.get) { buffer.getString(50) } val boneDisp = Array.fill(buffer.getInt) { new PMDBoneDisp(buffer) } }
  • 19. + n  IK n  n  n  JBullet: http://jbullet.advel.cz/ n  n  n  n  Prolog =
  • 20. + n