RobWorkProject  23.9.11-
Public Types | Public Member Functions | Related Functions | List of all members
CameraMatrix< T > Class Template Reference

The PerspectiveTransform2D is a perspective transform in 2D. The homographic transform can be used to map one arbitrary 2D quadrilateral into another. More...

#include <CameraMatrix.hpp>

Public Types

typedef Eigen::Matrix< T, 4, 4 > Base
 The type of the underlying Eigen data type.
 
typedef std::pair< rw::math::Vector3D< T >, rw::math::Vector3D< T > > Vector3DPair
 A pair of Vector3D.
 

Public Member Functions

 CameraMatrix (T r11, T r12, T r13, T r21, T r22, T r23, T r31, T r32, T r33)
 constructor
 
virtual ~CameraMatrix ()
 destructor
 
T & operator() (std::size_t row, std::size_t col)
 Returns matrix element reference. More...
 
const T & operator() (std::size_t row, std::size_t col) const
 Returns const matrix element reference. More...
 
Vector3D< T > operator* (const Vector3D< T > &v2d) const
 transform a point using this perspective transform
 
Basee ()
 Returns reference to the internal camera matrix. More...
 

Related Functions

(Note that these are not member functions.)

template<>
void write (const rw::math::CameraMatrix< double > &sobject, rw::common::OutputArchive &oarchive, const std::string &id)
 
template<>
void write (const rw::math::CameraMatrix< float > &sobject, rw::common::OutputArchive &oarchive, const std::string &id)
 
template<>
void read (rw::math::CameraMatrix< double > &sobject, rw::common::InputArchive &iarchive, const std::string &id)
 
template<>
void read (rw::math::CameraMatrix< float > &sobject, rw::common::InputArchive &iarchive, const std::string &id)
 

Detailed Description

template<class T = double>
class rw::math::CameraMatrix< T >

The PerspectiveTransform2D is a perspective transform in 2D. The homographic transform can be used to map one arbitrary 2D quadrilateral into another.

Member Function Documentation

◆ e()

Base& e ( )
inline

Returns reference to the internal camera matrix.

Returns
\( \mathbf{M}\in SO(3) \)

◆ operator()() [1/2]

T& operator() ( std::size_t  row,
std::size_t  col 
)
inline

Returns matrix element reference.

Parameters
row[in] row, row must be \( < 3 \)
col[in] col, col must be \( < 3 \)
Returns
reference to matrix element

◆ operator()() [2/2]

const T& operator() ( std::size_t  row,
std::size_t  col 
) const
inline

Returns const matrix element reference.

Parameters
row[in] row, row must be \( < 3 \)
col[in] col, col must be \( < 3 \)
Returns
const reference to matrix element

Friends And Related Function Documentation

◆ read() [1/2]

void read ( rw::math::CameraMatrix< double > &  sobject,
rw::common::InputArchive iarchive,
const std::string &  id 
)
related

Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.

Parameters
sobject[out] the object in which the data should be streamed into
iarchive[in] the InputArchive from which to read data.
id[in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

◆ read() [2/2]

void read ( rw::math::CameraMatrix< float > &  sobject,
rw::common::InputArchive iarchive,
const std::string &  id 
)
related

Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.

Parameters
sobject[out] the object in which the data should be streamed into
iarchive[in] the InputArchive from which to read data.
id[in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

◆ write() [1/2]

void write ( const rw::math::CameraMatrix< double > &  sobject,
rw::common::OutputArchive oarchive,
const std::string &  id 
)
related

Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.

Parameters
sobject[in] the object from which the data should be streamed.
oarchive[out] the OutputArchive in which data should be written.
id[in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

◆ write() [2/2]

void write ( const rw::math::CameraMatrix< float > &  sobject,
rw::common::OutputArchive oarchive,
const std::string &  id 
)
related

Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.

Parameters
sobject[in] the object from which the data should be streamed.
oarchive[out] the OutputArchive in which data should be written.
id[in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

The documentation for this class was generated from the following files: