39 #include <boost/shared_array.hpp> 110 boost::shared_array<T> ret = boost::shared_array<T>(
new T[source.size()] );
111 std::copy(source.begin(), source.end(), ret.get());
124 template <
typename BaseVecT>
141 ret[12] = -100*in[7];
142 ret[13] = 100*in[11];
157 template <
typename T>
165 ret[3] = in[14]/100.0;
169 ret[7] = -in[12]/100.0;
173 ret[11] = in[13]/100.0;
179 return Eigen::Map<Eigen::Matrix<T, 4, 4, Eigen::RowMajor> >(ret);
182 template <
typename ValueType>
186 in.
z / (ValueType) 100.0,
187 - in.
x / (ValueType) 100.0,
188 in.
y / (ValueType) 100.0
201 template <
typename ValueType>
204 return M_PI / 180.0 * deg;
214 template <
typename ValueType>
217 return rad * 180 /
M_PI;
236 return (lhs.
x < rhs.
x) ||
237 (lhs.
x == rhs.
x && lhs.
y < rhs.
y) ||
238 (lhs.
x == rhs.
x && lhs.
y == rhs.
y && lhs.
z < rhs.
z);
A comparison object for Vector<VecUChar>
A 4x4 matrix class implementation for use with the provided vertex types.
bool operator()(const VecUChar &lhs, const VecUChar &rhs) const
Comparison operator.
static int getSpectralChannel(int wavelength, PointBufferPtr p, int fallback=-1)
Returns the spectral channel index for a given wavelength.
static ValueType deg_to_rad(ValueType deg)
Converts an angle from degree to radian.
static ValueType rad_to_deg(ValueType rad)
Converts an angle from radian to degree.
static Matrix4< BaseVecT > riegl_to_slam6d_transform(const Matrix4< BaseVecT > &in)
Converts a transformation matrix that is used in riegl coordinate system into a transformation matrix...
std::shared_ptr< PointBuffer > PointBufferPtr
static BaseVector< ValueType > slam6d_to_riegl_point(const BaseVector< ValueType > &in)
static int getSpectralWavelength(int channel, PointBufferPtr p, int fallback=-1)
For a given spectral channel it return the corresponding wavelength.
static float wavelengthPerChannel(PointBufferPtr p)
Calculates the wavelength distance between two spectral channels.
A class that contains utility functions/types.
Transform< T > slam6d_to_riegl_transform(const Transform< T > &mat)
Converts a transformation matrix that is used in slam6d coordinate system into a transformation matri...
static boost::shared_array< T > convert_vector_to_shared_array(std::vector< T > source)
Creates a shared array with the data from the given vector.
A generic, weakly-typed vector.
Eigen::Matrix< T, 4, 4 > Transform
General 4x4 transformation matrix (4x4)