mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-10-04 01:36:46 +08:00
add static translation via vector parameter
This commit is contained in:
parent
8388283a5d
commit
f8c6c630ff
@ -168,6 +168,14 @@ TransformationMatrix TransformationMatrix::mat_translation(double x, double y, d
|
|||||||
0.0, 0.0, 1.0, z);
|
0.0, 0.0, 1.0, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TransformationMatrix TransformationMatrix::mat_translation(const Vectorf3 &vector)
|
||||||
|
{
|
||||||
|
return TransformationMatrix(
|
||||||
|
1.0, 0.0, 0.0, vector.x,
|
||||||
|
0.0, 1.0, 0.0, vector.y,
|
||||||
|
0.0, 0.0, 1.0, vector.z);
|
||||||
|
}
|
||||||
|
|
||||||
TransformationMatrix TransformationMatrix::mat_scale(double x, double y, double z)
|
TransformationMatrix TransformationMatrix::mat_scale(double x, double y, double z)
|
||||||
{
|
{
|
||||||
return TransformationMatrix(
|
return TransformationMatrix(
|
||||||
|
@ -65,6 +65,9 @@ public:
|
|||||||
/// generates a translation matrix
|
/// generates a translation matrix
|
||||||
static TransformationMatrix mat_translation(double x, double y, double z);
|
static TransformationMatrix mat_translation(double x, double y, double z);
|
||||||
|
|
||||||
|
/// generates a translation matrix
|
||||||
|
static TransformationMatrix mat_translation(const Vectorf3 &vector);
|
||||||
|
|
||||||
/// generates a rotation matrix around coodinate axis
|
/// generates a rotation matrix around coodinate axis
|
||||||
static TransformationMatrix mat_rotation(double angle_rad, const Axis &axis);
|
static TransformationMatrix mat_rotation(double angle_rad, const Axis &axis);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user