Code Monkey home page Code Monkey logo

libzinc's Introduction

libzinc

Zinc is a C++ library for spatial processing.

  • Zinc provides efficient functions for processing Morton codes, and things built from Morton codes.
    • Currently only Morton curves because they are the easiest to implement and the only space filling curve on which some functions can be implemented, see get_next_z_address
  • Intervals are a start and end point on the Morton curve.
  • Regions are a finite list of intervals, able to represent arbitrary regions in N-dimensional space.
    • Morton regions a.k.a. linear octree
  • Intervals and Regions can store data, so they can be used as map types, not just set types.
  • AABBs (Axis-Aligned Bounding Boxes) can be used for creating regions
  • Regions have all the boolean set operations implemented on them apart from Xor: union, intersection, subtraction
  • They can be efficiently indexed by position
  • This is alpha software, but it may be useful

Read our blog for more detail

TODO

  • The Morton code type is currently limited to a single word size, so the Dimension and BitsPerDimension are currently limited to 2,32 and 3,21.

Usage

For usage examples, see test/zinc-test.cc

Dependencies

  • A C++17 compiler

For testing and installing:

  • Meson sudo apt install meson
  • we use clang++ >= 7 by default for better sanitisation
    • for -fsanitize=implicit-conversion and -fsanitize=integer
    • you can disable them in meson.build

Configuring

CXX=clang++ meson out

Testing

ninja test -C out

Installing

ninja install -C out (needs permissions for /usr/local/include)

Name

Zn comes from Z-order curve in N dimensions, and all the cool kids name their libraries after elements.

See also

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.