3次元 or 2次元の座標を表すクラス。
More...
#include <webcface/transform.h>
|
| Point (const std::array< double, 3 > &pos={0, 0, 0}) |
| 3次元座標を初期化
|
|
| Point (const std::array< double, 2 > &pos) |
| 2次元座標を初期化
|
|
| Point (double x, double y, double z=0) |
| 2or3次元座標を初期化
|
|
template<typename R , typename traits::ArrayLikeTrait< R >::ArrayLike = traits::TraitOk, typename traits::ArraySizeTrait< R, 3 >::SizeMatchOrDynamic = traits::TraitOk> |
| Point (const R &pos) |
| 3次元座標を初期化
|
|
std::array< double, 3 > | pos () const |
| 3次元座標を取得
|
|
std::array< double, 3 > & | pos () |
| 3次元座標を取得・変更
|
|
double | pos (std::size_t index) const |
| 座標を取得
|
|
double & | pos (std::size_t i) |
| 座標を取得・変更
|
|
Point | operator+ (const Point &other) const |
| 2つのPointの x, y, z の各要素を加算したPointを返す
|
|
Point | operator- () const |
| x, y, z の各要素の符号を反転したPointを返す
|
|
Point | operator+ () const |
|
Point | operator- (const Point &other) const |
|
Point & | operator+= (const Point &other) |
|
Point & | operator-= (const Point &other) |
|
Point | operator* (double scalar) const |
| x, y, z の各要素をスカラー倍したPointを返す
|
|
Point & | operator*= (double scalar) |
|
Point | operator/ (double scalar) const |
| x, y, z の各要素をスカラーで割ったPointを返す
|
|
Point & | operator/= (double scalar) |
|
bool | operator== (const Point &other) const |
|
bool | operator!= (const Point &other) const |
|
bool | operator== (const Transform &)=delete |
|
bool | operator!= (const Transform &)=delete |
|
|
std::array< double, 3 > | pos_ |
|
3次元 or 2次元の座標を表すクラス。
- Since
- ver1.4
(ver1.6〜) 2次元の座標を表す場合にも使われ、その場合z=0とする。
◆ Point() [1/4]
Point |
( |
const std::array< double, 3 > & |
pos = {0, 0, 0} | ) |
|
|
inline |
◆ Point() [2/4]
Point |
( |
const std::array< double, 2 > & |
pos | ) |
|
|
inline |
◆ Point() [3/4]
Point |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z = 0 |
|
) |
| |
|
inline |
◆ Point() [4/4]
3次元座標を初期化
- Since
- ver2.5 std::arrayに限らず任意の配列型(固定長で3要素か、またはvectorのように可変)
- Todo:
- std::array以外の要素数2の配列の場合エラーになってしまう
◆ operator!=() [1/2]
bool operator!= |
( |
const Point & |
other | ) |
const |
|
inline |
◆ operator!=() [2/2]
◆ operator*()
Point operator* |
( |
double |
scalar | ) |
const |
|
inline |
x, y, z の各要素をスカラー倍したPointを返す
- Since
- ver2.5
◆ operator*=()
Point & operator*= |
( |
double |
scalar | ) |
|
|
inline |
◆ operator+() [1/2]
Point operator+ |
( |
| ) |
const |
|
inline |
◆ operator+() [2/2]
2つのPointの x, y, z の各要素を加算したPointを返す
- Since
- ver2.5
◆ operator+=()
◆ operator-() [1/2]
Point operator- |
( |
| ) |
const |
|
inline |
x, y, z の各要素の符号を反転したPointを返す
- Since
- ver2.5
◆ operator-() [2/2]
- Since
- ver2.5
this + (-other) と同じ。
◆ operator-=()
◆ operator/()
Point operator/ |
( |
double |
scalar | ) |
const |
|
inline |
x, y, z の各要素をスカラーで割ったPointを返す
- Since
- ver2.5
◆ operator/=()
Point & operator/= |
( |
double |
scalar | ) |
|
|
inline |
◆ operator==() [1/2]
bool operator== |
( |
const Point & |
other | ) |
const |
- (ver2.5〜) x, y, z の各要素の差が 1e-8 未満のときtrue
- (ver2.5〜) Transformとの比較は禁止
◆ operator==() [2/2]
◆ pos() [1/4]
std::array< double, 3 > & pos |
( |
| ) |
|
|
inline |
◆ pos() [2/4]
std::array< double, 3 > pos |
( |
| ) |
const |
|
inline |
◆ pos() [3/4]
double & pos |
( |
std::size_t |
i | ) |
|
|
inline |
座標を取得・変更
- Since
- ver1.6
- Parameters
-
◆ pos() [4/4]
double pos |
( |
std::size_t |
index | ) |
const |
|
inline |
座標を取得
- Since
- ver1.6
- Parameters
-
◆ operator*
Point operator* |
( |
double |
scalar, |
|
|
const Point & |
point |
|
) |
| |
|
friend |
x, y, z の各要素をスカラー倍したPointを返す
- Since
- ver2.5
◆ pos_
std::array<double, 3> pos_ |
|
protected |
The documentation for this class was generated from the following files: