This source file includes following definitions.
- ToString
#include "ui/gfx/geometry/point3_f.h"
#include "base/strings/stringprintf.h"
namespace gfx {
std::string Point3F::ToString() const {
return base::StringPrintf("%f,%f,%f", x_, y_, z_);
}
Point3F operator+(const Point3F& lhs, const Vector3dF& rhs) {
float x = lhs.x() + rhs.x();
float y = lhs.y() + rhs.y();
float z = lhs.z() + rhs.z();
return Point3F(x, y, z);
}
Point3F operator-(const Point3F& lhs, const Vector3dF& rhs) {
float x = lhs.x() - rhs.x();
float y = lhs.y() - rhs.y();
float z = lhs.z() - rhs.z();
return Point3F(x, y, z);
}
Vector3dF operator-(const Point3F& lhs, const Point3F& rhs) {
float x = lhs.x() - rhs.x();
float y = lhs.y() - rhs.y();
float z = lhs.z() - rhs.z();
return Vector3dF(x, y, z);
}
}