Commit 34e312c8 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts

scontactplot : split fltk and opengl classes

parent e4cf9193
......@@ -26,24 +26,5 @@ set_target_properties(${SWIG_MODULE_scontact3_REAL_NAME} PROPERTIES COMPILE_FLAG
install(TARGETS ${SWIG_MODULE_scontact3_REAL_NAME} DESTINATION ${PYTHON_INSTDIR})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/scontact3.py DESTINATION ${PYTHON_INSTDIR})
add_executable(scontactplot scontactplot.cc)
find_package(OpenGL REQUIRED)
find_package(FLTK REQUIRED)
find_package(argp REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
include_directories(${FLTK_INCLUDE_DIR})
include_directories(${ARGP_INCLUDE_DIRS})
set(plotlibs ${OPENGL_LIBRARIES} ${FLTK_LIBRARIES})
if (ARGP_LIBRARIES)
set(plotlibs ${plotlibs} ${ARGP_LIBRARIES})
endif (ARGP_LIBRARIES)
target_link_libraries(scontactplot ${plotlibs})
add_subdirectory(scontactplot)
#find_package(OpenMP)
#if (OPENMP_FOUND)
# set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
#endif()
install(TARGETS scontactplot DESTINATION bin)
This diff is collapsed.
add_executable(scontactplot fltk.cc ObjectCollection.cc)
find_package(OpenGL REQUIRED)
find_package(FLTK REQUIRED)
find_package(argp REQUIRED)
find_package(PNG REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
include_directories(${FLTK_INCLUDE_DIR})
include_directories(${PNG_INCLUDE_DIR})
include_directories(${ARGP_INCLUDE_DIRS})
set(plotlibs ${OPENGL_LIBRARIES} ${FLTK_LIBRARIES})
if (ARGP_LIBRARIES)
set(plotlibs ${plotlibs} ${ARGP_LIBRARIES})
endif (ARGP_LIBRARIES)
target_link_libraries(scontactplot ${plotlibs} ${PNG_LIBRARIES})
#find_package(OpenMP)
#if (OPENMP_FOUND)
# set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
#endif()
install(TARGETS scontactplot DESTINATION bin)
This diff is collapsed.
#ifndef _OBJECT_COLLECTION_H_
#define _OBJECT_COLLECTION_H_
#include <vector>
#include <string>
#include <map>
class ObjectCollection {
std::vector<float> radius, coordorig;
std::vector<bool> fixed;
std::vector<float> coord, segcoord, tricoord;
std::vector<float> circleGeom;
int dim;
int _step;
std::string _filename;
double _shift[2], _scale, _rotation[2];
bool _clip;
void _compute_bbox(float bbox[6]);
std::map<int, int> _visible_flag;
FILE *_ffmpeg;
std::string _basename;
public :
ObjectCollection(const std::string basename);
~ObjectCollection();
int dimension() {return dim;}
int step() const {return _step;}
bool file_exists(int i);
int read(int step = -1);
void display();
void shift(double dx, double dy);
void zoom_at(double factor, double cx, double cy);
void rotate(double r0, double r1);
bool clip() const {return _clip;}
void clip(bool c) {_clip = c;}
std::map<int, int> &visible_flag() {return _visible_flag;}
void write_png(const char *file_name);
void start_ffmpeg(const std::string filename);
void stop_ffmpeg();
void save_opt(const char *filename);
void load_opt(const char *filename);
};
#endif
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment