Giter VIP home page Giter VIP logo

i3s-lib's Introduction

i3slib - Indexed 3D SceneLayers library

A C++ library for producing Scene Layer Package (SLPK) files. Currently it does not provide reading / validating capabilities, this is planned for the future. For a test program please see here.

Features

-Create SLPK from elevation image(PNG) and color image(PNG)

Installing dependencies

There is a number of third-party libraries needed for i3slib to build and run:

  • zlib
  • libjpeg There's no public git repository for the project. Today it seems like instead of the original libjpeg everyone is using libjpeg-turbo - SIMD-enabled fork of libjpeg, API & ABI compatible. This is the version our 3rdparty project (see below) installs.
  • libpng The project home page has no references to a public git repo, but this one seems to be the "official" one.
  • draco
  • etc2comp
  • lepcc
  • jsoncpp

Due to some historical reasons jsoncpp sources are included directly in the source tree, so you don't need to perform a separate install. (This may change in the future).

The rest of the dependencies need to be present in 3rdparty directory. You can download, build and install them manually, but it is recommended to do this by performing a CMake build on projects/3rdparty (see instructions below).

NB: the only library from the above list that has an external dependency is libpng, and its only dependency is zlib.

On Windows with Visual Studio + CMake

Start Visual Studio, choose "Open folder" command, point to projects/3rdparty. A CMake project will open. Select a configuration to build. Run "Project -> Generate Cache", then "Build -> Build All".

You can build everything with Clang instead of the MSVC compiler, select "x64-Clang-" configurations for that. NB: you'll need to have the C++ Clang tools for Windows component installed.

On Linux with CMake

$ mkdir -p build/3rdparty
$ cd build/3rdparty
$ cmake ../../projects/3rdparty
$ cmake --build .

The CMake script downloads the source code for all third-party dependencies, builds them and installs into the 3rdparty directory. After the build process completes3rdparty should contain subdirectories draco, etc2comp, lepcc, libjpeg, libpng, zlib.

NB: the current version of the 3rdparty build script relies on ExternalProject_Add() feature, which has some peculiarities. An alternative to consider is using git submodules to checkout the third-party repositories explicitly, in a more controllable manner.

NB: In a typical Linux distribution some of the libraries listed above (zlib, libjpeg, libpng) and their development headers can be easily installed from packages available in the distribution. On most systems zlib, libjpeg and libpng are installed system-wide with the base system setup. Future implementation build options would allow use of existing instances of basic libraries, which would avoid downloading and building them.

Building the i3s library

On Windows with Visual Studio

Open the sdk/build/i3s.sln solution. It contains three projects:

  • i3s_static - builds i3s library as a static library
  • i3s - builds i3s library as a DLL
  • demo - a sample application demonstrating a basic workflow of SLPK generation using the library

Select configuration and build the solution.

On Windows with Visual Studio + CMake

Start Visual Stusio, choose "Open folder" command, point to the root of the i3slib source tree. A CMake project will open. Select a configuration to build. Run "Project -> Generate Cache", then "Build -> Build All". The build will produce i3s DLL and the demo application executable.

You can build everything with Clang instead of the MSVC compiler, select "x64-Clang-" configurations for that. NB: you'll need to have the C++ Clang tools for Windows component installed.

On Linux with CMake

$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .

By default, the Release configuration is built. You can specify the build configuration (Debug or Release) with CMAKE_BUILD_TYPE option:

$ cmake . -DCMAKE_BUILD_TYPE="Debug"
$ cmake --build .

The library should build correctly with GCC 8+ or Clang 6+. The code uses C++17 features, so you need an appropriate release of libstdc++ (the one coming with GCC 8 is good). To build with particular compiler, do something like this before the build:

export CXX=/usr/bin/clang++-9

or use -DCMAKE_CXX_COMPILER option at configuration step:

$ cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/g++-8
$ cmake --build .

Known issues / limitations

  • Have never built for / tested on 32-bit platforms yet. Please report if you have any issues. We are going to add 32-bit build configuration.

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Licensing

Please find licensing information here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.