mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-05 14:20:37 +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);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
return TransformationMatrix(
|
||||
|
@ -65,6 +65,9 @@ public:
|
||||
/// generates a translation matrix
|
||||
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
|
||||
static TransformationMatrix mat_rotation(double angle_rad, const Axis &axis);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user