Skip to content

Commit 48e3378

Browse files
authored
Merge pull request #220 from the3deer/fix/polybool
#219 geometry demo
2 parents a639beb + 3e130d0 commit 48e3378

File tree

104 files changed

+15229
-180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+15229
-180
lines changed

CHANGELOG.md

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
ChangeLog
2+
=========
3+
4+
(f) fixed, (i) improved, (n) new feature
5+
6+
- 3.4.1 (23/09/2022)
7+
- (f) bug fixing: lighting, textures, etc #176
8+
- (i) texture loading refactoring #61
9+
- (i) shader refactoring & deduplication #61
10+
- 3.4.0 (17/09/2022)
11+
- (n) GLTF basic support #176
12+
- 3.3.1 (12/09/2022)
13+
- (f) fixed texture issue + color issue + blending issue. fixed #214
14+
- (f) fixed texture issue #204
15+
- (f) fixed STL binary fallback issue #208
16+
- 3.3.0 (23/06/2022)
17+
- (n) interactive object orientation
18+
- (n) isometric, orthographic and free camera view
19+
- (n) New gui axis + gui info
20+
- (f) fixed FPS counter
21+
- (i) some user options are being saved (camera settings)
22+
23+
- 3.2.0 (02/02/2022)
24+
- (i) repository explorer improved - multiple index files
25+
- (f) smoothing fixed
26+
- (f) fixed renderer memory leak
27+
- 3.1.1 (28/10/2021)
28+
- (f) google play required library upgrades
29+
- (f) spanish menu fixed
30+
- 3.1.0 (10/10/2020)
31+
- (n) skybox
32+
- (f) deleted unlicensed assets
33+
- 3.0.4 (05/10/2020)
34+
- (f) support for multiple skin controllers
35+
- (f) skeleton fixed to use invert of inverse bind matrix
36+
- 3.0.3 (05/09/2020)
37+
- (f) smooth faces are now toggle featured - not all models should be smoothed
38+
- (f) fixed normal calculation - using high precision numbers
39+
- 3.0.2 (03/09/2020)
40+
- (f) setUniform4fv function had length zero - issue detected with Xiaomi Redmi 8
41+
- (f) gl_MaxVertexUniformVectors is apparently not working - "too many uniforms" - detected in Xiaomi Redmi 8
42+
- 3.0.1 (15/07/2020)
43+
- (f) Forgot to add requestLegacyExternalStorage option - Android 10 requirement
44+
- 3.0.0 (15/07/2020)
45+
- (n) Support for Object Groups (wavefront: o,g, dae: <geometry>)
46+
- (n) Support for Smoothing Groups (wavefront)
47+
- (n) migrated project to androidx compat libraries
48+
- (n) GUI - fps counter - experimental framework
49+
- (n) Collada support for polygon with holes (<ph>)
50+
- (i) Complete re-engineering and refactoring of the code
51+
- (i) Wavefront + Collada Loader reimplemented
52+
- (f) Fixed overall bugs
53+
- 2.7.0 (13/11/2019)
54+
- (n) new blending force mode to 50%
55+
- (f) fixed light rendering issues on shaders #125 (diffuse + specular)
56+
- (f) fixed bugs when DAE had multiple geometries #125
57+
- (f) fixed textures not being linked issue
58+
- (f) fixed performance issues: now rendering below 5% cpu & no ram allocation
59+
- 2.6.0 (20/10/2019)
60+
- (n) #81 Support for collada files with multiple geometries
61+
- (f) #94 fixed setVisible(boolean)
62+
- (f) #92 fixed multiple color rendering for non-triangulated file.obj
63+
- (i) overall engine improved
64+
- 2.5.1 (20/05/2019)
65+
- (f) wavefront loader fixed for meshObject point to negative indices
66+
- 2.5.0 (19/05/2019)
67+
- (n) new blending toggle
68+
- (n) new color toggle
69+
- (i) engine refactoring: externalized shaders
70+
- (i) engine improved: fixed bugs and removed classes
71+
- 2.4.0 (16/05/2019)
72+
- (n) stereoscopic rendering: anaglyph + cardboard
73+
- 2.3.0 (27/09/2018)
74+
- (n) Externalized 3d engine into android library module
75+
- (n) Wiki initial documentation
76+
- 2.2.0 (11/09/2018)
77+
- (n) Load models from app repository
78+
- (i) Reduced app size to only 1 Megabyte
79+
- 2.1.0 (07/09/2018)
80+
- (n) Skeleton Animation
81+
- (n) File chooser to load files from any where
82+
- (f) Collada Animator fixed (INV_BIND_MATRIX, bind_shape_matrix)
83+
- (f) Collada Animator Performance improved
84+
- (f) Application refactoring (ContentUtils, Loaders, etc)
85+
- (f) Several bugs fixed
86+
- 2.0.4 (22/12/2017)
87+
- (n) Implemented face collision detection algorithm: ray-triangle + octree
88+
- 2.0.3 (21/12/2017)
89+
- (i) Improved collision detection algorithm (ray-aabb) for selecting objects
90+
- (i) BoundingBox code cleanup
91+
- 2.0.2 (17/12/2017)
92+
- (f) Collada XML parser is now android's XmlPullParser
93+
- (f) Animation engine frame times improved
94+
- (n) Camera now moves smoothly
95+
- 2.0.1 (08/12/2017)
96+
- (f) Multiple Collada parser fixes
97+
- (f) Camera now can look inside objects
98+
- 2.0.0 (24/11/2017)
99+
- (n) Support for collada files with skeletal animations :)
100+
- 1.4.1 (21/11/2017)
101+
- (f) #29: Crash loading obj with only vertex info
102+
- 1.4.0 (19/11/2017)
103+
- (f) #28: Load texture available for any model having texture coordinates
104+
- 1.3.1 (23/04/2017)
105+
- (f) #18: Removed asReadOnlyBuffer() because it is causing IndexOutOfBounds on Android 7
106+
- 1.3.0 (17/04/2017)
107+
- (n) #17: Added support for STL files
108+
- (n) #17: Asynchronous building of model so the build rendering is previewed
109+
- (f) #17: Added Toasts to buttons to show current state
110+
- 1.2.10 (16/04/2017)
111+
- (f) #16: Immersive mode is now configurable in the ModelActivity Intent: b.putString("immersiveMode", "false");
112+
- (f) #16: Background color configurable in the ModelActivity Intent: b.putString("backgroundColor", "0 0 0 1");
113+
- (f) #16: Fixed vertex normals generation (vertices were missing)
114+
- (f) #16: Scaling is now implemented in the ModelView Matrix with Object3DData.setScale(float[])
115+
- (f) #16: Wireframe generation is now using the source data
116+
- (n) #16: Implemented Point Drawing, like wireframe mode but only the points are drawn
117+
- (f) #16: Removed trailing slash from parameter "assetDir"
118+
- (f) #16: Access to ByteBuffers made absolute so there are thread safe (future fixes need this)
119+
- 1.2.9 (11/04/2017)
120+
- (f) #15: Toggle rotating light
121+
- (f) #15: Wireframe with textures and colors
122+
- 1.2.8 (10/04/2017)
123+
- (f) Fixed #14: Camera movement improved. Only 1 rotation vector is used + space bounds set
124+
- 1.2.8 (04/04/2017)
125+
- (f) Fixed #13: parsing of vertices with multiple spaces
126+
- (i) Improved error handling on loading task
127+
- (i) Vertices are defaulted to (0,0,0) if parsing fails
128+
- 1.2.7 (03/04/2017)
129+
- (i) Removed commons-lang3 dependency
130+
- 1.2.6 (02/04/2017)
131+
- (f) Fixed #12. Drawing the wireframe using GL_LINES and the index buffer (drawElements)
132+
- 1.2.5 (01/04/2017)
133+
- (f) Fixed #10. Map meshObject to texture only when using the only loaded texture
134+
- (f) Fixed #11. Generation of missing vertex normals
135+
- 1.2.4 (30/03/2017)
136+
- (f) Fixed #5. Memory performance optimization
137+
- 1.2.3 (27/03/2017)
138+
- (f) Fixed #1. Cpu performance optimization
139+
- 1.2.2 (25/03/2017)
140+
- (f) Fixed #9. IOOBE loading face normals when meshObject had no texture or normals
141+
- 1.2.1 (27/02/2017)
142+
- (f) Fixed loading external files issue #6
143+
- (i) Project moved to gradle
144+
- 1.2.0 (06/04/2016)
145+
- (n) Implemented selection of objects
146+
- 1.1.0 (30/03/2016)
147+
- (n) Implemented lighting & toggle textures & lights
148+
- (i) Refactoring of 3DObjectImpl
149+
- 1.0.0 (27/03/2016)
150+
- (n) First release in Google Play Android Market

README.md

Lines changed: 7 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Android 3D Model Viewer
66
This is a demo of OpenGL ES 2.0.
77
It is basically an android application with a 3D engine that can load Wavefront OBJ, STL, DAE & GLTF files.
88
The purpose of this application is to learn and share how to draw using OpenGL language.
9-
The application does not use any third party library.
109

1110
* Wafefront format (OBJ): https://en.wikipedia.org/wiki/Wavefront_.obj_file
1211
* STereoLithography format (STL): https://en.wikipedia.org/wiki/STL_(file_format)
@@ -161,6 +160,12 @@ You may need one of this glasses to view models in 3D virtual reality.
161160
[<img src="https://raw.githubusercontent.com/the3deers/android-3D-model-viewer/master/market/cardboard-3d.jpg">](https://amzn.to/2E8M1Tq)
162161

163162

163+
Dependencies
164+
============
165+
166+
* implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4' (gltf json parser)
167+
168+
164169
Documentation
165170
=============
166171

@@ -197,155 +202,4 @@ Assets
197202
* skybox sea : https://learnopengl.com/Advanced-OpenGL/Cubemaps
198203
* skybox sand : Copyright 2012 Mobialia - https://github.com/mobialia/jmini3d
199204
* repository (parts) : Community contribution (Professsor S)
200-
201-
202-
ChangeLog
203-
=========
204-
205-
(f) fixed, (i) improved, (n) new feature
206-
207-
- 3.4.1 (23/09/2022)
208-
- (f) bug fixing: lighting, textures, etc #176
209-
- (i) texture loading refactoring #61
210-
- (i) shader refactoring & deduplication #61
211-
- 3.4.0 (17/09/2022)
212-
- (n) GLTF basic support #176
213-
- 3.3.1 (12/09/2022)
214-
- (f) fixed texture issue + color issue + blending issue. fixed #214
215-
- (f) fixed texture issue #204
216-
- (f) fixed STL binary fallback issue #208
217-
- 3.3.0 (23/06/2022)
218-
- (n) interactive object orientation
219-
- (n) isometric, orthographic and free camera view
220-
- (n) New gui axis + gui info
221-
- (f) fixed FPS counter
222-
- (i) some user options are being saved (camera settings)
223-
224-
- 3.2.0 (02/02/2022)
225-
- (i) repository explorer improved - multiple index files
226-
- (f) smoothing fixed
227-
- (f) fixed renderer memory leak
228-
- 3.1.1 (28/10/2021)
229-
- (f) google play required library upgrades
230-
- (f) spanish menu fixed
231-
- 3.1.0 (10/10/2020)
232-
- (n) skybox
233-
- (f) deleted unlicensed assets
234-
- 3.0.4 (05/10/2020)
235-
- (f) support for multiple skin controllers
236-
- (f) skeleton fixed to use invert of inverse bind matrix
237-
- 3.0.3 (05/09/2020)
238-
- (f) smooth faces are now toggle featured - not all models should be smoothed
239-
- (f) fixed normal calculation - using high precision numbers
240-
- 3.0.2 (03/09/2020)
241-
- (f) setUniform4fv function had length zero - issue detected with Xiaomi Redmi 8
242-
- (f) gl_MaxVertexUniformVectors is apparently not working - "too many uniforms" - detected in Xiaomi Redmi 8
243-
- 3.0.1 (15/07/2020)
244-
- (f) Forgot to add requestLegacyExternalStorage option - Android 10 requirement
245-
- 3.0.0 (15/07/2020)
246-
- (n) Support for Object Groups (wavefront: o,g, dae: <geometry>)
247-
- (n) Support for Smoothing Groups (wavefront)
248-
- (n) migrated project to androidx compat libraries
249-
- (n) GUI - fps counter - experimental framework
250-
- (n) Collada support for polygon with holes (<ph>)
251-
- (i) Complete re-engineering and refactoring of the code
252-
- (i) Wavefront + Collada Loader reimplemented
253-
- (f) Fixed overall bugs
254-
- 2.7.0 (13/11/2019)
255-
- (n) new blending force mode to 50%
256-
- (f) fixed light rendering issues on shaders #125 (diffuse + specular)
257-
- (f) fixed bugs when DAE had multiple geometries #125
258-
- (f) fixed textures not being linked issue
259-
- (f) fixed performance issues: now rendering below 5% cpu & no ram allocation
260-
- 2.6.0 (20/10/2019)
261-
- (n) #81 Support for collada files with multiple geometries
262-
- (f) #94 fixed setVisible(boolean)
263-
- (f) #92 fixed multiple color rendering for non-triangulated file.obj
264-
- (i) overall engine improved
265-
- 2.5.1 (20/05/2019)
266-
- (f) wavefront loader fixed for meshObject point to negative indices
267-
- 2.5.0 (19/05/2019)
268-
- (n) new blending toggle
269-
- (n) new color toggle
270-
- (i) engine refactoring: externalized shaders
271-
- (i) engine improved: fixed bugs and removed classes
272-
- 2.4.0 (16/05/2019)
273-
- (n) stereoscopic rendering: anaglyph + cardboard
274-
- 2.3.0 (27/09/2018)
275-
- (n) Externalized 3d engine into android library module
276-
- (n) Wiki initial documentation
277-
- 2.2.0 (11/09/2018)
278-
- (n) Load models from app repository
279-
- (i) Reduced app size to only 1 Megabyte
280-
- 2.1.0 (07/09/2018)
281-
- (n) Skeleton Animation
282-
- (n) File chooser to load files from any where
283-
- (f) Collada Animator fixed (INV_BIND_MATRIX, bind_shape_matrix)
284-
- (f) Collada Animator Performance improved
285-
- (f) Application refactoring (ContentUtils, Loaders, etc)
286-
- (f) Several bugs fixed
287-
- 2.0.4 (22/12/2017)
288-
- (n) Implemented face collision detection algorithm: ray-triangle + octree
289-
- 2.0.3 (21/12/2017)
290-
- (i) Improved collision detection algorithm (ray-aabb) for selecting objects
291-
- (i) BoundingBox code cleanup
292-
- 2.0.2 (17/12/2017)
293-
- (f) Collada XML parser is now android's XmlPullParser
294-
- (f) Animation engine frame times improved
295-
- (n) Camera now moves smoothly
296-
- 2.0.1 (08/12/2017)
297-
- (f) Multiple Collada parser fixes
298-
- (f) Camera now can look inside objects
299-
- 2.0.0 (24/11/2017)
300-
- (n) Support for collada files with skeletal animations :)
301-
- 1.4.1 (21/11/2017)
302-
- (f) #29: Crash loading obj with only vertex info
303-
- 1.4.0 (19/11/2017)
304-
- (f) #28: Load texture available for any model having texture coordinates
305-
- 1.3.1 (23/04/2017)
306-
- (f) #18: Removed asReadOnlyBuffer() because it is causing IndexOutOfBounds on Android 7
307-
- 1.3.0 (17/04/2017)
308-
- (n) #17: Added support for STL files
309-
- (n) #17: Asynchronous building of model so the build rendering is previewed
310-
- (f) #17: Added Toasts to buttons to show current state
311-
- 1.2.10 (16/04/2017)
312-
- (f) #16: Immersive mode is now configurable in the ModelActivity Intent: b.putString("immersiveMode", "false");
313-
- (f) #16: Background color configurable in the ModelActivity Intent: b.putString("backgroundColor", "0 0 0 1");
314-
- (f) #16: Fixed vertex normals generation (vertices were missing)
315-
- (f) #16: Scaling is now implemented in the ModelView Matrix with Object3DData.setScale(float[])
316-
- (f) #16: Wireframe generation is now using the source data
317-
- (n) #16: Implemented Point Drawing, like wireframe mode but only the points are drawn
318-
- (f) #16: Removed trailing slash from parameter "assetDir"
319-
- (f) #16: Access to ByteBuffers made absolute so there are thread safe (future fixes need this)
320-
- 1.2.9 (11/04/2017)
321-
- (f) #15: Toggle rotating light
322-
- (f) #15: Wireframe with textures and colors
323-
- 1.2.8 (10/04/2017)
324-
- (f) Fixed #14: Camera movement improved. Only 1 rotation vector is used + space bounds set
325-
- 1.2.8 (04/04/2017)
326-
- (f) Fixed #13: parsing of vertices with multiple spaces
327-
- (i) Improved error handling on loading task
328-
- (i) Vertices are defaulted to (0,0,0) if parsing fails
329-
- 1.2.7 (03/04/2017)
330-
- (i) Removed commons-lang3 dependency
331-
- 1.2.6 (02/04/2017)
332-
- (f) Fixed #12. Drawing the wireframe using GL_LINES and the index buffer (drawElements)
333-
- 1.2.5 (01/04/2017)
334-
- (f) Fixed #10. Map meshObject to texture only when using the only loaded texture
335-
- (f) Fixed #11. Generation of missing vertex normals
336-
- 1.2.4 (30/03/2017)
337-
- (f) Fixed #5. Memory performance optimization
338-
- 1.2.3 (27/03/2017)
339-
- (f) Fixed #1. Cpu performance optimization
340-
- 1.2.2 (25/03/2017)
341-
- (f) Fixed #9. IOOBE loading face normals when meshObject had no texture or normals
342-
- 1.2.1 (27/02/2017)
343-
- (f) Fixed loading external files issue #6
344-
- (i) Project moved to gradle
345-
- 1.2.0 (06/04/2016)
346-
- (n) Implemented selection of objects
347-
- 1.1.0 (30/03/2016)
348-
- (n) Implemented lighting & toggle textures & lights
349-
- (i) Refactoring of 3DObjectImpl
350-
- 1.0.0 (27/03/2016)
351-
- (n) First release in Google Play Android Market
205+

app/build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ plugins {
33
}
44

55
android {
6-
compileSdk 31
6+
compileSdk 33
77

88
defaultConfig {
99
applicationId "org.andresoviedo.dddmodel2"
1010
minSdk 16
11-
targetSdk 31
11+
targetSdk 33
1212
}
1313

1414
signingConfigs {
@@ -37,6 +37,11 @@ android {
3737
}
3838

3939
dependencies {
40-
implementation 'androidx.core:core:1.7.0'
40+
implementation 'androidx.core:core:1.8.0'
41+
implementation 'androidx.navigation:navigation-fragment:2.5.1'
42+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
43+
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
44+
implementation 'com.google.android.material:material:1.6.1'
45+
implementation 'com.google.code.gson:gson:2.9.1'
4146
implementation project(':engine')
4247
}
-9.73 MB
Binary file not shown.

app/src/main/AndroidManifest.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,29 @@
4949

5050
<!-- android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" -->
5151
</activity>
52+
53+
54+
<!-- Demos -->
5255
<activity
5356
android:name="org.andresoviedo.app.model3D.demo.GlyphsDemoActivity"
5457
android:label="@string/title_activity_model"
5558
android:parentActivityName="org.andresoviedo.app.model3D.MainActivity" >
5659
</activity>
60+
<activity
61+
android:name="org.andresoviedo.app.model3D.demo.EarCutDemoActivity"
62+
android:label="@string/title_activity_model"
63+
android:parentActivityName="org.andresoviedo.app.model3D.MainActivity" >
64+
</activity>
65+
66+
67+
<!-- polybool -->
68+
<activity
69+
android:name="org.the3deers.polybool.demo.WebActivity"
70+
android:label="@string/app_name"
71+
android:theme="@style/Theme.AppCompat.NoActionBar">
72+
73+
</activity>
74+
5775
</application>
5876

5977
</manifest>

0 commit comments

Comments
 (0)