mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-05 16:20:49 +08:00
Give more options for multiplication including the instance
This commit is contained in:
parent
a023cff882
commit
143270b0fc
@ -187,16 +187,26 @@ void TransformationMatrix::rotate(double q1, double q2, double q3, double q4)
|
||||
this->multiplyLeft(mat);
|
||||
}
|
||||
|
||||
void TransformationMatrix::multiplyLeft(const TransformationMatrix &left)
|
||||
void TransformationMatrix::applyLeft(const TransformationMatrix &left)
|
||||
{
|
||||
*this = multiply(left, *this);
|
||||
}
|
||||
|
||||
void TransformationMatrix::multiplyRight(const TransformationMatrix &right)
|
||||
TransformationMatrix TransformationMatrix::multiplyLeft(const TransformationMatrix &left)
|
||||
{
|
||||
return multiply(left, *this);
|
||||
}
|
||||
|
||||
void TransformationMatrix::applyRight(const TransformationMatrix &right)
|
||||
{
|
||||
*this = multiply(*this, right);
|
||||
}
|
||||
|
||||
TransformationMatrix TransformationMatrix::multiplyRight(const TransformationMatrix &right)
|
||||
{
|
||||
return multiply(*this, right);
|
||||
}
|
||||
|
||||
TransformationMatrix TransformationMatrix::multiply(const TransformationMatrix &left, const TransformationMatrix &right)
|
||||
{
|
||||
TransformationMatrix trafo;
|
||||
|
@ -71,10 +71,16 @@ public:
|
||||
void rotate(double q1, double q2, double q3, double q4);
|
||||
|
||||
/// Multiplies the Parameter-Matrix from the left (this=left*this)
|
||||
void multiplyLeft(const TransformationMatrix &left);
|
||||
void applyLeft(const TransformationMatrix &left);
|
||||
|
||||
/// Multiplies the Parameter-Matrix from the left (out=left*this)
|
||||
TransformationMatrix multiplyLeft(const TransformationMatrix &left);
|
||||
|
||||
/// Multiplies the Parameter-Matrix from the right (this=this*right)
|
||||
void multiplyRight(const TransformationMatrix &right);
|
||||
void applyRight(const TransformationMatrix &right);
|
||||
|
||||
/// Multiplies the Parameter-Matrix from the right (out=this*right)
|
||||
TransformationMatrix multiplyRight(const TransformationMatrix &right);
|
||||
|
||||
/// Generate an eye matrix.
|
||||
static TransformationMatrix mat_eye();
|
||||
|
Loading…
x
Reference in New Issue
Block a user