Commit b2c27c2d authored by Bas Couwenberg's avatar Bas Couwenberg

Imported Upstream version 1.8.1

parent fda86b71
Marios Hadjieleftheriou -- Main author
mhadji@gmail.com
Howard Butler -- minor packaging, Trac/SVN stuff, and some Windows work
hobu.inc@gmail.com
\ No newline at end of file
Howard Butler -- minor packaging, C API, and some Windows work
hobu.inc@gmail.com
Leonard Norrgård - CountVisitor in C API
leonard.norrgard@refactor.fi
Matthias (nitro) - CustomStorage in C API
nitro@dr-code.org
\ No newline at end of file
......@@ -24,30 +24,48 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
#------------------------------------------------------------------------------
SET(SIDX_VERSION_MAJOR "1")
SET(SIDX_VERSION_MINOR "7")
SET(SIDX_VERSION_PATCH "0")
SET(SIDX_VERSION_MINOR "8")
SET(SIDX_VERSION_PATCH "1")
SET(SIDX_LIB_SOVERSION "3.0.0")
set(SIDX_VERSION_STRING "${SIDX_VERSION_MAJOR}.${SIDX_VERSION_MINOR}.${SIDX_VERSION_PATCH}")
SET(SIDX_LIB_SOVERSION ${SIDX_VERSION_MAJOR})
SET(SIDX_C_LIB_SOVERSION ${SIDX_VERSION_MAJOR})
# Name of C++ library
set(SIDX_LIB_NAME spatialindex)
set(SIDX_LIB_NAME spatialindex)
set(SIDX_C_LIB_NAME spatialindex_c)
if(WIN32)
if (MSVC)
if (MSVC80 OR MSVC90 OR MSVC10)
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set( SIDX_LIB_NAME "spatialindex-64" )
set( SIDX_C_LIB_NAME "spatialindex_c-64" )
else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set( SIDX_LIB_NAME "spatialindex-32" )
set( SIDX_C_LIB_NAME "spatialindex_c-32" )
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
endif()
endif()
endif()
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
include (CheckFunctionExists)
check_function_exists(srand48 HAVE_SRAND48)
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
check_function_exists(bzero HAVE_BZERO)
check_function_exists(memset HAVE_MEMSET)
check_function_exists(memcpy HAVE_MEMCPY)
check_function_exists(bcopy HAVE_BCOPY)
INCLUDE (CheckIncludeFiles)
check_include_files(pthread.h HAVE_PTHREAD_H)
if (HAVE_SRAND48)
add_definitions(-DHAVE_SRAND48=1)
endif()
......@@ -72,6 +90,10 @@ if (HAVE_BCOPY)
add_definitions(-DHAVE_BCOPY=1)
endif()
if (HAVE_PTHREAD_H)
add_definitions(-DHAVE_PTHREAD_H=1)
endif()
# Choose to use pkg-config or not
#set(WITH_PKGCONFIG FALSE CACHE BOOL
# "Choose whether a pkgconfig file (PDAL.pc) should be installed")
......@@ -83,7 +105,7 @@ endif()
# note we default to debug mode
if(NOT MSVC_IDE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel" FORCE)
endif()
message(STATUS "Setting libspatialindex build type - ${CMAKE_BUILD_TYPE}")
......@@ -101,7 +123,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SIDX_BUILD_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SIDX_BUILD_OUTPUT_DIRECTORY})
# Output directory in which to build ARCHIVE target files.
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SIDX_BUILD_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SIDX_BUILD_OUTPUT_DIRECTORY})
#------------------------------------------------------------------------------
......@@ -110,7 +132,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SIDX_BUILD_OUTPUT_DIRECTORY})
if(WIN32)
if (MSVC)
if (MSVC80 OR MSVC90 OR MSVC10)
if (MSVC80 OR MSVC90 OR MSVC10 OR MSVC11)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_NONSTDC_NO_WARNING)
......@@ -118,7 +140,9 @@ if(WIN32)
add_definitions(-DSPATIALINDEX_CREATE_DLL=1)
set(SIDX_COMPILER_MSVC 1)
if (MSVC10)
if (MSVC11)
set(SIDX_COMPILER_VC11 1)
elseif (MSVC10)
set(SIDX_COMPILER_VC10 1)
elseif (MSVC9)
set(SIDX_COMPILER_VC9 1)
......@@ -126,7 +150,7 @@ if(WIN32)
set(SIDX_COMPILER_VC8 1)
endif()
endif()
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4"
CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
......@@ -134,7 +158,7 @@ if(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
endif()
set(CMAKE_INCLUDE_PATH c:/osgeo4w/include;$ENV{CMAKE_INCLUDE_PATH})
set(CMAKE_LIBRARY_PATH c:/osgeo4w/lib;$ENV{CMAKE_LIBRARY_PATH})
......@@ -154,9 +178,9 @@ else()
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -ansi")
endif()
set(SIDX_COMPILER_GCC 1)
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER}" MATCHES "clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SIDX_COMMON_CXX_FLAGS}")
set(SIDX_COMPILER_CLANG 1)
......@@ -191,7 +215,7 @@ else()
# Common locations for Unix and Mac OS X
set(DEFAULT_BIN_SUBDIR bin)
set(DEFAULT_LIB_SUBDIR lib${LIB_SUFFIX})
set(DEFAULT_DATA_SUBDIR share/libspatialindex)
set(DEFAULT_DATA_SUBDIR share/spatialindex)
set(DEFAULT_INCLUDE_SUBDIR include)
endif()
......@@ -216,7 +240,6 @@ set(SIDX_LIB_DIR ${SIDX_LIB_SUBDIR})
set(SIDX_INCLUDE_DIR ${SIDX_INCLUDE_SUBDIR})
set(SIDX_DATA_DIR ${SIDX_DATA_SUBDIR})
#------------------------------------------------------------------------------
# subdirectory controls
#------------------------------------------------------------------------------
......@@ -224,13 +247,3 @@ set(SIDX_DATA_DIR ${SIDX_DATA_SUBDIR})
add_subdirectory(src)
add_subdirectory(test)
#------------------------------------------------------------------------------
# finally, generate the pdal_config.h header
#------------------------------------------------------------------------------
#
# configure_file(
# "${PROJECT_SOURCE_DIR}/pdal_defines.h.in"
# "${PROJECT_SOURCE_DIR}/include/pdal/pdal_defines.h")
This diff is collapsed.
This diff is collapsed.
......@@ -17,11 +17,10 @@ libspatialindex_c_la_LIBADD = \
libspatialindex.la \
src/capi/libsidxc.la
libspatialindex_la_LDFLAGS = -version-info 1:0:0
libspatialindex_c_la_LDFLAGS = -version-info 1:0:0 -lstdc++
libspatialindex_la_LDFLAGS = -version-info 3:0:0 -no-undefined -lstdc++
libspatialindex_c_la_LDFLAGS = -version-info 3:0:0 -no-undefined -lstdc++
EXTRA_DIST = makefile.vc \
INSTALL.WIN \
EXTRA_DIST = INSTALL.WIN \
spatialindex.sln \
spatialindex-vc/spatialindex.vcproj \
CMakeLists.txt \
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,13 +2,13 @@
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
# 2011, 2012, 2013 Free Software Foundation, Inc.
timestamp='2011-05-11'
timestamp='2012-12-29'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
......@@ -17,26 +17,22 @@ timestamp='2011-05-11'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner. Please send patches (context
# diff format) to <config-patches@gnu.org> and include a ChangeLog
# entry.
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
#
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
me=`echo "$0" | sed -e 's,.*/,,'`
......@@ -57,8 +53,8 @@ GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
Software Foundation, Inc.
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
2012, 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......@@ -145,7 +141,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
......@@ -202,6 +198,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
......@@ -304,7 +304,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
arm:riscos:*:*|arm:RISCOS:*:*)
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
......@@ -792,21 +792,26 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:MINGW64*:*)
echo ${UNAME_MACHINE}-pc-mingw64
exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
......@@ -861,6 +866,13 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
......@@ -895,13 +907,16 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
......@@ -943,7 +958,7 @@ EOF
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
......@@ -978,13 +993,13 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-tilera-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
......@@ -1191,6 +1206,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
x86_64:Haiku:*:*)
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
......@@ -1246,7 +1264,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
......@@ -1315,11 +1333,11 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
......
This diff is collapsed.
This diff is collapsed.
......@@ -4,11 +4,11 @@
AC_PREREQ(2.59)
m4_define([sidx_version_major], [1])
m4_define([sidx_version_minor], [7])
m4_define([sidx_version_micro], [0])
m4_define([sidx_version_minor], [8])
m4_define([sidx_version_micro], [1])
m4_define([sidx_version],
[sidx_version_major.sidx_version_minor.sidx_version_micro])
AC_INIT([spatialindex], [sidx_version], [mhadji@gmail.com], [spatialindex-src])
AC_CANONICAL_BUILD
......@@ -31,7 +31,12 @@ AC_CHECK_HEADERS(fcntl.h,, [AC_MSG_ERROR([cannot find fcntl.h, bailing out])])
AC_CHECK_HEADERS(unistd.h,, [AC_MSG_ERROR([cannot find unistd.h, bailing out])])
AC_CHECK_HEADERS(sys/types.h,, [AC_MSG_ERROR([cannot find sys/types.h, bailing out])])
AC_CHECK_HEADERS(sys/stat.h,, [AC_MSG_ERROR([cannot find sys/stat.h, bailing out])])
AC_CHECK_HEADERS(pthread.h, [LIBS="$LIBS -lpthread"])
AC_CHECK_HEADERS(pthread.h, [
#ifndef ANDROID
LIBS="$LIBS -lpthread"
#endif])
AC_CHECK_HEADERS(sys/resource.h,, [AC_MSG_ERROR([cannot find sys/resource.h, bailing out])])
AC_CHECK_HEADERS(sys/time.h,, [AC_MSG_ERROR([cannot find sys/time.h, bailing out])])
AC_CHECK_HEADERS(stdint.h,, [AC_MSG_ERROR([cannot find stdint.h, bailing out])])
......@@ -52,7 +57,7 @@ else
fi
# Checks for library functions.
AC_CHECK_FUNCS([gettimeofday bzero memset memcpy bcopy srand48])
AC_CHECK_FUNCS([gettimeofday memset memcpy bcopy srand48])
AM_CONDITIONAL([RAND_IS_CONFIG], [test "x$HAVE_SRAND48" = xtrue])
......@@ -68,6 +73,7 @@ AC_CONFIG_FILES([ Makefile
src/tprtree/Makefile
src/tools/Makefile
test/Makefile
test/geometry/Makefile
test/rtree/Makefile
test/mvrtree/Makefile
test/tprtree/Makefile])
......
This diff is collapsed.
// Spatial Index Library
//
// Copyright (C) 2004 Navel Ltd.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Email:
// mhadji@gmail.com
/******************************************************************************
* Project: libspatialindex - A C++ library for spatial indexing
* Author: Marios Hadjieleftheriou, mhadji@gmail.com
******************************************************************************
* Copyright (c) 2004, Marios Hadjieleftheriou
*
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
******************************************************************************/
#pragma once
......@@ -59,6 +65,8 @@ namespace SpatialIndex
virtual double getArea() const;
virtual double getMinimumDistance(const IShape& in) const;
virtual bool intersectsLineSegment(const LineSegment& l) const;
virtual bool intersectsRegion(const Region& p) const;
virtual double getMinimumDistance(const Point& p) const;
//virtual double getMinimumDistance(const Region& r) const;
virtual double getRelativeMinimumDistance(const Point& p) const;
......@@ -67,7 +75,7 @@ namespace SpatialIndex
virtual void makeInfinite(uint32_t dimension);
virtual void makeDimension(uint32_t dimension);
public:
uint32_t m_dimension;
double* m_pStartPoint;
......@@ -76,7 +84,19 @@ namespace SpatialIndex
friend class Region;
friend class Point;
friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const LineSegment& pt);
}; // Point
protected:
//some helpers for intersects methods
static double doubleAreaTriangle(const Point& a, const Point& b, const Point& c);
static bool leftOf(const Point& a, const Point& b, const Point& c);
static bool collinear(const Point& a, const Point& b, const Point& c);
static bool between(const Point& a, const Point& b, const Point& c);
static bool between(double a, double b, double c);
static bool intersectsProper(const Point& a, const Point& b, const Point& c, const Point& d);
static bool intersects(const Point& a, const Point& b, const Point& c, const Point& d);
}; // LineSegment
SIDX_DLL std::ostream& operator<<(std::ostream& os, const LineSegment& pt);
}
......
// Spatial Index Library
//
// Copyright (C) 2003 Navel Ltd.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Email:
// mhadji@gmail.com
/******************************************************************************
* Project: libspatialindex - A C++ library for spatial indexing
* Author: Marios Hadjieleftheriou, mhadji@gmail.com
******************************************************************************
* Copyright (c) 2004, Marios Hadjieleftheriou
*
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
******************************************************************************/
#pragma once
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.