Skip to content

Instantly share code, notes, and snippets.

View jslee02's full-sized avatar

Jeongseok (JS) Lee jslee02

View GitHub Profile
@jslee02
jslee02 / Event.h
Last active August 29, 2015 14:16
Event
#include <algorithm>
#include <cassert>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#define LISTENER_COUNT_MAX 256
/// class Event
#define BOOST_TEST_MODULE "FCL_SHAPE_MESH_CONSISTENCY"
#include <boost/test/unit_test.hpp>
#include "fcl/narrowphase/narrowphase.h"
#include "fcl/shape/geometric_shape_to_BVH_model.h"
#include "fcl/distance.h"
#include "fcl/collision.h"
#include "test_fcl_utility.h"
using namespace fcl;
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f04f57a..9ec95ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,7 @@ message(STATUS "CMAKE_BINARY_DIR = ${CMAKE_BINARY_DIR}")
option(BUILD_SNOPT "Build with SNOPT optimizer" OFF)
option(BUILD_CORE_ONLY "Build only the core of DART" OFF)
+option(BUILD_UNITTESTS "Build unit tests" ON)
if(NOT MSVC)
#include <iostream>
#include <memory>
#include <typeinfo>
#include <typeindex>
#include <map>
template <typename T> struct type {};
class Addon {};
#include <iostream>
#include <memory>
#include <typeinfo>
#include <typeindex>
#include <map>
#include <unordered_map>
template <typename T> struct type {};
@jslee02
jslee02 / const_ptr_vector.hpp
Last active February 17, 2016 15:47
const_ptr_vector
template <typename T>
class const_ptr_vector
{
public:
class iterator
{
public:
using const_iterator = typename std::vector<T*>::const_iterator;
class Joint : public virtual ComponentManager
{
public:
struct Properties // First category of Properties
{
std::string mName;
Eigen::Isometry3d mTransformFromParent;
Eigen::Isometry3d mTransformFromChild;
ActuatorType mActuatorType;
@jslee02
jslee02 / gist:e2ce3713438369542a33
Created March 26, 2016 18:43
Exmaple code to show the incorrect contact point computation of FCL for mesh collision
Starting /home/js/dev/pr/fcl/bugreporting_boxbox/build/Debug/test/regression_test_fcl_boxmeshboxmesh...
Running 1 test case...
/home/js/dev/pr/fcl/bugreporting_boxbox/test/regression_test_fcl_boxmeshboxmesh.cpp(149): error in "collision_boxmeshboxmesh_contactpoint": check result failed
aabb contact point: (-0.5 0.5 0.5)
/home/js/dev/pr/fcl/bugreporting_boxbox/test/regression_test_fcl_boxmeshboxmesh.cpp(149): error in "collision_boxmeshboxmesh_contactpoint": check result failed
aabb contact point: (0.5 0.5 -0.5)
/home/js/dev/pr/fcl/bugreporting_boxbox/test/regression_test_fcl_boxmeshboxmesh.cpp(149): error in "collision_boxmeshboxmesh_contactpoint": check result failed
aabb contact point: (-0.5 0.5 0.5)
/home/js/dev/pr/fcl/bugreporting_boxbox/test/regression_test_fcl_boxmeshboxmesh.cpp(149): error in "collision_boxmeshboxmesh_contactpoint": check result failed
aabb contact point: (0.5 0.5 -0.5)
// ImGui - standalone example application for Glfw + OpenGL 3, using programmable pipeline
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
#include <imgui.h>
#include "imgui_impl_glfw_gl3.h"
#include <stdio.h>
#include <GL/gl3w.h>
#include <GLFW/glfw3.h>
static void error_callback(int error, const char* description)
#include <memory>
#include <iostream>
class Object
{
public:
std::string mData;