chromium/ui/gfx/geometry/point3_f.h

// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_GFX_GEOMETRY_POINT3_F_H_
#define UI_GFX_GEOMETRY_POINT3_F_H_

#include <iosfwd>
#include <string>

#include "ui/gfx/geometry/geometry_export.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/vector3d_f.h"

namespace gfx {

// A point has an x, y and z coordinate.
class GEOMETRY_EXPORT Point3F {};

inline bool operator==(const Point3F& lhs, const Point3F& rhs) {}

inline bool operator!=(const Point3F& lhs, const Point3F& rhs) {}

// Add a vector to a point, producing a new point offset by the vector.
GEOMETRY_EXPORT Point3F operator+(const Point3F& lhs, const Vector3dF& rhs);

// Subtract a vector from a point, producing a new point offset by the vector's
// inverse.
GEOMETRY_EXPORT Point3F operator-(const Point3F& lhs, const Vector3dF& rhs);

// Subtract one point from another, producing a vector that represents the
// distances between the two points along each axis.
GEOMETRY_EXPORT Vector3dF operator-(const Point3F& lhs, const Point3F& rhs);

inline Point3F PointAtOffsetFromOrigin(const Vector3dF& offset) {}

inline Point3F ScalePoint(const Point3F& p,
                          float x_scale,
                          float y_scale,
                          float z_scale) {}

inline Point3F ScalePoint(const Point3F& p, const Vector3dF& v) {}

inline Point3F ScalePoint(const Point3F& p, float scale) {}

// This is declared here for use in gtest-based unit tests but is defined in
// the //ui/gfx:test_support target. Depend on that to use this in your unit
// test. This should not be used in production code - call ToString() instead.
void PrintTo(const Point3F& point, ::std::ostream* os);

}  // namespace gfx

#endif  // UI_GFX_GEOMETRY_POINT3_F_H_