[Liblas-commits] hg: 3 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed May 5 12:19:39 EDT 2010
changeset b6d1d6537a3d in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=b6d1d6537a3d
summary: provide a proper Reset method for CachedReaderImpl
changeset 00737145074a in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=00737145074a
summary: provide a proper Reset method for CachedReaderImpl
changeset 59f1d3897c0a in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=59f1d3897c0a
summary: merge
diffstat:
CMakeLists.txt | 6 ------
include/liblas/detail/reader/reader.hpp | 1 +
src/detail/reader/reader.cpp | 22 ++++++++++++++++++++++
3 files changed, 23 insertions(+), 6 deletions(-)
diffs (56 lines):
diff -r 4496a84f0d06 -r 59f1d3897c0a CMakeLists.txt
--- a/CMakeLists.txt Tue May 04 13:08:58 2010 -0500
+++ b/CMakeLists.txt Wed May 05 11:19:32 2010 -0500
@@ -301,9 +301,3 @@
endif()
endif()
-
-SET(CPACK_SOURCE_GENERATOR "TGZ;TBZ2")
-SET(CPACK_PACKAGE_DESCRIPTION_FILE "README.txt")
-SET(CPACK_RESOURCE_FILE_README "README.txt")
-SET(CPACK_SOURCE_PACKAGE_FILE_NAME "libLAS-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-INCLUDE(CPack)
diff -r 4496a84f0d06 -r 59f1d3897c0a include/liblas/detail/reader/reader.hpp
--- a/include/liblas/detail/reader/reader.hpp Tue May 04 13:08:58 2010 -0500
+++ b/include/liblas/detail/reader/reader.hpp Wed May 05 11:19:32 2010 -0500
@@ -116,6 +116,7 @@
liblas::Point const& ReadNextPoint(const liblas::Header& header);
liblas::Point const& ReadPointAt(std::size_t n, const liblas::Header& header);
+ void Reset(liblas::Header const& header);
protected:
diff -r 4496a84f0d06 -r 59f1d3897c0a src/detail/reader/reader.cpp
--- a/src/detail/reader/reader.cpp Tue May 04 13:08:58 2010 -0500
+++ b/src/detail/reader/reader.cpp Wed May 05 11:19:32 2010 -0500
@@ -392,6 +392,28 @@
}
+void CachedReaderImpl::Reset(liblas::Header const& header)
+{
+
+ if (m_mask.size() > 0) {
+
+ uint32_t left_to_cache = std::min(m_cache_size, header.GetPointRecordsCount() - m_cache_start_position);
+
+ // Mark old points as uncached
+ uint32_t to_mark = std::max(m_cache_size, static_cast<liblas::uint64_t>(left_to_cache));
+ for (uint32_t i = 0; i < to_mark; ++i) {
+
+ m_mask[m_cache_start_position + i] = false;
+ }
+
+ m_cache_start_position = 0;
+ m_cache_read_position = 0;
+
+ }
+
+ ReaderImpl::Reset(header);
+
+}
// CachedReaderImpl::~CachedReaderImpl()
// {
// ~ReaderImpl();
More information about the Liblas-commits
mailing list