本文整理汇总了C++中Matrix_3x3::Row2方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix_3x3::Row2方法的具体用法?C++ Matrix_3x3::Row2怎么用?C++ Matrix_3x3::Row2使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix_3x3
的用法示例。
在下文中一共展示了Matrix_3x3::Row2方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetBox
/** Set box from unit cell matrix. */
void Box::SetBox(Matrix_3x3 const& ucell) {
Vec3 x_axis = ucell.Row1();
Vec3 y_axis = ucell.Row2();
Vec3 z_axis = ucell.Row3();
box_[0] = x_axis.Normalize(); // A
box_[1] = y_axis.Normalize(); // B
box_[2] = z_axis.Normalize(); // C
box_[3] = y_axis.Angle( z_axis ) * Constants::RADDEG; // alpha
box_[4] = x_axis.Angle( z_axis ) * Constants::RADDEG; // beta
box_[5] = x_axis.Angle( y_axis ) * Constants::RADDEG; // gamma
SetBoxType();
}
示例2: Principal
void Action_Vector::Principal(Frame const& currentFrame) {
Matrix_3x3 Inertia;
Vec3 Eval;
// Origin is center of atoms in mask_
Vec3 OXYZ = currentFrame.CalculateInertia( mask_, Inertia );
// NOTE: Diagonalize_Sort_Chirality places sorted eigenvectors in rows.
Inertia.Diagonalize_Sort_Chirality( Eval, 0 );
// Eval.Print("PRINCIPAL EIGENVALUES");
// Inertia.Print("PRINCIPAL EIGENVECTORS (Rows)");
if ( mode_ == PRINCIPAL_X )
Vec_->AddVxyz( Inertia.Row1(), OXYZ ); // First row = first eigenvector
else if ( mode_ == PRINCIPAL_Y )
Vec_->AddVxyz( Inertia.Row2(), OXYZ ); // Second row = second eigenvector
else // PRINCIPAL_Z
Vec_->AddVxyz( Inertia.Row3(), OXYZ ); // Third row = third eigenvector
}