Skip to content
/ ciCSG Public

CSG lib for Cinder 0.9.0 based on ofxCSG by Lars Berg

Notifications You must be signed in to change notification settings

cwhitney/ciCSG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

CSG lib for Cinder 0.9.0 based on ofxCSG by Lars Berg

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages