mirror of https://github.com/CGAL/cgal
Merge branch 'master' of ssh://scm.cgal.org/var/git/cgal
This commit is contained in:
commit
a54d020d40
|
|
@ -60,27 +60,27 @@ public:
|
|||
PlaneC3() {}
|
||||
|
||||
PlaneC3(const Point_3 &p, const Point_3 &q, const Point_3 &r)
|
||||
{ *this = plane_from_points(p, q, r); }
|
||||
{ *this = plane_from_points<R>(p, q, r); }
|
||||
|
||||
PlaneC3(const Point_3 &p, const Direction_3 &d)
|
||||
{ *this = plane_from_point_direction(p, d); }
|
||||
{ *this = plane_from_point_direction<R>(p, d); }
|
||||
|
||||
PlaneC3(const Point_3 &p, const Vector_3 &v)
|
||||
{ *this = plane_from_point_direction(p, v.direction()); }
|
||||
{ *this = plane_from_point_direction<R>(p, v.direction()); }
|
||||
|
||||
PlaneC3(const FT &a, const FT &b, const FT &c, const FT &d)
|
||||
: base(CGAL::make_array(a, b, c, d)) {}
|
||||
|
||||
PlaneC3(const Line_3 &l, const Point_3 &p)
|
||||
{ *this = plane_from_points(l.point(),
|
||||
{ *this = plane_from_points<R>(l.point(),
|
||||
l.point()+l.direction().to_vector(),
|
||||
p); }
|
||||
|
||||
PlaneC3(const Segment_3 &s, const Point_3 &p)
|
||||
{ *this = plane_from_points(s.start(), s.end(), p); }
|
||||
{ *this = plane_from_points<R>(s.start(), s.end(), p); }
|
||||
|
||||
PlaneC3(const Ray_3 &r, const Point_3 &p)
|
||||
{ *this = plane_from_points(r.start(), r.second_point(), p); }
|
||||
{ *this = plane_from_points<R>(r.start(), r.second_point(), p); }
|
||||
|
||||
typename R::Boolean operator==(const PlaneC3 &p) const;
|
||||
typename R::Boolean operator!=(const PlaneC3 &p) const;
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ class PlaneC3;
|
|||
template <class R>
|
||||
CGAL_KERNEL_LARGE_INLINE
|
||||
PlaneC3<R>
|
||||
plane_from_points(const PointC3<R> &p,
|
||||
const PointC3<R> &q,
|
||||
const PointC3<R> &r)
|
||||
plane_from_points(const typename R::Point_3 &p,
|
||||
const typename R::Point_3 &q,
|
||||
const typename R::Point_3 &r)
|
||||
{
|
||||
typename R::FT a, b, c, d;
|
||||
plane_from_pointsC3(p.x(), p.y(), p.z(),
|
||||
|
|
@ -52,8 +52,8 @@ plane_from_points(const PointC3<R> &p,
|
|||
template <class R>
|
||||
CGAL_KERNEL_LARGE_INLINE
|
||||
PlaneC3<R>
|
||||
plane_from_point_direction(const PointC3<R> &p,
|
||||
const DirectionC3<R> &d)
|
||||
plane_from_point_direction(const typename R::Point_3 &p,
|
||||
const typename R::Direction_3 &d)
|
||||
{
|
||||
typename R::FT A, B, C, D;
|
||||
plane_from_point_directionC3(p.x(), p.y(), p.z(), d.dx(), d.dy(), d.dz(),
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ template <class K>
|
|||
Object
|
||||
intersection(const typename K::Plane_3 &plane,
|
||||
const typename K::Line_3 &line,
|
||||
const K&)
|
||||
const K& k)
|
||||
{
|
||||
typedef typename K::Point_3 Point_3;
|
||||
typedef typename K::Direction_3 Direction_3;
|
||||
|
|
@ -57,7 +57,7 @@ intersection(const typename K::Plane_3 &plane,
|
|||
return Object();
|
||||
}
|
||||
}
|
||||
return make_object(Point_3(
|
||||
return make_object(k.construct_point_3_object()(
|
||||
den*line_pt.hx()-num*line_dir.dx(),
|
||||
den*line_pt.hy()-num*line_dir.dy(),
|
||||
den*line_pt.hz()-num*line_dir.dz(),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
/// \ingroup PkgNumberTypes
|
||||
/// an approximation of \f$ \pi \f$
|
||||
#define CGAL_PI 3.14159265358979323846
|
||||
|
|
@ -278,7 +278,7 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
|||
Camera_positions_list.moc
|
||||
${cameraUI_FILES})
|
||||
|
||||
target_link_libraries( camera_positions_plugin ${QGLVIEWER_LIBRARIES} )
|
||||
target_link_libraries( camera_positions_plugin ${QGLVIEWER_LIBRARIES} demo_framework)
|
||||
|
||||
if ( Boost_VERSION GREATER 103400 )
|
||||
qt4_generate_moc( "Polyhedron_demo_mesh_3_plugin_cgal_code.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Scene_c3t3_item.moc" )
|
||||
|
|
|
|||
|
|
@ -10,6 +10,12 @@
|
|||
#include "Color_ramp.h"
|
||||
#include <Viewer_interface.h>
|
||||
|
||||
#include <CGAL/double.h>
|
||||
inline
|
||||
bool is_nan(double d)
|
||||
{
|
||||
return !CGAL::Is_valid<double>()( d );
|
||||
}
|
||||
|
||||
Scene_implicit_function_item::
|
||||
Scene_implicit_function_item(Implicit_function_interface* f)
|
||||
|
|
@ -202,7 +208,7 @@ draw_grid_vertex(const Point_value& pv,
|
|||
const Point& p = pv.first;
|
||||
double v = pv.second;
|
||||
|
||||
if(std::isnan(v)) {
|
||||
if(is_nan(v)) {
|
||||
::glColor3f(0.2f, 0.2f, 0.2f);
|
||||
} else
|
||||
// determines grey level
|
||||
|
|
@ -289,7 +295,7 @@ compute_min_max()
|
|||
double z = b.zmin + double(k) * (b.zmax - b.zmin) / probes_nb;
|
||||
|
||||
double v = (*function_)(x,y,z);
|
||||
if(std::isnan(v)) continue;
|
||||
if(is_nan(v)) continue;
|
||||
max_value_ = (std::max)(v,max_value_);
|
||||
min_value_ = (std::min)(v,min_value_);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,48 +98,59 @@ else
|
|||
echo "Run all tests."
|
||||
|
||||
for target in \
|
||||
demo_framework \
|
||||
point_dialog \
|
||||
Polyhedron_3 \
|
||||
scene_basic_objects \
|
||||
scene_c2t3_item \
|
||||
scene_edit_polyhedron_item \
|
||||
scene_nef_polyhedron_item \
|
||||
scene_combinatorial_map_item \
|
||||
scene_plane_item \
|
||||
scene_polyline_item \
|
||||
scene_polygon_soup_item \
|
||||
scene_polyhedron_item \
|
||||
scene_textured_polyhedron_item \
|
||||
scene_points_with_normal_item\
|
||||
camera_positions_plugin \
|
||||
convex_hull_plugin \
|
||||
corefinement_plugin \
|
||||
cut_plugin \
|
||||
demo_framework \
|
||||
edit_polyhedron_plugin \
|
||||
gocad_plugin \
|
||||
inside_out_plugin \
|
||||
intersection_plugin \
|
||||
io_implicit_function_plugin \
|
||||
kernel_plugin \
|
||||
mesh_3_plugin \
|
||||
mesh_simplification_plugin \
|
||||
nef_io_plugin \
|
||||
nef_plugin \
|
||||
normal_estimation_plugin \
|
||||
off_plugin \
|
||||
xyz_plugin \
|
||||
polylines_io_plugin \
|
||||
off_to_nef_plugin \
|
||||
off_to_xyz_plugin \
|
||||
orient_soup_plugin \
|
||||
parameterization_plugin \
|
||||
pca_plugin \
|
||||
remeshing_plugin \
|
||||
self_intersection_plugin \
|
||||
subdivision_methods_plugin \
|
||||
triangulate_facets_plugin \
|
||||
point_dialog \
|
||||
point_set_average_spacing_plugin \
|
||||
point_set_outliers_removal_plugin \
|
||||
point_set_simplification_plugin \
|
||||
point_set_smoothing_plugin \
|
||||
poisson_plugin \
|
||||
trivial_plugin
|
||||
polylines_io_plugin \
|
||||
remeshing_plugin \
|
||||
scene_basic_objects \
|
||||
scene_c2t3_item \
|
||||
scene_combinatorial_map_item \
|
||||
scene_edit_polyhedron_item \
|
||||
scene_implicit_function_item \
|
||||
scene_nef_polyhedron_item \
|
||||
scene_points_with_normal_item \
|
||||
scene_polygon_soup_item \
|
||||
scene_polyhedron_item \
|
||||
scene_polyhedron_transform_item \
|
||||
scene_polylines_item \
|
||||
scene_textured_polyhedron_item \
|
||||
self_intersection_plugin \
|
||||
stl_plugin \
|
||||
subdivision_methods_plugin \
|
||||
transform_polyhedron_plugin \
|
||||
triangulate_facets_plugin \
|
||||
trivial_plugin \
|
||||
xyz_plugin \
|
||||
p_klein_function_plugin \
|
||||
p_sphere_function_plugin \
|
||||
p_tanglecube_function_plugin
|
||||
do
|
||||
if ${MAKE_CMD} -f Makefile help | grep "$target" > /dev/null; then
|
||||
compile_and_run "$target"
|
||||
|
|
|
|||
Loading…
Reference in New Issue