Skip to content
Draft

Vulkan #2545

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
d2315be
added AlertArmatureMask
codex128 Jul 24, 2023
2f1dae8
fixed docs and added another helper
codex128 Jul 24, 2023
a750f1c
made it easier to turn off priority checking
codex128 Jul 24, 2023
cd876d4
removed copy methods
codex128 Jul 25, 2023
9c9c2d8
updated license
codex128 Jan 19, 2024
83c95e5
updated javadoc
codex128 Jan 20, 2024
90e6cd8
renamed mask
codex128 Jan 21, 2024
0f410c0
Merge branch 'jMonkeyEngine:master' into master
codex128 Feb 29, 2024
9cf7dc4
Merge branch 'jMonkeyEngine:master' into master
codex128 Jun 7, 2024
7efa4c6
Merge remote-tracking branch 'origin/master'
codex128 Apr 26, 2025
0e25de2
Merge remote-tracking branch 'origin/master'
codex128 Jun 22, 2025
0c2d187
create vulkan context and prototyped vulkan instance creation in a te…
codex128 Jun 24, 2025
061a782
vulkan logical device
codex128 Jun 24, 2025
1b9f2e3
vulkan logical device
codex128 Jun 24, 2025
863e6a9
create interface over vulkan API
codex128 Jul 3, 2025
1b2ee3d
debug initial vulkan engine interface
codex128 Jul 27, 2025
e82ab06
debug initial vulkan engine interface
codex128 Jul 27, 2025
5aa391e
add shader attributes and gpu buffers
codex128 Jul 28, 2025
adb4e01
add uniforms; fix native crash and memory leaks
codex128 Aug 1, 2025
8e7ff36
added depth testing; added enums for image properties
codex128 Aug 1, 2025
beba5fe
added depth testing; added enums for image properties
codex128 Aug 1, 2025
4e31f0d
migrated instance, device, surface, and swapchain to new builder arc…
codex128 Aug 3, 2025
5f7d1ec
migrated instance, device, surface, and swapchain to new builder arc…
codex128 Aug 3, 2025
c4738ee
successfully abstracted all vulkan components
codex128 Aug 6, 2025
e0efc40
successfully abstracted all vulkan components
codex128 Aug 6, 2025
0c035ab
organized files
codex128 Aug 9, 2025
6a3171c
added MemorySize for clarity in allocating buffer sizes
codex128 Aug 9, 2025
bcb7014
managed to create acceptable prototype material system (still much to…
codex128 Aug 13, 2025
b168553
managed to create acceptable prototype material system (still much to…
codex128 Aug 13, 2025
6c0dbaf
altered material system slightly
codex128 Aug 13, 2025
f7d3679
basic material system is working
codex128 Aug 13, 2025
62882d4
basic material system is working
codex128 Aug 13, 2025
4a1970f
add device interfaces for different queue types
codex128 Aug 14, 2025
521c8a7
move pool management to logical device
codex128 Aug 14, 2025
a00411b
add stage mask to semaphores
codex128 Aug 15, 2025
d0340ab
figure out uniform details
codex128 Aug 16, 2025
ab0de0e
add Flag interface to handle bit flags
codex128 Aug 19, 2025
6657009
fix build error
codex128 Aug 19, 2025
72b0156
fix json error
codex128 Aug 19, 2025
ed6096e
extract GpuBuffer into an interface; create VersionedBuffer in prepar…
codex128 Aug 19, 2025
5587e17
fix build errors related to GpuBuffer interface extraction
codex128 Aug 19, 2025
6f97ff5
alter material system to support versions of resources per frame-in-f…
codex128 Aug 24, 2025
d4646f6
fix build and runtime errors (new material system is operational)
codex128 Aug 24, 2025
42a845a
fix warning on DescriptorSet destruction for DescriptorPools not crea…
codex128 Aug 24, 2025
ba4ea7f
use Flag for CommandPool creation instead of booleans
codex128 Aug 24, 2025
56a0a42
prototype meshes; improve usability; abstract images and buffers in p…
codex128 Aug 30, 2025
e29d2a9
fix image loader key type
codex128 Aug 30, 2025
85b3d95
mess around with meshes more
codex128 Sep 1, 2025
669ce8f
have uniforms use Resources/DataPipelines instead of VersionedResources
codex128 Sep 1, 2025
0fc9137
have uniforms use Resources/DataPipelines instead of VersionedResources
codex128 Sep 1, 2025
ab434fd
have uniforms use Resources/DataPipelines instead of VersionedResources
codex128 Sep 2, 2025
97750fd
simplified handling of DataPipe results by uniforms
codex128 Sep 2, 2025
bb7ab46
completed AdaptiveMesh; added CommandBatch system to properly update …
codex128 Sep 9, 2025
3099a26
fix vertex shader producing an unused varying
codex128 Sep 9, 2025
4756c04
rename updateStaticBuffers to updateSharedBuffers
codex128 Sep 9, 2025
519301e
add enum to represent common attribute names
codex128 Sep 9, 2025
20a2120
improve pipeline and sampler usability
codex128 Sep 9, 2025
2f3f8c5
improve pipeline and sampler usability
codex128 Sep 9, 2025
42d7525
preparing to alter Spatial
codex128 Sep 11, 2025
cb5c47a
move vulkan to core
codex128 Sep 12, 2025
29c1818
temporarily renamed Mesh to GLMesh to not conflict with the new Mesh …
codex128 Sep 12, 2025
1718bbf
Revert "temporarily renamed Mesh to GLMesh to not conflict with the n…
codex128 Sep 12, 2025
7fee9d2
temporarily renamed Mesh to GLMesh to not conflict with the new Mesh …
codex128 Sep 12, 2025
301b6bc
Revert "temporarily renamed Mesh to GLMesh to not conflict with the n…
codex128 Sep 12, 2025
e28d4df
Revert "Revert "temporarily renamed Mesh to GLMesh to not conflict wi…
codex128 Sep 12, 2025
d463d9c
Revert "temporarily renamed Mesh to GLMesh to not conflict with the n…
codex128 Sep 12, 2025
e3ee8be
Revert "Revert "temporarily renamed Mesh to GLMesh to not conflict wi…
codex128 Sep 12, 2025
65c076e
renamed new Mesh interface to NewMesh to not conflict with existing M…
codex128 Sep 12, 2025
115a985
renamed GLMesh back to Mesh
codex128 Sep 12, 2025
268988b
add BackedStaticBuffer
codex128 Sep 12, 2025
f23c5c8
make BIHTree compatible with NewMesh
codex128 Sep 12, 2025
c388da8
made BoundingVolume accept VertexReaders for computeFromPoints
codex128 Sep 13, 2025
e871c05
Geometry accepts NewMesh without errors
codex128 Sep 13, 2025
bc4ce97
Geometry accepts NewMesh without errors
codex128 Sep 13, 2025
d2e37e5
renamed vulkan material to NewMaterial
codex128 Sep 13, 2025
ef41a34
delete VertexModifier interface
codex128 Sep 13, 2025
1c45ac6
made Spatial iterable
codex128 Sep 13, 2025
49cc7f2
made Spatial iterable
codex128 Sep 13, 2025
1e2926d
setup vulkan test for rendering from the scene graph
codex128 Sep 13, 2025
a7c2f09
moved Mesh code to OldMesh; replaced NewMesh with Mesh, which has bee…
codex128 Sep 13, 2025
bd21a20
moved previous Mesh extensions to extend OldMesh
codex128 Sep 13, 2025
050e1df
moved Material to OldMaterial
codex128 Sep 13, 2025
93067db
renamed Texture to GlTexture and Image to GlImage, both implementing …
codex128 Sep 14, 2025
fe84d1e
added methods to Material interface for compatibility with old GlMate…
codex128 Sep 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions VulkanDesign.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Spatial: Current problems:

* The transform refresh only works when transform setter methods are used. I propose that the world transform should be recalculated on every frame. It will make the system a lot simpler, I think.
* An explicit world light list is unnecessary. All that needs to be done to capture all lights affecting a spatial is to iterate up the hierarchy and collect lights from the local light lists. Iterating up the hierarchy is extremely cheap and I want to take more advantage of it.
* There should be at most one method in Spatial for iterating over an entire tree. It should use depth-first traversal. Breadth-first traversal isn't used within the engine and is obviously more expensive. collideWith() is also counted as a traversal method. If possible, I'd like to take more advantage of SceneGraphIterator, since I think it is the most powerful traversal available.


2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ lwjgl3-opencl = { module = "org.lwjgl:lwjgl-opencl", version.ref = "lwjgl3"
lwjgl3-opengl = { module = "org.lwjgl:lwjgl-opengl", version.ref = "lwjgl3" }
lwjgl3-openvr = { module = "org.lwjgl:lwjgl-openvr", version.ref = "lwjgl3" }
lwjgl3-ovr = { module = "org.lwjgl:lwjgl-ovr", version.ref = "lwjgl3" }
lwjgl3-vulkan = { module = "org.lwjgl:lwjgl-vulkan", version.ref = "lwjgl3" }
lwjgl3-shaderc = { module = "org.lwjgl:lwjgl-shaderc", version.ref = "lwjgl3" }

mokito-core = "org.mockito:mockito-core:3.12.4"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import com.jme3.system.JmeSystem;
import com.jme3.system.Timer;
import com.jme3.texture.FrameBuffer;
import com.jme3.texture.Image;
import com.jme3.texture.GlImage;
import com.jme3.util.AndroidScreenshots;
import com.jme3.util.BufferUtils;
import java.io.File;
Expand Down Expand Up @@ -241,7 +241,7 @@ public void addImage(Renderer renderer, FrameBuffer out) {
final WorkItem item = freeItems.take();
usedItems.add(item);
item.buffer.clear();
renderer.readFrameBufferWithFormat(out, item.buffer, Image.Format.BGRA8);
renderer.readFrameBufferWithFormat(out, item.buffer, GlImage.Format.BGRA8);
executor.submit(new Callable<Void>() {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import com.jme3.asset.AssetInfo;
import com.jme3.asset.AssetLoader;
import com.jme3.asset.TextureKey;
import com.jme3.texture.Image;
import com.jme3.texture.GlImage;
import com.jme3.texture.image.ColorSpace;
import com.jme3.util.BufferUtils;
import java.io.IOException;
Expand Down Expand Up @@ -72,7 +72,7 @@ private static void convertARGBtoABGR(int[] src, int srcOff, int[] dst, int dstO
@Override
public Object load(AssetInfo assetInfo) throws IOException {
Bitmap bitmap;
Image.Format format;
GlImage.Format format;
int bpp;

BitmapFactory.Options options = new BitmapFactory.Options();
Expand Down Expand Up @@ -102,15 +102,15 @@ public Object load(AssetInfo assetInfo) throws IOException {

switch (bitmap.getConfig()) {
case ALPHA_8:
format = Image.Format.Alpha8;
format = GlImage.Format.Alpha8;
bpp = 1;
break;
case ARGB_8888:
format = Image.Format.RGBA8;
format = GlImage.Format.RGBA8;
bpp = 4;
break;
case RGB_565:
format = Image.Format.RGB565;
format = GlImage.Format.RGB565;
bpp = 2;
break;
default:
Expand All @@ -124,7 +124,7 @@ public Object load(AssetInfo assetInfo) throws IOException {

ByteBuffer data = BufferUtils.createByteBuffer(bitmap.getWidth() * bitmap.getHeight() * bpp);

if (format == Image.Format.RGBA8) {
if (format == GlImage.Format.RGBA8) {
int[] pixelData = new int[width * height];
bitmap.getPixels(pixelData, 0, width, 0, 0, width, height);

Expand Down Expand Up @@ -163,7 +163,7 @@ public Object load(AssetInfo assetInfo) throws IOException {

bitmap.recycle();

Image image = new Image(format, width, height, data, ColorSpace.sRGB);
GlImage image = new GlImage(format, width, height, data, ColorSpace.sRGB);

return image;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import com.jme3.asset.AssetInfo;
import com.jme3.asset.AssetLoader;
import com.jme3.asset.TextureKey;
import com.jme3.texture.Image;
import com.jme3.texture.GlImage;
import java.io.IOException;
import java.io.InputStream;

Expand All @@ -52,10 +52,10 @@ public class AndroidNativeImageLoader implements AssetLoader {
System.loadLibrary("decodejme");
}

private static native Image load(InputStream in, boolean flipY, byte[] tmpArray) throws IOException;
private static native GlImage load(InputStream in, boolean flipY, byte[] tmpArray) throws IOException;

@Override
public Image load(AssetInfo info) throws IOException {
public GlImage load(AssetInfo info) throws IOException {
boolean flip = ((TextureKey) info.getKey()).isFlipY();
try (final InputStream in = info.openStream()) {
return load(in, flip, tmpArray);
Expand Down
50 changes: 50 additions & 0 deletions jme3-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,56 @@ dependencies {
testRuntimeOnly project(':jme3-testdata')
testImplementation project(':jme3-desktop')
testRuntimeOnly project(':jme3-plugins')

// Use LWJGL3 directly in core. This destroys LWJGL2 and JOGL compatibility.
api (libs.lwjgl3.awt) {
exclude group: 'org.lwjgl', module: 'lwjgl'
}
api libs.lwjgl3.base
api libs.lwjgl3.glfw
api libs.lwjgl3.jawt
api libs.lwjgl3.jemalloc
api libs.lwjgl3.openal
api libs.lwjgl3.opencl
api libs.lwjgl3.opengl
api libs.lwjgl3.vulkan
runtimeOnly(variantOf(libs.lwjgl3.base){ classifier('natives-windows') })
runtimeOnly(variantOf(libs.lwjgl3.base){ classifier('natives-windows-x86') })
runtimeOnly(variantOf(libs.lwjgl3.base){ classifier('natives-linux') })
runtimeOnly(variantOf(libs.lwjgl3.base){ classifier('natives-linux-arm32') })
runtimeOnly(variantOf(libs.lwjgl3.base){ classifier('natives-linux-arm64') })
runtimeOnly(variantOf(libs.lwjgl3.base){ classifier('natives-macos') })
runtimeOnly(variantOf(libs.lwjgl3.base){ classifier('natives-macos-arm64') })
runtimeOnly(variantOf(libs.lwjgl3.glfw){ classifier('natives-windows') })
runtimeOnly(variantOf(libs.lwjgl3.glfw){ classifier('natives-windows-x86') })
runtimeOnly(variantOf(libs.lwjgl3.glfw){ classifier('natives-linux') })
runtimeOnly(variantOf(libs.lwjgl3.glfw){ classifier('natives-linux-arm32') })
runtimeOnly(variantOf(libs.lwjgl3.glfw){ classifier('natives-linux-arm64') })
runtimeOnly(variantOf(libs.lwjgl3.glfw){ classifier('natives-macos') })
runtimeOnly(variantOf(libs.lwjgl3.glfw){ classifier('natives-macos-arm64') })
runtimeOnly(variantOf(libs.lwjgl3.jemalloc){ classifier('natives-windows') })
runtimeOnly(variantOf(libs.lwjgl3.jemalloc){ classifier('natives-windows-x86') })
runtimeOnly(variantOf(libs.lwjgl3.jemalloc){ classifier('natives-linux') })
runtimeOnly(variantOf(libs.lwjgl3.jemalloc){ classifier('natives-linux-arm32') })
runtimeOnly(variantOf(libs.lwjgl3.jemalloc){ classifier('natives-linux-arm64') })
runtimeOnly(variantOf(libs.lwjgl3.jemalloc){ classifier('natives-macos') })
runtimeOnly(variantOf(libs.lwjgl3.jemalloc){ classifier('natives-macos-arm64') })
runtimeOnly(variantOf(libs.lwjgl3.opengl){ classifier('natives-windows') })
runtimeOnly(variantOf(libs.lwjgl3.opengl){ classifier('natives-windows-x86') })
runtimeOnly(variantOf(libs.lwjgl3.opengl){ classifier('natives-linux') })
runtimeOnly(variantOf(libs.lwjgl3.opengl){ classifier('natives-linux-arm32') })
runtimeOnly(variantOf(libs.lwjgl3.opengl){ classifier('natives-linux-arm64') })
runtimeOnly(variantOf(libs.lwjgl3.opengl){ classifier('natives-macos') })
runtimeOnly(variantOf(libs.lwjgl3.opengl){ classifier('natives-macos-arm64') })
runtimeOnly(variantOf(libs.lwjgl3.openal){ classifier('natives-windows') })
runtimeOnly(variantOf(libs.lwjgl3.openal){ classifier('natives-windows-x86') })
runtimeOnly(variantOf(libs.lwjgl3.openal){ classifier('natives-linux') })
runtimeOnly(variantOf(libs.lwjgl3.openal){ classifier('natives-linux-arm32') })
runtimeOnly(variantOf(libs.lwjgl3.openal){ classifier('natives-linux-arm64') })
runtimeOnly(variantOf(libs.lwjgl3.openal){ classifier('natives-macos') })
runtimeOnly(variantOf(libs.lwjgl3.openal){ classifier('natives-macos-arm64') })
runtimeOnly(variantOf(libs.lwjgl3.shaderc) { classifier('natives-linux') })

}

task updateVersionPropertiesFile {
Expand Down
6 changes: 3 additions & 3 deletions jme3-core/src/main/java/com/jme3/asset/AssetManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import com.jme3.scene.Spatial;
import com.jme3.scene.plugins.OBJLoader;
import com.jme3.shader.ShaderGenerator;
import com.jme3.texture.Texture;
import com.jme3.texture.GlTexture;
import com.jme3.texture.plugins.TGALoader;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -270,7 +270,7 @@ public default List<ClassLoader> getClassLoaders() {
*
* @see AssetManager#loadAsset(com.jme3.asset.AssetKey)
*/
public Texture loadTexture(TextureKey key);
public GlTexture loadTexture(TextureKey key);

/**
* Loads texture file, supported types are BMP, JPG, PNG, GIF,
Expand All @@ -283,7 +283,7 @@ public default List<ClassLoader> getClassLoaders() {
*
* @see AssetManager#loadAsset(com.jme3.asset.AssetKey)
*/
public Texture loadTexture(String name);
public GlTexture loadTexture(String name);

/**
* Load audio file, supported types are WAV or OGG.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import com.jme3.shader.Glsl300ShaderGenerator;
import com.jme3.shader.ShaderGenerator;
import com.jme3.system.JmeSystem;
import com.jme3.texture.Texture;
import com.jme3.texture.GlTexture;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
Expand Down Expand Up @@ -405,7 +405,7 @@ public Object loadAsset(String name) {
}

@Override
public Texture loadTexture(TextureKey key) {
public GlTexture loadTexture(TextureKey key) {
return loadAsset(key);
}

Expand All @@ -415,7 +415,7 @@ public Material loadMaterial(String name) {
}

@Override
public Texture loadTexture(String name) {
public GlTexture loadTexture(String name) {
TextureKey key = new TextureKey(name, true);
key.setGenerateMips(true);
return loadTexture(key);
Expand Down
16 changes: 8 additions & 8 deletions jme3-core/src/main/java/com/jme3/asset/TextureKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,35 @@
*/
package com.jme3.asset;

import com.jme3.texture.Texture.Type;
import com.jme3.texture.GlTexture.Type;
import com.jme3.asset.cache.AssetCache;
import com.jme3.asset.cache.WeakRefCloneAssetCache;
import com.jme3.export.InputCapsule;
import com.jme3.export.JmeExporter;
import com.jme3.export.JmeImporter;
import com.jme3.export.OutputCapsule;
import com.jme3.texture.Image;
import com.jme3.texture.Texture;
import com.jme3.texture.GlImage;
import com.jme3.texture.GlTexture;
import com.jme3.texture.TextureProcessor;
import java.io.IOException;

/**
* Used to load textures from image files such as JPG or PNG.
* Note that texture loaders actually load the asset as an {@link Image}
* object, which is then converted to a {@link Texture} in the
* Note that texture loaders actually load the asset as an {@link GlImage}
* object, which is then converted to a {@link GlTexture} in the
* {@link TextureProcessor#postProcess(com.jme3.asset.AssetKey, java.lang.Object)}
* method. Since textures are cloneable smart assets, the texture stored
* in the cache will be collected when all clones of the texture become
* unreachable.
*
* @author Kirill Vainer
*/
public class TextureKey extends AssetKey<Texture> {
public class TextureKey extends AssetKey<GlTexture> {

private boolean generateMips;
private boolean flipY;
private int anisotropy;
private Texture.Type textureTypeHint = Texture.Type.TwoDimensional;
private GlTexture.Type textureTypeHint = GlTexture.Type.TwoDimensional;

public TextureKey(String name, boolean flipY) {
super(name);
Expand Down Expand Up @@ -213,7 +213,7 @@ public void read(JmeImporter im) throws IOException {
// Backwards compat
textureTypeHint = Type.CubeMap;
} else {
textureTypeHint = ic.readEnum("tex_type", Texture.Type.class, Type.TwoDimensional);
textureTypeHint = ic.readEnum("tex_type", GlTexture.Type.class, Type.TwoDimensional);
}
}
}
58 changes: 22 additions & 36 deletions jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
import com.jme3.scene.Mesh;
import com.jme3.scene.Spatial;
import com.jme3.util.TempVars;
import com.jme3.vulkan.mesh.VertexReader;
import com.jme3.vulkan.util.FloatBufferModifier;

import java.io.IOException;
import java.nio.FloatBuffer;
//import com.jme.scene.TriMesh;
Expand Down Expand Up @@ -129,6 +132,11 @@ public Type getType() {
*/
@Override
public void computeFromPoints(FloatBuffer points) {
containAABB(new FloatBufferModifier(points, 3));
}

@Override
public void computeFromPoints(VertexReader points) {
containAABB(points);
}

Expand Down Expand Up @@ -236,59 +244,37 @@ public static void checkMinMax(Vector3f min, Vector3f max, Vector3f point) {
* @param points
* the list of points.
*/
public void containAABB(FloatBuffer points) {
public void containAABB(VertexReader points) {
if (points == null) {
return;
}

points.rewind();
if (points.remaining() <= 2) // we need at least a 3 float vector
//points.rewind();
if (points.limit() == 0) // we need at least a 3 float vector
{
return;
}

TempVars vars = TempVars.get();

float[] tmpArray = vars.skinPositions;

float minX = Float.POSITIVE_INFINITY,
minY = Float.POSITIVE_INFINITY,
minZ = Float.POSITIVE_INFINITY;
float maxX = Float.NEGATIVE_INFINITY,
maxY = Float.NEGATIVE_INFINITY,
maxZ = Float.NEGATIVE_INFINITY;

int iterations = (int) FastMath.ceil(points.limit() / ((float) tmpArray.length));
for (int i = iterations - 1; i >= 0; i--) {
int bufLength = Math.min(tmpArray.length, points.remaining());
points.get(tmpArray, 0, bufLength);

for (int j = 0; j < bufLength; j += 3) {
vars.vect1.x = tmpArray[j];
vars.vect1.y = tmpArray[j + 1];
vars.vect1.z = tmpArray[j + 2];

if (vars.vect1.x < minX) {
minX = vars.vect1.x;
}
if (vars.vect1.x > maxX) {
maxX = vars.vect1.x;
}

if (vars.vect1.y < minY) {
minY = vars.vect1.y;
}
if (vars.vect1.y > maxY) {
maxY = vars.vect1.y;
}

if (vars.vect1.z < minZ) {
minZ = vars.vect1.z;
}
if (vars.vect1.z > maxZ) {
maxZ = vars.vect1.z;
}
}
for (int i = 0, l = points.limit(); i < l; i++) {
// vars.vect1.x = tmpArray[j];
// vars.vect1.y = tmpArray[j + 1];
// vars.vect1.z = tmpArray[j + 2];
points.getVector3(i, 0, vars.vect1);
minX = Math.min(minX, vars.vect1.x);
minY = Math.min(minY, vars.vect1.y);
minZ = Math.min(minZ, vars.vect1.z);
maxX = Math.max(maxX, vars.vect1.x);
maxY = Math.max(maxY, vars.vect1.y);
maxZ = Math.max(maxZ, vars.vect1.z);
}

vars.release();
Expand Down
Loading
Loading