Skip to content

Migrating Unigine 3D Engine to Java #889

@eix128

Description

@eix128

Hi , i have downloaded Unigine 3D Engine
https://unigine.com/get-unigine

Then i wanted to make Binding to Java
I have made the Java File
I got error on 3 files "UnigineString.h" , "UnigineType.h" , "UnigineVector.h"

//"UnigineString.h"
//UnigineString.h:334:Could not parse declaration at '(' 334

//"UnigineType.h"
//UnigineVector.h:1410:Unexpected token 'EOF'

//"UnigineVector.h"
//UnigineType.h:422:Unexpected token 'EOF'

import org.bytedeco.javacpp.;
import org.bytedeco.javacpp.annotation.
;
import org.bytedeco.javacpp.tools.*;
//"UnigineString.h"
//UnigineString.h:334:Could not parse declaration at '(' 334

//"UnigineType.h"
//UnigineVector.h:1410:Unexpected token 'EOF'

//"UnigineVector.h"
//UnigineType.h:422:Unexpected token 'EOF'

@properties(
value = @platform(
includepath = {"C:\Users\Administrator\Unigine SDK Browser\sdks\community_windows_2.11.0.2\include"},
// preloadpath = {"/path/to/deps/"},
linkpath = {"C:\Users\Administrator\Unigine SDK Browser\sdks\community_windows_2.11.0.2\lib"},
include = {"Unigine.h","UnigineApp.h","UnigineAsyncQueue.h","UnigineBase.h","UnigineBiMap.h","UnigineBounds.h",
"UnigineCallback.h","UnigineCamera.h","UnigineChecksum.h","UnigineCompress.h","UnigineConfig.h",
"UnigineConsole.h","UnigineControls.h","UnigineDecals.h","UnigineDir.h","UnigineEditor.h",
"UnigineEllipsoid.h","UnigineEngine.h","UnigineFactory.h","UnigineFfp.h","UnigineFields.h",
"UnigineFileSystem.h","UnigineFunction.h","UnigineGame.h","UnigineGeodetics.h",
"UnigineGeodeticsTransformer.h","UnigineGeometry.h","UnigineGui.h","UnigineGUID.h","UnigineHash.h",
"UnigineHashMap.h","UnigineHashSet.h","UnigineImage.h"
,"UnigineInput.h","UnigineInterface.h","UnigineInterpreter.h","UnigineJson.h","UnigineLights.h",
"UnigineLog.h","UnigineLogic.h","UnigineMap.h","UnigineMaterial.h","UnigineMaterials.h","UnigineMath2d.h",
"UnigineMathLib.h","UnigineMemory.h","UnigineMesh.h","UnigineMeshDynamic.h","UnigineNode.h","UnigineNodes.h",
"UnigineObjects.h","UniginePackageUng.h","UniginePair.h","UniginePath.h","UniginePathFinding.h",
"UniginePhysicals.h","UniginePhysics.h","UniginePlayers.h","UniginePlugin.h","UniginePrimitives.h",
"UnigineProfiler.h","UnigineProperties.h","UniginePtr.h","UnigineRegExp.h","UnigineRender.h",
"UnigineRenderContext.h","UnigineResource.h","UnigineSet.h","UnigineShader.h","UnigineSort.h","UnigineSounds.h",
"UnigineSplash.h","UnigineSplineGraph.h","UnigineStreams.h","UnigineSystemInfo.h","UnigineTextures.h",
"UnigineThread.h","UnigineTileset.h","UnigineTilesetFile.h","UnigineTimer.h","UnigineTree.h",
"UnigineUlon.h","UnigineUserInterface.h","UnigineUtils.h","UnigineViewport.h","UnigineVisualizer.h",
"UnigineWidgets.h","UnigineWorld.h","UnigineWorlds.h","UnigineXml.h"
},

            preload = {"Unigine_x64d.lib","UnigineWrapper_x64d.lib","EditorCore_x64d.lib"},
            link = {"NativeLibrary"}
    ),
    target = "NativeLibrary"

)
public class NativeLibraryConfig implements InfoMapper {
public void map(InfoMap infoMap) {
//infoMap.put(new Info("data::Blob").pointerTypes("FloatBlob"));
infoMap.put(new Info("UNIGINE_EXPORT").javaNames("processFloatBlob"));
infoMap.put(new Info("quat::RawValuesTag").javaNames("quatRawValuesTag"));
}
}

Here is the command i have tried:
java -jar javacpp-1.5.4-SNAPSHOT.jar NativeLibraryConfig.java -d out

Here is the patched some include files:

https://wetransfer.com/downloads/11afac9e45795c53f51413df62dbf13620200530235405/4485400d897c9ea18d7858a2aca7308720200530235428/e2c70f

I donno what to do ? How to fix "UnigineString.h" , "UnigineType.h" , "UnigineVector.h" files.
1.44 MB 1 big Java file i got out when i disable "UnigineString.h" , "UnigineType.h" , "UnigineVector.h"

But how to fix the issue ?
or i am at wrong way to convert the problem?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions