Skip to content

Instantly share code, notes, and snippets.

@bo0ts
bo0ts / gist:eb5c58e138f3e120aeb5
Last active September 23, 2015 09:41 — forked from visorz/gist:a6e1f6a2e3ded3519109
A minimal demonstration of what an point iterator in Surfacemesh should be able to do.
#include <CGAL/Simple_cartesian.h>
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::FT Scalar;
typedef Kernel::Point_3 Point;
typedef Kernel::Vector_3 Vector;
#include <CGAL/Surface_mesh.h>
typedef CGAL::Surface_mesh<Point> Surfacemesh;
#include <CGAL/centroid.h>
@bo0ts
bo0ts / Includes
Last active August 29, 2015 14:18
Explicit boost includes of CGAL
#include <boost/any.hpp>
#include <boost/array.hpp>
#include <boost/assert.hpp>
#include <boost/assign.hpp>
#include <boost/bimap.hpp>
#include <boost/bimap/bimap.hpp>
#include <boost/bimap/multiset_of.hpp>
#include <boost/bind.hpp>
#include <boost/call_traits.hpp>
#include <boost/concept/assert.hpp>
@bo0ts
bo0ts / gist:f916b9f0cae1bbb53a41
Created March 31, 2015 14:33
A check for constructors in default CGAL Kernel
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Simple_homogeneous.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC;
#.rst:
# FindLEDA
# ----------
#
# FindModule for LEDA.
#
# IMPORTED Targets
# ^^^^^^^^^^^^^^^^
#
# This module defines the :prop_tgt:`IMPORTED` target ``LEDA::LEDA``,
#include <type_traits>
template <typename T>
struct Foo {
static_assert(std::is_same<T, int>::value, "Foobar");
};
template<typename> void use_type() {}
#define CGAL_USE_TYPE(T) use_type<T>()
@bo0ts
bo0ts / ref_function.cpp
Created January 11, 2013 10:26
Dynamic functors with references
#include <boost/function.hpp>
#include <boost/ref.hpp>
#include <iostream>
class X {
public:
void foobar() {
// do stuff
// if func_ is set, call it
if(func_) { func_(23); }
@bo0ts
bo0ts / tds.cpp
Last active December 10, 2015 17:38
#ifndef _TDS_H_
#define _TDS_H_
#include <CGAL/config.h>
#include <CGAL/Compact_container.h>
// dimension
#include <boost/mpl/int.hpp>
// for property bundle implementation
project(foobar)
install(DIRECTORY projectA/include DESTINATION include)
install(DIRECTORY projectB/include DESTINATION include)
set(CPACK_SOURCE_GENERATOR "TBZ2")
set(CPACK_SOURCE_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES};.git/;.gitignore;.gitattributes;/build*/")
include(CPack)
#include <boost/graph/graph_traits.hpp>
#include <boost/parameter.hpp>
namespace graphs
{
BOOST_PARAMETER_NAME(graph) // Note: no semicolon
BOOST_PARAMETER_NAME(visitor)
BOOST_PARAMETER_NAME(root_vertex)
template <typename T>
struct is_poolable;
template <typename Poolable>
struct Pooling_traits {
typedef hidden size_type;
/// \name Query Functions
/// @{