本文整理汇总了C++中Matrix3::Get方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix3::Get方法的具体用法?C++ Matrix3::Get怎么用?C++ Matrix3::Get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix3
的用法示例。
在下文中一共展示了Matrix3::Get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
Matrix3 Matrix3::operator*(double factor) const
{
Matrix3 out;
int i, j;
for (i = 0; i < 3; i++)
{
for (j = 0; j < 3; j++)
{
out.Set(i, j, out.Get(i, j) * factor);
}
}
return out;
}
示例2: Get
Matrix3 Matrix3::operator*(const Matrix3& other) const
{
Matrix3 out;
int i, j, k;
double t;
for (i = 0; i < 3; i++)
{
for (j = 0; j < 3; j++)
{
t = 0.0;
for (k = 0; k < 3; k++)
{
t += Get(i, k) * other.Get(k, j);
}
out.Set(i, j, t);
}
}
return out;
}
示例3: SetMatrix
void SetMatrix(const Matrix3& mat3) {
//Set the elements of the matrix that matter (others will have been
//set to 0 in the constructor, so there isn't any need to set them
//again)
/*Calc eigenvectors here*/
evec_x=Vector3(1.0,0.0,0.0);
evec_y=Vector3(0.0,1.0,0.0);
evec_z=Vector3(0.0,0.0,1.0);
mat[0 ]=abs(mat3.Get(0,0));
mat[1 ]=abs(mat3.Get(0,1));
mat[2 ]=abs(mat3.Get(0,2));
mat[4 ]=abs(mat3.Get(1,0));
mat[5 ]=abs(mat3.Get(1,1));
mat[6 ]=abs(mat3.Get(1,2));
mat[8 ]=abs(mat3.Get(2,0));
mat[9 ]=abs(mat3.Get(2,1));
mat[10]=abs(mat3.Get(2,2));
trace=mat3.Trace();
}