Skip to content
CSG lib for Cinder 0.9.0 based on ofxCSG by Lars Berg
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
samples/BasicSample
src
.gitignore
README.md
cinderblock.png
cinderblock.xml
sample.png

README.md

ciCSG

A simple library for CSG (Constructive Solid Geometry) based on ofxCSG by Lars Berg for Cinder 0.9.0. This is a work in progress and should be tested thoroughly before use in production. Contributions welcome.

###Usage Includes methods for Union, Intersection, and Difference.

It will take any ci::TriMeshRef as piece of geometry, and will work with loaded models as well as cinder geom objects. Usage is straightforward. After including the header:

#include "ciCSG.h"

...

TriMeshRef mesh0 = TriMesh::create(geom::Cube());
TriMeshRef mesh1 = TriMesh::create(geom::Sphere());
TriMeshRef resultMesh = TriMesh::create();

ciCSG::meshUnion(m0, m1, resultMesh);
ciCSG::meshDifference(m0, m1, resultMesh);
ciCSG::meshIntersection(m0, m1, resultMesh);

For more in depth information check out ofxCSG.

ciCSG Screenshot

You can’t perform that action at this time.