http://en.wikipedia.org/wiki/Constructive_solid_geometry
I'm much interested in doing what the first pictures describe on this article, only that I'm only interested in doing it on parallelepipeds (cube-like shapes), so no sphere or tube or circular shapes whatsoever.
There is this library, http://www.cgal.org/ , but it has a lot of features, and I don't know if it does what I'm looking for, and if yes, what parts could I use ?
Do you know any other library that does what I want ?
C/C++ is preferred over C#/java, but I'm open... The goal being to not reinvent the wheel.
If you need only rendering (no mesh generation), look at this.
If you need to generate new mesh:
UnBBoolean/J3DBool (Java)
J3DBool ported to C++, modified for QT, modified for Ogre
Carve (C++) (it is used in Blender, but I was unable to make it work + obsolete documentation)
GTS Library (C++) (maybe too overkill)
Personaly, I picked Ogre version, rewrote to use STL containers (it use fixed size for face count) and slightly optimized.
A list of libraries can be found here
Related
I would like to use a text-based UI in my Haskell program. I found some bindings for the ncurses library (see also hscurses or ncurses, which one to use?). The hscurses and nanocurses packages are just simple wrappers around the C library, while vty isn't very well documented and a bit ugly (for example mixing snake_case and CamelCase).
The ncurses library on Hackage looks much more pretty and provides API which nicely fits Haskell. The problem is that it doesn't seem to implement some crucial features, like resizing or refreshing the windows.
So my question is:
is there any other Haskell text UI library, either ncurses-based or not, which I missed?
if there isn't anyone, is it possible to extend the ncurses Haskell library to at least support window refreshing and resizing? (this should be probably consulted with the project owner, but I need the solution quickly)
EDIT:
I finally used nscurses without windows (and panels) to avoid the troubles with refreshing them. I had problems with output to bottom-right corner of a window (a very similar issue was reported for Python's ncurses binding). I solved it by not writing there :).
Have you looked at vty-ui? It has a very nice user manual with lots of examples. I believe it's essentially a wrapper around vty.
I've used nanoncurses and hscurses succesfully, my hmp3 app has a binding that was the basis for nanocurses.
No matter what you probably will want a nice high level API. hscurses does have a box abstraction at least.
You'd be fine going with hscurses.
There is another good choice for Text-based user interfaces in haskell;
Brick is written by jtdaugherty, the same person that developed vty-ui which is Deprecated now.
The API is Declarative, which is Better for Presenting a language like Haskell.
also the Documentation was great and complete.
In Ocaml, is there easier ways to write a graphics-based toy programs like deminer (like the one that comes with Windows 95)? I find the only way is to start by scratch using Ocaml's graphics library. There must be better ways around?
There are bindings to the SDL library, that provides more features than Graphics.
There are actually several of them, and I'm not exactly sure which is best:
SdlCaml is a part of the [GLcaml] project
the OcamlSDL library
I think SdlCaml is more bare metal (probably partly automatically generated), and OCamlSDL is an older (but still occasionally updated) library with a larger user base.
Note however that Graphics is simple to use for a start, and you can still move to something more sophisticated later. If you run into speed-of-rendering issues, you have to use double buffering, as explained in the manual.
I am working on embedded linux, Is there any open source 2D renderer available which can draw on memory, scanline based, complete fixed-point support.
I work in c or cpp programming language.
I know one with which satisfy my all needs that is, Google Skia which google uses in android and chrome, But I found it without documentation, not straight-forward compilable, not straight-forward usable in 3rd party projects.
Regards, Sunny.
Checkout Cairo. I am not sure what you mean by "complete fixed-point support" but other than that it seems to meet your requirements.
Allegro is a games library which includes extensive software rendering, most of which does not rely on floating point. Additionally it has some trig functions and maths functions which work on fixed-point. It has things like sprite-rotation which don't need floating point.
Don't know if it's what you're looking for, but there's libcrtxy
http://libcrtxy.sourceforge.net/
DirectFB.
If you want hardware acceleration , directFB is the most portable way to go.
I am in the process of tackling the Linux Kernel learning curve and trying to get my head round the information stored in nested struct specifically to resolve a ALSA driver issue.
Hence, I am spending a lot of my time in the source code tracing through structures that have pointers to other structures that in turn have pointers to yet other structures...by which time my head has become so full that I start to loose track of the big picture!
Can anybody point me at either a tool or a website (along the lines of the highly usful Linux Cross Reference http://lxr.linux.no/) that will allow me to, ideally graphically, expand down through the nested struct of the source code?
At the moment we are developing for an Embedded PowerPC in Eclipse CDT version 4.0 but wouldn't be opposed to switching tool chains.
Regards
KermitG
This may sound old fashion but I've found that tracing through data structures with a pencil and paper helps you reverse engineer the code better than tools that automagically do this. So, my recommendation is that you draw them yourself so that you don't have to keep it all in your head. Once you've done this your learning curve becomes a lot less steep.
Just a copy/paste of my comment, so that this question has at least 1 answer.
Or alternatively you could use something like Doxygen to generate the diagrams for you. It's worth noting a lot of the DocBook books get their structures directly from annotated code.
I am currently using Kdevelop4 (svn version) to walk through the Linux kernel. The navigation capabilities are great, but it takes a big while to parse it (just give it the directories you need, omitting all drivers you are not interested in for example) and is still a little bit crashy.
Once the stability improves and the parser can cache previously parsed data, I think this will become the most convenient way to walk through the kernel.
I'm looking for a library like Cairo, just far faster. It has to be a library that works with C or Python. It also would be nice if I could output to PNG, and SVG. I am looking at Qt's arthur, but that's C++, and I'm not a fan.
Any suggestions?
Edit: another precondition is that it has to run under Linux.
Python has aggdraw
I don't know what's fast, but here's a rendering comparison.
Edit: Apparently Xara is supposed to be much faster than Cairo.
Google's Chrome browser and Android platform make use of their Skia vector library.
I heard second-hand that Vladimir Vukicevic has quickly ported Cairo to be able to use Skia. A quick googling seems to confirm it:
http://people.mozilla.com/~vladimir/misc/cairo-skia.patch
Not sure when or if this is mainstream, but I'd anticipate a major speed-up across the board!
OpenGL?
It can do 2D pretty well. :)