52 #ifndef __PCL_LinearTransformation_h
53 #define __PCL_LinearTransformation_h
110 : m_a00( a00 ), m_a01( a01 ), m_a02( a02 )
111 , m_a10( a10 ), m_a11( a11 ), m_a12( a12 )
112 , m_det( a00*a11 - a01*a10 )
131 return 1 + m_det == 1;
139 return DPoint( m_a00*p.
x + m_a01*p.
y + m_a02,
140 m_a10*p.
x + m_a11*p.
y + m_a12 );
161 throw Error(
"Invalid call to LinearTransformation::TransformInverse(): Singular matrix" );
162 return DPoint( ( m_a11*p.
x - m_a01*p.
y + m_a01*m_a12 - m_a02*m_a11)/m_det,
163 (-m_a10*p.
x + m_a00*p.
y + m_a02*m_a10 - m_a00*m_a12)/m_det );
172 m_a00*T.m_a01 + m_a01*T.m_a11,
173 m_a00*T.m_a02 + m_a01*T.m_a12 + m_a02,
174 m_a10*T.m_a00 + m_a11*T.m_a10,
175 m_a10*T.m_a01 + m_a11*T.m_a11,
176 m_a10*T.m_a02 + m_a11*T.m_a12 + m_a12 );
188 throw Error(
"Invalid call to LinearTransformation::Inverse(): Singular matrix" );
191 (m_a01*m_a12 - m_a02*m_a11)/m_det,
194 (m_a02*m_a10 - m_a00*m_a12)/m_det );
251 return Matrix( m_a00, m_a01, m_a02,
278 return Vector( { m_a00, m_a01, m_a02, m_a10, m_a11, m_a12 } );
290 text <<
String(
' ', indent );
291 text.
AppendFormat(
"%+16.8e %+16.8e %+16.8e\n", m_a00, m_a01, m_a02 );
293 text <<
String(
' ', indent );
294 text.
AppendFormat(
"%+16.8e %+16.8e %+16.8e", m_a10, m_a11, m_a12 );
309 double m_a00 = 1, m_a01 = 0, m_a02 = 0,
310 m_a10 = 0, m_a11 = 1, m_a12 = 0;
A simple exception with an associated error message.
Generic dynamic matrix of arbitrary dimensions.
A generic point in the two-dimensional space.
component x
Abscissa (horizontal, or X-axis coordinate).
component y
Ordinate (vertical, or Y-axis coordinate).
Generic vector of arbitrary length.
String & AppendFormat(const_c_string8 fmt,...)