Giter Site home page Giter Site logo

minimal_mangle's Introduction

MINIMAL MANGLE

Simplified C-only code utilities to minimally use mangle polygons.

The intention is to reproduce some functionality available from the original MANGLE library. MANGLE library, which can be found at: http://space.mit.edu/~molly/mangle/ with some newer and/or development versions at: http://github.com/mollyswanson/mangle

The main focus of these utilities:

  1. clean c-only code without globals.
  2. few to no dependencies.
  3. simple to use and utilize within larger codes.

There is no attempt to provide the complete functionality that MANGLE does, nor have flexible input. Please use the full MANGLE utilities if you need to convert to an accepted polygon format that this code can handle.

USAGE

The easiest way to use these function in your code is simply to include the source directly.

For example:

#include <minimal_mangle.c>

Then make sure to include the directory where the source code lives in the compilation (-I for gcc).

You can simply copy the respective files to your source code directory, and then pass the current directory to the compiler. For example:

% gcc -I. ...

For some examples codes, and some functioning tools, please see the examples/ subdirectory.

If you want to build a library file or language bindings, you might find it useful to disable the inlining keywords. Basically, define the NO_INLINE keyword, for example:

% gcc -DNO_INLINE ..

Besides an intelligent compiler potentially doing inlining for you, this should disable all inlining.

DEPENDENCIES

These make use of the "check_utils", which are available at: https://github.com/cmcbride/check_utils

And use the simple_reader functionality from: https://github.com/cmcbride/simple_lib

Copies of the necessary source files is included for simplicity.

SOME NOTES

Prefix for functions is "mply_", short for mangle polygon.

There is no attempt to separate "internal" and "external" functions by name.

Some useful terminology used internally and within function names:

"ID" : polyid / pixel_id (the values listed in the polygon file)

"INDEX" : the internal storage index (unique identifiers in code)

This code has not yet been optimized in any significant fashion.

AUTHOR

Cameron K. McBride Jan 2013

minimal_mangle's People

Contributors

cmcbride avatar

Stargazers

Jaime Forero-Romero avatar

Watchers

 avatar James Cloos avatar

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.