GameApi
28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
Points.hh
Go to the documentation of this file.
1
2
#include "
VectorTools.hh
"
3
4
5
struct
CoordPoints
6
{
7
Point
center
;
8
Vector
u_x
;
9
Vector
u_y
;
10
Vector
u_z
;
11
};
12
13
struct
CubePoints
14
{
15
Point
tlf
;
16
Point
trf
;
17
Point
blf
;
18
Point
brf
;
19
Point
tlb
;
20
Point
trb
;
21
Point
blb
;
22
Point
brb
;
23
};
24
25
struct
SpherePoints
26
{
27
Point
center
;
28
float
radius
;
29
};
30
31
struct
CylinderPoints
32
{
33
Point
line_1
;
34
Point
line_2
;
35
float
radius
;
36
};
37
struct
ConePoints
38
{
39
Point
line_1
;
40
Point
line_2
;
41
float
radius_1
;
42
float
radius_2
;
43
};
44
struct
LinePoints
45
{
46
Point
line_1
;
47
Point
line_2
;
48
};
49
50
struct
RectanglePoints
51
{
52
Point
tl
;
53
Point
tr
;
54
Point
bl
;
55
Point
br
;
56
};
57
58
59
60
61
//
62
// 2d shapes
63
//
64
struct
CirclePoints
65
{
66
Point2d
center
;
67
float
radius
;
68
};
69
struct
RectanglePoints2d
70
{
71
Point2d
tl
;
72
Point2d
tr
;
73
Point2d
bl
;
74
Point2d
br
;
75
};
76
77
//
78
// Functions
79
//
80
81
CubePoints
coord_cube
(
const
CoordPoints
&p)
82
{
83
CubePoints
p;
84
p.tlf = p.
center
+ -1.0*p.
u_x
+ -1.0*p.
u_y
+ -1.0*p.
u_z
;
85
p.trf = p.
center
+ 1.0*p.
u_x
+ -1.0*p.
u_y
+ -1.0*p.
u_z
;
86
p.blf = p.
center
+ -1.0*p.
u_x
+ 1.0*p.
u_y
+ -1.0*p.
u_z
;
87
p.brf = p.
center
+ 1.0*p.
u_x
+ 1.0*p.
u_y
+ -1.0*p.
u_z
;
88
p.tlb = p.
center
+ -1.0*p.
u_x
+ -1.0*p.
u_y
+ 1.0*p.
u_z
;
89
p.trb = p.
center
+ 1.0*p.
u_x
+ -1.0*p.
u_y
+ 1.0*p.
u_z
;
90
p.blb = p.
center
+ -1.0*p.
u_x
+ 1.0*p.
u_y
+ 1.0*p.
u_z
;
91
p.brb = p.
center
+ 1.0*p.
u_x
+ 1.0*p.
u_y
+ 1.0*p.
u_z
;
92
return
p;
93
}
coord_cube
CubePoints coord_cube(const CoordPoints &p)
Definition
Points.hh:81
VectorTools.hh
Vector
Definition
VectorTools.hh:125
CirclePoints
Definition
Points.hh:65
CirclePoints::center
Point2d center
Definition
Points.hh:66
CirclePoints::radius
float radius
Definition
Points.hh:67
ConePoints
Definition
Points.hh:38
ConePoints::line_1
Point line_1
Definition
Points.hh:39
ConePoints::radius_2
float radius_2
Definition
Points.hh:42
ConePoints::line_2
Point line_2
Definition
Points.hh:40
ConePoints::radius_1
float radius_1
Definition
Points.hh:41
CoordPoints
Definition
Points.hh:6
CoordPoints::center
Point center
Definition
Points.hh:7
CoordPoints::u_x
Vector u_x
Definition
Points.hh:8
CoordPoints::u_y
Vector u_y
Definition
Points.hh:9
CoordPoints::u_z
Vector u_z
Definition
Points.hh:10
CubePoints
Definition
Points.hh:14
CubePoints::blf
Point blf
Definition
Points.hh:17
CubePoints::tlb
Point tlb
Definition
Points.hh:19
CubePoints::brf
Point brf
Definition
Points.hh:18
CubePoints::blb
Point blb
Definition
Points.hh:21
CubePoints::trf
Point trf
Definition
Points.hh:16
CubePoints::tlf
Point tlf
Definition
Points.hh:15
CubePoints::brb
Point brb
Definition
Points.hh:22
CubePoints::trb
Point trb
Definition
Points.hh:20
CylinderPoints
Definition
Points.hh:32
CylinderPoints::line_2
Point line_2
Definition
Points.hh:34
CylinderPoints::line_1
Point line_1
Definition
Points.hh:33
CylinderPoints::radius
float radius
Definition
Points.hh:35
LinePoints
Definition
Points.hh:45
LinePoints::line_2
Point line_2
Definition
Points.hh:47
LinePoints::line_1
Point line_1
Definition
Points.hh:46
Point2d
Definition
VectorTools.hh:910
Point
Definition
Parser.cc:60
RectanglePoints2d
Definition
Points.hh:70
RectanglePoints2d::br
Point2d br
Definition
Points.hh:74
RectanglePoints2d::tl
Point2d tl
Definition
Points.hh:71
RectanglePoints2d::bl
Point2d bl
Definition
Points.hh:73
RectanglePoints2d::tr
Point2d tr
Definition
Points.hh:72
RectanglePoints
Definition
Points.hh:51
RectanglePoints::br
Point br
Definition
Points.hh:55
RectanglePoints::bl
Point bl
Definition
Points.hh:54
RectanglePoints::tr
Point tr
Definition
Points.hh:53
RectanglePoints::tl
Point tl
Definition
Points.hh:52
SpherePoints
Definition
Points.hh:26
SpherePoints::radius
float radius
Definition
Points.hh:28
SpherePoints::center
Point center
Definition
Points.hh:27
Points.hh
Generated by
1.15.0