[Liblas-commits] r1208 - trunk/include/liblas
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Apr 15 10:13:58 EDT 2009
Author: mloskot
Date: Wed Apr 15 10:13:47 2009
New Revision: 1208
URL: http://liblas.org/changeset/1208
Log:
Added extra constructor to initialize LASColor directly with RGB values (Ticket #130).
Modified:
trunk/include/liblas/lascolor.hpp
Modified: trunk/include/liblas/lascolor.hpp
==============================================================================
--- trunk/include/liblas/lascolor.hpp (original)
+++ trunk/include/liblas/lascolor.hpp Wed Apr 15 10:13:47 2009
@@ -60,6 +60,12 @@
/// Initializes with black color using RGB {0, 0, 0}.
LASColor();
+ // User-defined constructor.
+ // Initializes object with given RGB values.
+ LASColor(uint16_t red, uint16_t green, uint16_t blue)
+ : m_red(red), m_green(green), m_blue(blue)
+ {}
+
/// Copy constructor.
LASColor(LASColor const& other);
@@ -148,7 +154,6 @@
if (n == 2) { return m_blue; }
throw_out_of_range();
-
}
inline uint16_t const& LASColor::operator[](std::size_t const& n) const
More information about the Liblas-commits
mailing list