Part: [skip ci] make arguments const references
This commit is contained in:
@@ -383,19 +383,19 @@ Geometry *Geometry::clone(void) const
|
||||
return cpy;
|
||||
}
|
||||
|
||||
void Geometry::mirror(Base::Vector3d point)
|
||||
void Geometry::mirror(const Base::Vector3d& point)
|
||||
{
|
||||
gp_Pnt pnt(point.x, point.y, point.z);
|
||||
handle()->Mirror(pnt);
|
||||
}
|
||||
|
||||
void Geometry::mirror(Base::Vector3d point, Base::Vector3d dir)
|
||||
void Geometry::mirror(const Base::Vector3d& point, const Base::Vector3d& dir)
|
||||
{
|
||||
gp_Ax1 ax1(gp_Pnt(point.x,point.y,point.z), gp_Dir(dir.x,dir.y,dir.z));
|
||||
handle()->Mirror(ax1);
|
||||
}
|
||||
|
||||
void Geometry::rotate(Base::Placement plm)
|
||||
void Geometry::rotate(const Base::Placement& plm)
|
||||
{
|
||||
Base::Rotation rot(plm.getRotation());
|
||||
Base::Vector3d pnt, dir;
|
||||
@@ -409,13 +409,13 @@ void Geometry::rotate(Base::Placement plm)
|
||||
handle()->Rotate(ax1, angle);
|
||||
}
|
||||
|
||||
void Geometry::scale(Base::Vector3d vec, double scale)
|
||||
void Geometry::scale(const Base::Vector3d& vec, double scale)
|
||||
{
|
||||
gp_Pnt pnt(vec.x, vec.y, vec.z);
|
||||
handle()->Scale(pnt, scale);
|
||||
}
|
||||
|
||||
void Geometry::transform(Base::Matrix4D mat)
|
||||
void Geometry::transform(const Base::Matrix4D& mat)
|
||||
{
|
||||
gp_Trsf trf;
|
||||
trf.SetValues(mat[0][0],mat[0][1],mat[0][2],mat[0][3],
|
||||
@@ -428,7 +428,7 @@ void Geometry::transform(Base::Matrix4D mat)
|
||||
handle()->Transform(trf);
|
||||
}
|
||||
|
||||
void Geometry::translate(Base::Vector3d vec)
|
||||
void Geometry::translate(const Base::Vector3d& vec)
|
||||
{
|
||||
gp_Vec trl(vec.x, vec.y, vec.z);
|
||||
handle()->Translate(trl);
|
||||
|
||||
@@ -111,12 +111,12 @@ public:
|
||||
void deleteExtension(Base::Type type);
|
||||
void deleteExtension(std::string name);
|
||||
|
||||
void mirror(Base::Vector3d point);
|
||||
void mirror(Base::Vector3d point, Base::Vector3d dir);
|
||||
void rotate(Base::Placement plm);
|
||||
void scale(Base::Vector3d vec, double scale);
|
||||
void transform(Base::Matrix4D mat);
|
||||
void translate(Base::Vector3d vec);
|
||||
void mirror(const Base::Vector3d& point);
|
||||
void mirror(const Base::Vector3d& point, const Base::Vector3d& dir);
|
||||
void rotate(const Base::Placement& plm);
|
||||
void scale(const Base::Vector3d& vec, double scale);
|
||||
void transform(const Base::Matrix4D& mat);
|
||||
void translate(const Base::Vector3d& vec);
|
||||
|
||||
protected:
|
||||
/// create a new tag for the geometry object
|
||||
|
||||
Reference in New Issue
Block a user