jme3_source_structure.adoc 6.1 KB

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