jme3_source_structure.adoc 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. = jMonkeyEngine 3 -- Source Structure
  2. :author:
  3. :revnumber:
  4. :revdate: 2016/03/17 20:48
  5. :relfileprefix: ../
  6. :imagesdir: ..
  7. ifdef::env-github,env-browser[:outfilesuffix: .adoc]
  8. An overview of the source structure of the JME3 project. In order to support both Desktop and Android Java platforms, it was necessary to split the source code into several parts. This wiki page describes the packages and their purpose. Status: Up-to-date for JME3 beta.
  9. == Structure of src directory
  10. You can build jME using the included build.xml script: `ant clean; ant jar; ant run`
  11. When building the sources in a project created with another IDE, include every folder under `src` in the project as its own separate source root.
  12. === Core
  13. [cols="2", options="header"]
  14. |===
  15. <a| Source Package
  16. <a| Description
  17. <a| src/core
  18. a| The main package. Must always be included, as all other packages depend on it.
  19. a| src/core-effects
  20. a| Core effects like Water, PSSM etc.
  21. <a| src/core-data
  22. a| Basic material definitions, shaders and fonts that are needed by most jME3 applications.
  23. a| src/core-plugins
  24. a| Important asset plugins, such as .j3o model loader, .obj loader, font loader, basic image loaders.
  25. <a| src/desktop
  26. <a| Must be included if deploying on desktop, applet or web start. *Exclude Android*
  27. <a| src/android
  28. a| Must be included if deploying on the Android platform. *Exclude Desktop*
  29. <a| src/lwjgl
  30. a| LWJGL OpenGL display implementation. *Exclude Android*
  31. |===
  32. === Physics
  33. [cols="2", options="header"]
  34. |===
  35. a| Source Package
  36. a| Description
  37. <a| +*+ src/jbullet
  38. a| Game Physics Engine, based on the jBullet framework. Desktop only. *Exclude Bullet*
  39. <a| +*+ src/bullet
  40. a| Game Physics Engine, based on the native Bullet framework. Needs jme3-bullet-native or jme3-bullet-native-android (beta) *Exclude jBullet*
  41. a| src/bullet-native
  42. a| Native Bullet implementation pass:[C++] classes. *Exclude jBullet*
  43. a| src/jme3-bullet-native-android
  44. a| Native libraries needed for bullet (not jbullet) on android.
  45. |===
  46. [NOTE]
  47. ====
  48. +*+ Only one of the physics libraries can be used at a time as they replace each other.
  49. * jbullet
  50. or
  51. * bullet
  52. ** with one or both “natives” library
  53. *** bullet-native
  54. *** jme3-bullet-native-android
  55. ====
  56. === Plugins and Extra packages
  57. [cols="2", options="header"]
  58. |===
  59. a| Source Package
  60. a| Description
  61. <a| src/ogre
  62. a| Ogre3D model and scene loader. Supports skeletal and vertex animation, scene loading, and materials.
  63. <a| src/xml
  64. <a| Provides an XML im/exporter.
  65. <a| src/jogg
  66. <a| OGG/Vorbis loader to play .ogg sound files.
  67. <a| src/niftygui
  68. a| Support for custom Graphical User Interfaces.
  69. <a| src/blender
  70. a| Blender model importer
  71. a| src/networking
  72. a| SpiderMonkey networking package
  73. <a| src/terrain
  74. a| Terrain generation tools
  75. <a| src/vr
  76. a| Virtual reality
  77. |===
  78. === Tests, Games and Tools
  79. [cols="2", options="header"]
  80. |===
  81. a| Source Package
  82. a| Description
  83. <a| src/test
  84. a| Small sample Applications that demo individual jME3 features. jme3_test-data.jar
  85. a| src/test-data
  86. a| Data assets (jme3_test-data.jar) required by jme3_test samples.
  87. <a| src/tools
  88. a| Tools and programs that help you use jme3.
  89. |===
  90. == Structure of lib directory
  91. JME3 depends on the following JARs and native libraries in the `lib` directory. The JAR libraries must be on the classpath.
  92. [NOTE]
  93. ====
  94. The jME3-*natives*.jar bundles contain the native libraries, those are necessary `.dll`, `.jnilib`, `lib**.so**` files. You do not need to manually include native libraries on the java.library.path! jME3 handles the extraction of natives automatically via the JAR bundles.
  95. ====
  96. * lib/android:
  97. ** android.jar
  98. * lib/bullet:
  99. ** android, jME3-bullet-natives-android.jar, jME3-bullet-natives.jar, jarcontent (natives)
  100. +
  101. NOTE: *Only one version of jme3-jbullet OR jme3-bullet with "`natives`" library can be used.*
  102. * lib/jbullet:
  103. ** asm-all.jar, jbullet.jar, stack-alloc.jar, vecmath.jar
  104. * lib/jogg:
  105. ** j-ogg-oggd.jar, j-ogg-vorbisd.jar
  106. * lib/lwjgl:
  107. ** jME3-lwjgl-natives.jar, jinput.jar, lwjgl.jar
  108. * lib/niftygui:
  109. ** nifty.jar, nifty-javadoc.jar, xmlpull-xpp3.jar, eventbus.jar
  110. ** nifty-default-controls-javadoc.jar, nifty-default-controls.jar,
  111. ** nifty-examples.jar, nifty-examples-javadoc.jar, nifty-style-black.jar
  112. == Structure of jMonkeyEngine3 JARs
  113. After the build is complete (in the `dist` directory), you see that the jMonkeyEngine library is split up over several JAR files. This allows for better separation of the parts for different operating systems, projects etc.
  114. [cols="3", options="header"]
  115. |===
  116. a| JAR file
  117. a| Purpose
  118. a| External Dependence
  119. a| dist/lib/jME3-core.jar
  120. a| Platform-independent core libraries (math, animation, scenegraph, Wavefront OBJ model support, etc)
  121. a| None
  122. a| dist/lib/jME3-effects.jar
  123. a| Core jME3 effects (Water, SSAO etc)
  124. a| None
  125. a| dist/lib/jME3-desktop.jar
  126. a| Desktop PC only jME3 libraries
  127. a| None
  128. a| dist/lib/jME3-plugins.jar
  129. a| Basic import plugins (OgreXML models and j3o XML)
  130. a| None
  131. a| dist/lib/jME3-blender.jar
  132. a| Blender model import plugin (Desktop only)
  133. a| None
  134. a| dist/lib/jME3-networking.jar
  135. a| "`Spidermonkey`" networking library
  136. a| None
  137. a| dist/lib/jME3-jogg.jar
  138. a| J-OGG audio plugin
  139. a| j-ogg-vorbisd.jar, j-ogg-oggd.jar
  140. a| dist/lib/jME3-terrain.jar
  141. a| Terrain system
  142. a| None
  143. a| dist/lib/jME3-jbullet.jar
  144. a| jBullet physics
  145. a| jbullet.jar, vecmath.jar, stack-alloc.jar, asm-all-3.1.jar
  146. a| dist/lib/jME3-bullet.jar
  147. a| Bullet physics (only jBullet *or* Bullet can be used)
  148. a| jME3-bullet-natives.jar
  149. a| dist/lib/jME3-niftygui.jar
  150. a| NiftyGUI support
  151. a| nifty.jar, nifty-default-controls.jar, eventbus.jar, xmlpull-xpp3.jar
  152. a| dist/lib/jME3-lwjgl.jar
  153. a| LWJGL Desktop Renderer
  154. a| lwjgl.jar, jME3-lwjgl-natives.jar, jinput.jar
  155. a| dist/lib/jME3-android.jar
  156. a| Android Renderer
  157. a| Android system
  158. |===
  159. Optional:
  160. * nifty-examples.jar
  161. * jME3-testdata.jar
  162. * nifty-style-black.jar (default nifty style)
  163. == API Structure
  164. For details see the link:{link-javadoc}[javadoc].
  165. == Data File Types
  166. [cols="3", options="header"]
  167. |===
  168. a| Path
  169. a| File types
  170. a| purpose
  171. a| /Common/MatDefs/*/
  172. l| .glsllib
  173. a| Standard ShaderLibs
  174. a| /Common/MatDefs/*/
  175. l| .j3md
  176. a| Standard Material Definitions
  177. a| /Common/Materials/*/
  178. l| .j3m
  179. a| Standard Material
  180. a| /Interface/Fonts/
  181. l| .fnt + .png
  182. a| Standard Fonts
  183. |===
  184. See also: <<jme3/features#supported-formats,Supported Formats>>.