NANA
首页
模块
类
文件
文件列表
文件成员
NANA
modules
computergeometry
include
computergeometry
geometrytypes.hpp
浏览该文件的文档.
1
#pragma once
2
21
namespace
NANA {
22
namespace
ComputerGeometry {
25
28
template
<
typename
_Tp>
29
struct
Line2D_
{
30
union
{
31
struct
{
32
_Tp x, y, dx, dy;
33
};
34
_Tp data[4];
35
};
36
37
};
38
42
template
<
typename
_Tp>
43
struct
Line3D_
{
44
union
{
45
struct
{
46
_Tp x, y,z, dx, dy,dz;
47
};
48
_Tp data[6];
49
};
50
};
51
55
template
<
typename
_Tp>
56
struct
PointXY_
{
57
PointXY_
(_Tp _x, _Tp _y) {
58
x = _x;
59
y = _y;
60
data[2] =
static_cast<
_Tp
>
(1);
61
}
62
union
{
63
struct
{
64
_Tp x, y;
65
};
66
_Tp data[3];
67
};
68
};
69
70
74
template
<
typename
_Tp>
75
struct
PointXYZ_
{
76
PointXYZ_
(_Tp _x, _Tp _y, _Tp _z) {
77
x
= _x;
78
y
= _y;
79
z
= _z;
80
data
[3] =
static_cast<
_Tp
>
(1);
81
}
82
union
{
83
struct
{
84
_Tp
x
;
85
_Tp
y
;
86
_Tp
z
;
87
};
88
_Tp
data
[4];
89
90
};
91
};
92
96
template
<
typename
_Tp>
97
struct
Rect_
{
98
_Tp x, y, w, h;
99
};
100
109
template
<
typename
_Tp>
110
struct
Plane_
{
111
union
{
112
struct
{
113
_Tp a;
114
_Tp b;
115
_Tp c;
116
_Tp d;
117
};
118
_Tp
data
[4];
119
};
120
};
121
123
124
125
}
126
}
NANA::ComputerGeometry::Line2D_
2D直线
Definition:
geometrytypes.hpp:29
NANA::ComputerGeometry::Line3D_
3D直线
Definition:
geometrytypes.hpp:43
NANA::ComputerGeometry::Plane_
自定义平面类
Definition:
geometrytypes.hpp:110
NANA::ComputerGeometry::Plane_::data
_Tp data[4]
数据部分
Definition:
geometrytypes.hpp:118
NANA::ComputerGeometry::PointXY_
2D点集
Definition:
geometrytypes.hpp:56
NANA::ComputerGeometry::PointXYZ_
3D点集
Definition:
geometrytypes.hpp:75
NANA::ComputerGeometry::PointXYZ_::x
_Tp x
x坐标
Definition:
geometrytypes.hpp:84
NANA::ComputerGeometry::PointXYZ_::y
_Tp y
y坐标
Definition:
geometrytypes.hpp:85
NANA::ComputerGeometry::PointXYZ_::data
_Tp data[4]
数据部分
Definition:
geometrytypes.hpp:88
NANA::ComputerGeometry::PointXYZ_::z
_Tp z
z坐标
Definition:
geometrytypes.hpp:86
NANA::ComputerGeometry::Rect_
正矩形
Definition:
geometrytypes.hpp:97
制作者
1.9.2