SlideShare a Scribd company logo
+




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 

More Related Content

What's hot

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
David Keener
 
Qt Widget In-Depth
Qt Widget In-DepthQt Widget In-Depth
Qt Widget In-Depth
account inactive
 
05 - Qt External Interaction and Graphics
05 - Qt External Interaction and Graphics05 - Qt External Interaction and Graphics
05 - Qt External Interaction and Graphics
Andreas Jakl
 
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
account inactive
 
Qt on Real Time Operating Systems
Qt on Real Time Operating SystemsQt on Real Time Operating Systems
Qt on Real Time Operating Systems
account inactive
 
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
account inactive
 
Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1
NokiaAppForum
 
Advanced Scenegraph Rendering Pipeline
Advanced Scenegraph Rendering PipelineAdvanced Scenegraph Rendering Pipeline
Advanced Scenegraph Rendering Pipeline
Narann29
 
04 - Qt Data
04 - Qt Data04 - Qt Data
04 - Qt Data
Andreas Jakl
 
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
Mark Kilgard
 
Dx11 performancereloaded
Dx11 performancereloadedDx11 performancereloaded
Dx11 performancereloaded
mistercteam
 
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
AMD Developer Central
 

What's hot (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
 

Viewers also liked

Lifthub (rpscala #31)
Lifthub (rpscala #31)Lifthub (rpscala #31)
Lifthub (rpscala #31)
k4200
 
Scala勉強会 in 渋谷 2010→2011(鹿島)
Scala勉強会 in 渋谷 2010→2011(鹿島)Scala勉強会 in 渋谷 2010→2011(鹿島)
Scala勉強会 in 渋谷 2010→2011(鹿島)
k4200
 
Rpscala18th
Rpscala18thRpscala18th
Rpscala18th
nanjakkun
 
20120718 scalaで転職
20120718 scalaで転職20120718 scalaで転職
20120718 scalaで転職
大翼 福田
 
Scala lang evolution
Scala lang evolutionScala lang evolution
Scala lang evolution
Akira Takahashi
 
Lifthub (#rpscala 26)
Lifthub (#rpscala 26)Lifthub (#rpscala 26)
Lifthub (#rpscala 26)
k4200
 
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 presentationJason Namkung
 
私とScalaと2010 @hito_asa
私とScalaと2010 @hito_asa私とScalaと2010 @hito_asa
私とScalaと2010 @hito_asaHitoshi Asai
 
Rpscala2011 0601
Rpscala2011 0601Rpscala2011 0601
Rpscala2011 0601
Hajime Yanagawa
 
rpscala35-scala2.9.0
rpscala35-scala2.9.0rpscala35-scala2.9.0
rpscala35-scala2.9.0Kenji Yoshida
 
Scala design pattern
Scala design patternScala design pattern
Scala design patternKenji Yoshida
 
Grass
GrassGrass
Grassk4200
 

Viewers also liked (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
 

Similar to Real-Time 3D Programming in Scala

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
AMD
 
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 - MoscowJSAlexandre Morgaut
 
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
Thibaud Arguillere
 
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 2012Alexandre Morgaut
 
[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
Hong ChangBum
 
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
Electronic Arts / DICE
 
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 fulljsAlexandre Morgaut
 
3 673 (1)
3 673 (1)3 673 (1)
3 673 (1)
mistercteam
 
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
Cliff Click
 
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
Unity Technologies
 
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.....
Alessandro Cinelli (cirpo)
 
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.....
Michele Orselli
 
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 - NantesJSAlexandre Morgaut
 
最新の異常検知手法(NIPS 2018)
最新の異常検知手法(NIPS 2018)最新の異常検知手法(NIPS 2018)
最新の異常検知手法(NIPS 2018)
ぱんいち すみもと
 
Efficient Graphics with Qt
Efficient Graphics with QtEfficient Graphics with Qt
Efficient Graphics with QtAriya Hidayat
 
NvFX GTC 2013
NvFX GTC 2013NvFX GTC 2013
NvFX GTC 2013
Tristan Lorach
 
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자
Seongdae Kim
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love story
Alexandre Morgaut
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
JiandSon
 

Similar to 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)
 

More from Hideyuki Takeuchi

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

More from 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
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 

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