00001
00002
00004
00005 #ifndef EVENTPRIMITIVES_AMGTRANSFORMPLUGIN_H
00006 #define EVENTPRIMITIVES_AMGTRANSFORMPLUGIN_H
00007
00008
00009 inline explicit Transform(const Vector3d& rotationMatrixCol0, const Vector3d& rotationMatrixCol1, const Vector3d& rotationMatrixCol2){
00010 check_template_params();
00011 m_matrix.block(0,0,3,1) = rotationMatrixCol0;
00012 m_matrix.block(0,1,3,1) = rotationMatrixCol1;
00013 m_matrix.block(0,2,3,1) = rotationMatrixCol2;
00014 if (int(Mode)==Affine)
00015 makeAffine();
00016 }
00017
00018 inline explicit Transform(const Vector3d& translation){
00019 check_template_params();
00020 m_matrix.block(0,3,3,1) = translation;
00021 m_matrix.block(0,0,3,3).setIdentity();
00022 if (int(Mode)==Affine)
00023 makeAffine();
00024 }
00025
00026 inline explicit Transform(const Matrix<double, 3,3>& rotation, const Vector3d& translation){
00027 check_template_params();
00028 m_matrix.block(0,0,3,3) = rotation;
00029 m_matrix.block(0,3,3,1) = translation;
00030 if (int(Mode)==Affine)
00031 makeAffine();
00032 }
00033 inline explicit Transform(const Matrix<double, 3,3>& rotation, const TranslationType& translation){
00034 check_template_params();
00035 m_matrix.block(0,0,3,3) = rotation;
00036 m_matrix.block(0,3,3,1) = translation.vector();
00037 if (int(Mode)==Affine)
00038 makeAffine();
00039 }
00040
00041 inline explicit Transform(const Vector3d& rotationMatrixCol0, const Vector3d& rotationMatrixCol1, const Vector3d& rotationMatrixCol2, const Vector3d& translation){
00042 check_template_params();
00043 m_matrix.block(0,0,3,1) = rotationMatrixCol0;
00044 m_matrix.block(0,1,3,1) = rotationMatrixCol1;
00045 m_matrix.block(0,2,3,1) = rotationMatrixCol2;
00046 m_matrix.block(0,3,3,1) = translation;
00047 if (int(Mode)==Affine)
00048 makeAffine();
00049 }
00050
00051 #endif