bWidgets
Core widget toolkit designed for Blender
bwPoint.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5namespace bWidgets {
6
7class bwPoint {
8 public:
9 bwPoint(float x = 0, float y = 0);
10
11 auto operator==(const bwPoint& rhs) const -> bool;
12
13 float x, y;
14};
15
16auto operator*(const bwPoint&, float) -> bwPoint;
17auto operator*(float, const bwPoint&) -> bwPoint;
18auto operator+(const bwPoint&, const bwPoint&) -> bwPoint;
19auto operator-(const bwPoint&, const bwPoint&) -> bwPoint;
20
21auto distance(bwPoint a, bwPoint b) -> float;
22
23} // namespace bWidgets
Definition: bwPoint.h:7
bwPoint(float x=0, float y=0)
Definition: bwPoint.cc:7
auto operator==(const bwPoint &rhs) const -> bool
Definition: bwPoint.cc:11
float y
Definition: bwPoint.h:13
float x
Definition: bwPoint.h:13
Definition: bwContext.h:3
auto operator+(const bwPoint &lhs, const bwPoint &rhs) -> bwPoint
Definition: bwPoint.cc:24
auto distance(bwPoint a, bwPoint b) -> float
Definition: bwPoint.cc:33
auto operator*(const bwPoint &lhs, float factor) -> bwPoint
Definition: bwPoint.cc:16
auto operator-(const bwPoint &lhs, const bwPoint &rhs) -> bwPoint
Definition: bwPoint.cc:28