[Liblas-commits] r999 - trunk/include/liblas

liblas-commits at liblas.org liblas-commits at liblas.org
Wed Feb 4 21:59:38 EST 2009


Author: hobu
Date: Wed Feb  4 21:59:38 2009
New Revision: 999
URL: http://liblas.org/changeset/999

Log:
add Red, Green, and Blue to LASPoint for 1.2 support #91

Modified:
   trunk/include/liblas/laspoint.hpp

Modified: trunk/include/liblas/laspoint.hpp
==============================================================================
--- trunk/include/liblas/laspoint.hpp	(original)
+++ trunk/include/liblas/laspoint.hpp	Wed Feb  4 21:59:38 2009
@@ -109,10 +109,10 @@
     void SetIntensity(uint16_t const& intensity);
 
     /// Gets all scanning flags encoded as single byte.
-    /// The flags are (mandatory):
-    /// - Return Number (bits 0, 1, 2);
-    /// - Number of Returns - given pulse (bits 3, 4, 5);
-    /// - Scan Direction Flag (bit 6);
+    /// The flags are (mandatory):
+    /// - Return Number (bits 0, 1, 2);
+    /// - Number of Returns - given pulse (bits 3, 4, 5);
+    /// - Scan Direction Flag (bit 6);
     /// - Edge of Flight Line (bit 7).
     uint8_t GetScanFlags() const;
 
@@ -149,7 +149,25 @@
 
     /// Set value of User Bit Field (LAS 1.0) or Point Source ID (LAS 1.1).
     void SetPointSourceID(uint16_t const& id);
-    
+
+    /// Fetch value of the red image channel value associated with this point (LAS 1.2)
+    uint16_t GetRed() const;
+
+    /// Set value of the red image channel value associated with this point (LAS 1.2)
+    void SetRed(uint16_t const& value);
+
+    /// Fetch value of the blue image channel value associated with this point (LAS 1.2)
+    uint16_t GetBlue() const;
+
+    /// Set value of the blue image channel value associated with this point (LAS 1.2)
+    void SetBlue(uint16_t const& value);
+
+    /// Fetch value of the green image channel value associated with this point (LAS 1.2)
+    uint16_t GetGreen() const;
+
+    /// Set value of the red image channel value associated with this point (LAS 1.2)
+    void SetGreen(uint16_t const& value);
+                
     double GetTime() const;
     void SetTime(double const& time);
 
@@ -180,6 +198,9 @@
     uint8_t m_userData;
     uint16_t m_pointSourceId;
     double m_gpsTime;
+    uint16_t m_red;
+    uint16_t m_green;
+    uint16_t m_blue;
 
     void throw_out_of_range() const
     {
@@ -320,6 +341,36 @@
     m_gpsTime = time;
 }
 
+inline uint16_t LASPoint::GetRed() const
+{
+    return m_red;
+}
+
+inline void LASPoint::SetRed(uint16_t const& value)
+{
+    m_red = value;
+}
+
+inline uint16_t LASPoint::GetBlue() const
+{
+    return m_blue;
+}
+
+inline void LASPoint::SetBlue(uint16_t const& value)
+{
+    m_blue = value;
+}
+
+inline uint16_t LASPoint::GetGreen() const
+{
+    return m_green;
+}
+
+inline void LASPoint::SetGreen(uint16_t const& value)
+{
+    m_green = value;
+}
+
 inline double& LASPoint::operator[](std::size_t const& n)
 {
     if (coords_size <= n)


More information about the Liblas-commits mailing list