Compare commits
3723 Commits
RELEASE_0_
...
version/2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5818366d92 | ||
|
|
e5bca74b9d | ||
|
|
82dd1e4be9 | ||
|
|
d0b77639c2 | ||
|
|
6edb0f66d5 | ||
|
|
c458c13af7 | ||
|
|
bb7875edd4 | ||
|
|
6f54fb90eb | ||
|
|
4d1e7c536f | ||
|
|
59cc200f92 | ||
|
|
c6093430ae | ||
|
|
23172bcdd0 | ||
|
|
aea2dab0d7 | ||
|
|
4d26e144ab | ||
|
|
c391fcd345 | ||
|
|
ece743342a | ||
|
|
02babbe340 | ||
|
|
e27b6d050c | ||
|
|
86e2de8d10 | ||
|
|
b4526f926d | ||
|
|
14f04878d1 | ||
|
|
830fb3b752 | ||
|
|
9a336da359 | ||
|
|
6cec49ce7e | ||
|
|
6c28edea55 | ||
|
|
d7870d672e | ||
|
|
5bd9228b4a | ||
|
|
6392cf5a2f | ||
|
|
6a2e2b704e | ||
|
|
ecec803388 | ||
|
|
848965e7f0 | ||
|
|
478af5f01e | ||
|
|
14decb7387 | ||
|
|
323d0d5ba0 | ||
|
|
9bfa6ac1a1 | ||
|
|
c8af817eeb | ||
|
|
d24d3ce487 | ||
|
|
60a81dfbd8 | ||
|
|
8896a59dff | ||
|
|
7fe16d99be | ||
|
|
c3af88dfc1 | ||
|
|
5c8f0cc966 | ||
|
|
2a6c50c893 | ||
|
|
7a8d796ac1 | ||
|
|
8b3b71bce3 | ||
|
|
83da4e9248 | ||
|
|
2c879095d9 | ||
|
|
13344fbb62 | ||
|
|
2fe9ad595f | ||
|
|
0f798289f0 | ||
|
|
01104cc1d3 | ||
|
|
d61b5827fd | ||
|
|
d18cc81531 | ||
|
|
c96d7ae226 | ||
|
|
9535aef59b | ||
|
|
82f6fca06f | ||
|
|
627b36a53b | ||
|
|
2af78a3874 | ||
|
|
7c7109edf4 | ||
|
|
0fa23b83e6 | ||
|
|
e53c71543a | ||
|
|
fa64f7b6aa | ||
|
|
eaac3a64f8 | ||
|
|
4eabc45dfc | ||
|
|
5c5e2a0f2f | ||
|
|
559a5d146a | ||
|
|
df46c58cb8 | ||
|
|
1f43132363 | ||
|
|
17369a20de | ||
|
|
c83dae4c70 | ||
|
|
c2f44a51c4 | ||
|
|
3da44d1215 | ||
|
|
f6709e357f | ||
|
|
45d5511fd7 | ||
|
|
198c5d23fd | ||
|
|
c41caeaf64 | ||
|
|
b6c542b0e7 | ||
|
|
2d62275a08 | ||
|
|
971ea81861 | ||
|
|
9e9cc7859c | ||
|
|
8898f5fe52 | ||
|
|
40be69ae8e | ||
|
|
17eec81071 | ||
|
|
c9bbbd18ec | ||
|
|
e08eda18d5 | ||
|
|
d2c03a6651 | ||
|
|
0a1e920659 | ||
|
|
cd58df820e | ||
|
|
1a5467aec8 | ||
|
|
0dcb64dca3 | ||
|
|
b703102d9b | ||
|
|
3c2ef75b50 | ||
|
|
4fa530354d | ||
|
|
eeeb30dc3f | ||
|
|
870fc2e53e | ||
|
|
79ae0da927 | ||
|
|
e179bda57a | ||
|
|
8e0c15e32e | ||
|
|
ff844f6760 | ||
|
|
bc96ac85f4 | ||
|
|
33b328e3d5 | ||
|
|
dcda8d1c7a | ||
|
|
5fd2bd225f | ||
|
|
2db8859076 | ||
|
|
6eff167a28 | ||
|
|
9fecb69b84 | ||
|
|
0539aa38e5 | ||
|
|
fe9caad391 | ||
|
|
ceae2928aa | ||
|
|
0e6934abe5 | ||
|
|
a2e7c92f99 | ||
|
|
643a8717b4 | ||
|
|
f21127fd4a | ||
|
|
0bc8005100 | ||
|
|
67efc1f68f | ||
|
|
dfebf60e68 | ||
|
|
26e7d134ce | ||
|
|
c414242f13 | ||
|
|
33e60725b1 | ||
|
|
f21b0985cc | ||
|
|
71e9548c20 | ||
|
|
fc64abea5c | ||
|
|
413e89c955 | ||
|
|
439041c2f4 | ||
|
|
530de4d809 | ||
|
|
5e45bdeeda | ||
|
|
081eba903f | ||
|
|
0def045611 | ||
|
|
e20cc6a90f | ||
|
|
7dd83dd2d1 | ||
|
|
1240807b9f | ||
|
|
ad7d6624de | ||
|
|
06b089ba13 | ||
|
|
e1302bcf17 | ||
|
|
cfdc7db79a | ||
|
|
50de873453 | ||
|
|
a4ae7b2059 | ||
|
|
d90abdcb44 | ||
|
|
4a31045fd9 | ||
|
|
249155987d | ||
|
|
2ae7fc244b | ||
|
|
fafa70c6bc | ||
|
|
49162a7a64 | ||
|
|
328e6b3e28 | ||
|
|
5441db9b18 | ||
|
|
06bfa4f1a1 | ||
|
|
a530712491 | ||
|
|
3c8cfe9b76 | ||
|
|
57b4ce96e4 | ||
|
|
63c7d64143 | ||
|
|
1784327c47 | ||
|
|
a63ec83d5f | ||
|
|
d661516b02 | ||
|
|
ba020245f9 | ||
|
|
79fefc1ff9 | ||
|
|
eac169b6da | ||
|
|
a60d293759 | ||
|
|
b0063f8db6 | ||
|
|
632abdd87b | ||
|
|
d9b01ca5de | ||
|
|
adb7db9229 | ||
|
|
e4f7aec965 | ||
|
|
768a8c1062 | ||
|
|
318c5000ce | ||
|
|
70f334e1a3 | ||
|
|
279b53a705 | ||
|
|
a72a3ce5f3 | ||
|
|
979aea5212 | ||
|
|
34d3c63384 | ||
|
|
cf4af2692b | ||
|
|
d335ca5a8d | ||
|
|
9cac2c1457 | ||
|
|
523b992b4c | ||
|
|
02be490466 | ||
|
|
45ae3978f6 | ||
|
|
f983194d7e | ||
|
|
ab8373b989 | ||
|
|
4bef2c48eb | ||
|
|
21e2a769eb | ||
|
|
fd8369142a | ||
|
|
5dea221ad5 | ||
|
|
235c29913a | ||
|
|
0870407f65 | ||
|
|
e8156c6bd9 | ||
|
|
e7f9486aa1 | ||
|
|
53b9fd2110 | ||
|
|
4d4e474464 | ||
|
|
a58b41e7d2 | ||
|
|
4db05e97c5 | ||
|
|
3a668232c8 | ||
|
|
d2622a5d86 | ||
|
|
d11db8a67a | ||
|
|
98b6102e56 | ||
|
|
0db8613a21 | ||
|
|
94a6cb2cff | ||
|
|
5b92575ed3 | ||
|
|
47b02c0480 | ||
|
|
691be54ca2 | ||
|
|
22ea8ebe25 | ||
|
|
bd71635c49 | ||
|
|
830bc3eac3 | ||
|
|
2d72bf4308 | ||
|
|
f4e694afa7 | ||
|
|
55610bae70 | ||
|
|
08351e0df2 | ||
|
|
7489771ad2 | ||
|
|
ea8023e51f | ||
|
|
8a9693a28e | ||
|
|
724fba4af9 | ||
|
|
beca1cbf96 | ||
|
|
b74d2ae9fa | ||
|
|
ec82a0154b | ||
|
|
0ea8dbea10 | ||
|
|
a131f44247 | ||
|
|
0423aedffc | ||
|
|
afc89cdd95 | ||
|
|
541606e00d | ||
|
|
c53fd5fc9a | ||
|
|
bc3dd06b26 | ||
|
|
fd39808ed8 | ||
|
|
a1b7cb5330 | ||
|
|
ac27fae712 | ||
|
|
f6270ec395 | ||
|
|
e9c70f8b1c | ||
|
|
50688e1159 | ||
|
|
8417fea3bf | ||
|
|
f5150d32af | ||
|
|
2263823f75 | ||
|
|
a882263033 | ||
|
|
24d2431522 | ||
|
|
fd27e7bd43 | ||
|
|
4dfe36cdc1 | ||
|
|
fc49be1e05 | ||
|
|
d06d94c767 | ||
|
|
66786651b0 | ||
|
|
e9b499b82d | ||
|
|
e6e3e686c6 | ||
|
|
1e6ba0cdc4 | ||
|
|
75db4c29b8 | ||
|
|
914d3e6a2b | ||
|
|
ff678a5ad7 | ||
|
|
46442ef50c | ||
|
|
7d8fde82e6 | ||
|
|
99cf057906 | ||
|
|
59d3d66f91 | ||
|
|
be73c0fe43 | ||
|
|
e5afc6f029 | ||
|
|
8816d0a9ac | ||
|
|
229837b14c | ||
|
|
94b068a40f | ||
|
|
2f0dfc4d74 | ||
|
|
3391c44107 | ||
|
|
35aae588b8 | ||
|
|
c19585e22a | ||
|
|
77946585b1 | ||
|
|
88a35fd162 | ||
|
|
7d8d4a03fb | ||
|
|
1a68d34663 | ||
|
|
72a0ff706d | ||
|
|
420e43d47d | ||
|
|
3c749d4774 | ||
|
|
d4310a7f3b | ||
|
|
f892d88c10 | ||
|
|
d226709836 | ||
|
|
fbfd03fe5c | ||
|
|
f513001798 | ||
|
|
31aa0ddabe | ||
|
|
767184cf3c | ||
|
|
fe86a9ed02 | ||
|
|
9be53e746f | ||
|
|
8b6f50d0cc | ||
|
|
80dc28bfb5 | ||
|
|
983e1abf48 | ||
|
|
ff65b82671 | ||
|
|
0b26c69222 | ||
|
|
904d714d6d | ||
|
|
2aed93a576 | ||
|
|
d1af42e9ad | ||
|
|
9f31addfa5 | ||
|
|
d56ea7e6c4 | ||
|
|
1cbe271ad5 | ||
|
|
33db3c377f | ||
|
|
a0535ef64d | ||
|
|
392ba18ff7 | ||
|
|
e872f9e928 | ||
|
|
04685a8179 | ||
|
|
55fbe68e62 | ||
|
|
f51e1f0cc8 | ||
|
|
d31b62d44d | ||
|
|
9fd90e26f7 | ||
|
|
dbea0c9361 | ||
|
|
201cb61f84 | ||
|
|
71141e830a | ||
|
|
7dc8bf3aa4 | ||
|
|
0fef94cfdb | ||
|
|
a9b45967ce | ||
|
|
0928bca531 | ||
|
|
77f73a79df | ||
|
|
279445d6bc | ||
|
|
54778ee1e1 | ||
|
|
4efcda534d | ||
|
|
45ac5cb2fa | ||
|
|
6d045a9403 | ||
|
|
8c57a77d7e | ||
|
|
1f585d6719 | ||
|
|
6c111f55aa | ||
|
|
b01693f426 | ||
|
|
e37232aeb4 | ||
|
|
1c1c7dad7b | ||
|
|
b70b81f4cc | ||
|
|
e3cf41a666 | ||
|
|
851a307c23 | ||
|
|
183d3749f0 | ||
|
|
3fe513f9e0 | ||
|
|
81bee2bbc6 | ||
|
|
34719da000 | ||
|
|
df8a3d9c60 | ||
|
|
53dea9b069 | ||
|
|
186bae2bd4 | ||
|
|
f83c8828f0 | ||
|
|
509d064286 | ||
|
|
2d039e393a | ||
|
|
9ab88d9387 | ||
|
|
882a2a0e52 | ||
|
|
c6ce1d8c67 | ||
|
|
77e1a2e4be | ||
|
|
b99f53fda3 | ||
|
|
a7f64cf7aa | ||
|
|
8ebc0f2b24 | ||
|
|
5330dc34bc | ||
|
|
4854a9e320 | ||
|
|
71be1a9e28 | ||
|
|
d0ae09c7e2 | ||
|
|
a25bd06138 | ||
|
|
1b55076897 | ||
|
|
5eac7974c9 | ||
|
|
3afd6e9f51 | ||
|
|
05c107ba9c | ||
|
|
99b00daf87 | ||
|
|
8ddb99f62f | ||
|
|
47dec485e5 | ||
|
|
f191b4f35c | ||
|
|
e24e3c0612 | ||
|
|
1dfac0a8b9 | ||
|
|
f5cc151618 | ||
|
|
1ff3a61de6 | ||
|
|
81d5b651d2 | ||
|
|
ea4ed7cdd1 | ||
|
|
e30ea5206f | ||
|
|
c188f6e3cb | ||
|
|
2fb8999ac2 | ||
|
|
9c9bfc1a98 | ||
|
|
f7a87789ab | ||
|
|
7bcf02a0b4 | ||
|
|
fcd1733787 | ||
|
|
c04ec5953f | ||
|
|
63aa16b97c | ||
|
|
cafbf860be | ||
|
|
700b0bc776 | ||
|
|
98ca36e8f5 | ||
|
|
25130e3c82 | ||
|
|
dc463d1c2c | ||
|
|
89d30acbc5 | ||
|
|
be405d2311 | ||
|
|
acbe42775c | ||
|
|
42d8772dd6 | ||
|
|
81ef922f02 | ||
|
|
d6e18c8a35 | ||
|
|
4993a5c6c0 | ||
|
|
052382af89 | ||
|
|
18f7102461 | ||
|
|
ddbb2bea8a | ||
|
|
27131b43cb | ||
|
|
e8c2483432 | ||
|
|
fd495574a4 | ||
|
|
12f85b3d1f | ||
|
|
47d88bcfa7 | ||
|
|
e4dacaf0d2 | ||
|
|
2906a2d007 | ||
|
|
3000fdc33c | ||
|
|
076bde34a2 | ||
|
|
836c563c89 | ||
|
|
78c0419007 | ||
|
|
9dd5b91cea | ||
|
|
b4c8b00c0e | ||
|
|
430e72b424 | ||
|
|
135a8102f0 | ||
|
|
c9cf4ad02a | ||
|
|
3001809bc3 | ||
|
|
9e77ff328e | ||
|
|
efddcb18a3 | ||
|
|
54ff2bec90 | ||
|
|
287ed83de7 | ||
|
|
dd13924a67 | ||
|
|
a050a3b80f | ||
|
|
f1201eaebc | ||
|
|
68dd50ecbc | ||
|
|
2129cf5aa6 | ||
|
|
cf1bdcef46 | ||
|
|
7a879e2abf | ||
|
|
22878b6f89 | ||
|
|
e99064ca18 | ||
|
|
b93661508e | ||
|
|
27ade6c420 | ||
|
|
473249d605 | ||
|
|
62cf65ce0f | ||
|
|
c4f6aa2f90 | ||
|
|
9ca112c362 | ||
|
|
cdcc17ee37 | ||
|
|
4f3e1587b1 | ||
|
|
b18c92f515 | ||
|
|
3270edcf87 | ||
|
|
c0e8dd97ae | ||
|
|
3a0ae3df58 | ||
|
|
d6361dfee4 | ||
|
|
b61692b667 | ||
|
|
2815688c7e | ||
|
|
78a78a17cc | ||
|
|
e202d4e4a5 | ||
|
|
8b585db238 | ||
|
|
e288549c9e | ||
|
|
f71f129e3b | ||
|
|
ee688166ab | ||
|
|
ed66c37de2 | ||
|
|
a5c6f8023b | ||
|
|
c82da8c9c8 | ||
|
|
07d1358e08 | ||
|
|
1212109c03 | ||
|
|
d4db4fcac3 | ||
|
|
1f46c79396 | ||
|
|
199419ae62 | ||
|
|
39a4d55866 | ||
|
|
c84e1d0f0e | ||
|
|
302deeb122 | ||
|
|
b2a6cdec4e | ||
|
|
87676fad4d | ||
|
|
75087095b1 | ||
|
|
d0a5032723 | ||
|
|
2d6a7c2cf7 | ||
|
|
56e9158dee | ||
|
|
3ba312116b | ||
|
|
e6ab3ddb7d | ||
|
|
8ed0fec364 | ||
|
|
ddfdbd75b8 | ||
|
|
00e21af5bb | ||
|
|
51a17a7a0f | ||
|
|
fa58672f09 | ||
|
|
4f7f5023df | ||
|
|
4838a9690e | ||
|
|
edcbfb52eb | ||
|
|
5af8bb7c8e | ||
|
|
3fa835d74c | ||
|
|
035ff3e1ea | ||
|
|
2c54237fe5 | ||
|
|
00c61204a4 | ||
|
|
284aa3a444 | ||
|
|
f0b7a27fd4 | ||
|
|
a781eea10e | ||
|
|
8e42e5bdba | ||
|
|
ad4a9eeaa5 | ||
|
|
190e6b3958 | ||
|
|
8a33223483 | ||
|
|
0e4eab1569 | ||
|
|
9d6e27c85c | ||
|
|
9720f8ca16 | ||
|
|
5b3dccc1f7 | ||
|
|
e0df014acf | ||
|
|
de3d433ead | ||
|
|
3407db3dd6 | ||
|
|
b10a40ff8d | ||
|
|
ec22623f1c | ||
|
|
7e8fb16507 | ||
|
|
a634d7c361 | ||
|
|
aae77a7983 | ||
|
|
3f6f34e7e1 | ||
|
|
eff1541ba3 | ||
|
|
e7e06c89e1 | ||
|
|
a41d5b1609 | ||
|
|
edbea633f3 | ||
|
|
950af5375c | ||
|
|
c6d2e32f05 | ||
|
|
3796ce4d86 | ||
|
|
ffb67f4014 | ||
|
|
d479686804 | ||
|
|
1387f47a79 | ||
|
|
65784896e1 | ||
|
|
e692e7c119 | ||
|
|
23d4628d88 | ||
|
|
38c335c339 | ||
|
|
e69d1b5a82 | ||
|
|
6695b918ea | ||
|
|
2b9072417b | ||
|
|
6cf2224146 | ||
|
|
a1f74729ab | ||
|
|
71443d1c9a | ||
|
|
a83f5deaac | ||
|
|
234e778e8f | ||
|
|
0bdeaeb4e2 | ||
|
|
cc37713a66 | ||
|
|
6129de31f0 | ||
|
|
0908f86714 | ||
|
|
31ed79fe43 | ||
|
|
1af2ad12bf | ||
|
|
44db6d9e44 | ||
|
|
6e662fe4d6 | ||
|
|
067ff4f8ed | ||
|
|
91cf3d4def | ||
|
|
1eb846a93a | ||
|
|
56661afc05 | ||
|
|
655971208f | ||
|
|
d3ab2d3fbc | ||
|
|
65aca6607e | ||
|
|
e44eb39046 | ||
|
|
ab7d2a4bcc | ||
|
|
87c744b88b | ||
|
|
dfc4b1564f | ||
|
|
db6e99f885 | ||
|
|
35681e3adf | ||
|
|
a5ca531aac | ||
|
|
2daf895d00 | ||
|
|
1041445a22 | ||
|
|
f712bc9294 | ||
|
|
2d174d0b14 | ||
|
|
dd54f6938e | ||
|
|
6e0e74a7d9 | ||
|
|
6a90696820 | ||
|
|
f9bf403fc0 | ||
|
|
0c13fb7ae4 | ||
|
|
9a113bdb44 | ||
|
|
69ef461e6d | ||
|
|
4abcf3215f | ||
|
|
4b607d6484 | ||
|
|
fe8ba57c94 | ||
|
|
de191107a9 | ||
|
|
77b8b278ea | ||
|
|
4758447370 | ||
|
|
77909577e4 | ||
|
|
1a835a2e1b | ||
|
|
8d0330675a | ||
|
|
95a9d7a229 | ||
|
|
2fed46e222 | ||
|
|
9ad070871a | ||
|
|
b95fb48a16 | ||
|
|
29462005b7 | ||
|
|
4de05629ee | ||
|
|
2b62411a78 | ||
|
|
6fa4c7e138 | ||
|
|
ece38a6dbf | ||
|
|
a592488f3e | ||
|
|
191675cc79 | ||
|
|
df2e5bf39f | ||
|
|
ac29faf3bb | ||
|
|
94eabf6220 | ||
|
|
40bc0cbd48 | ||
|
|
b55e9df70a | ||
|
|
986d2cc42a | ||
|
|
0b8bfd9ed8 | ||
|
|
eff0c610e2 | ||
|
|
ca97e67511 | ||
|
|
47c2dce26d | ||
|
|
619163d40e | ||
|
|
b11c13fb9f | ||
|
|
a5435b7d8c | ||
|
|
b5fb829468 | ||
|
|
43fceaf3a4 | ||
|
|
8cb8395a24 | ||
|
|
2a2be51b8f | ||
|
|
5a5d65134e | ||
|
|
0a96f4e145 | ||
|
|
ba21713329 | ||
|
|
32ef925a79 | ||
|
|
c62c778c88 | ||
|
|
2f0a6fdb67 | ||
|
|
70ec13e10b | ||
|
|
3693e3600c | ||
|
|
69debc6777 | ||
|
|
84d7488061 | ||
|
|
fbb7c84409 | ||
|
|
a7379c88f4 | ||
|
|
cc8977b83d | ||
|
|
50380bc6c5 | ||
|
|
92074f0d3c | ||
|
|
1e889c4d07 | ||
|
|
617a09d89a | ||
|
|
2af409f54d | ||
|
|
6d3766e913 | ||
|
|
9b130f099f | ||
|
|
20414e6ef4 | ||
|
|
78645169bf | ||
|
|
a276e7e379 | ||
|
|
1dfde64ac2 | ||
|
|
1fa27f2d19 | ||
|
|
2822006d01 | ||
|
|
288e63f0d8 | ||
|
|
66c9187c95 | ||
|
|
cbf8687e3d | ||
|
|
c9a80caff5 | ||
|
|
f9857235fc | ||
|
|
c595a276a0 | ||
|
|
b582cd230e | ||
|
|
ad6c04489c | ||
|
|
ec7e59eda1 | ||
|
|
d929323e93 | ||
|
|
5a96b283f6 | ||
|
|
d393e4a019 | ||
|
|
9700e46e47 | ||
|
|
036c0034c3 | ||
|
|
f5067b058c | ||
|
|
0d9b247da1 | ||
|
|
a2b75e0d7a | ||
|
|
c9165a565b | ||
|
|
49d8b96768 | ||
|
|
5ad6eb937b | ||
|
|
f66e023ea8 | ||
|
|
72f1538ac2 | ||
|
|
4e24095d8b | ||
|
|
1473eabc7c | ||
|
|
11fd888ed8 | ||
|
|
8c78588ee1 | ||
|
|
c74e212494 | ||
|
|
13f96cdcc9 | ||
|
|
86e32035d7 | ||
|
|
80274596df | ||
|
|
2cc5e776b3 | ||
|
|
57a3b0fd1e | ||
|
|
9414874e1d | ||
|
|
9e46820c57 | ||
|
|
3020990121 | ||
|
|
27219e0f58 | ||
|
|
098441f5fb | ||
|
|
a07ca86207 | ||
|
|
e4e3760b3d | ||
|
|
811147d08e | ||
|
|
a563cfd0f2 | ||
|
|
92f7445bb9 | ||
|
|
a72d858034 | ||
|
|
39d45e9e0a | ||
|
|
4fae9039c1 | ||
|
|
124db3da8e | ||
|
|
4bf4091ef7 | ||
|
|
b7fa1d4f02 | ||
|
|
f1c2afacc4 | ||
|
|
8aed0e75df | ||
|
|
cf2619613d | ||
|
|
2a9d39f201 | ||
|
|
ae0b8eb3b3 | ||
|
|
63081c94a1 | ||
|
|
c39926dd72 | ||
|
|
4683e7e9c9 | ||
|
|
dc9163f801 | ||
|
|
42cc699263 | ||
|
|
37457fcb33 | ||
|
|
441dc41715 | ||
|
|
811f156ad1 | ||
|
|
2a0e9d31e1 | ||
|
|
c473cd7213 | ||
|
|
1af8aacd1d | ||
|
|
5eb9acd8b6 | ||
|
|
6bc9eb950f | ||
|
|
593c884f14 | ||
|
|
9d20de068c | ||
|
|
96c2e4d3ab | ||
|
|
165d2ea978 | ||
|
|
0702272097 | ||
|
|
965c8ccfd2 | ||
|
|
b20a49b018 | ||
|
|
5a6b760847 | ||
|
|
7e2dc443ec | ||
|
|
21f2e1f250 | ||
|
|
cee8c5b5c7 | ||
|
|
7ee2633164 | ||
|
|
6c31a721b8 | ||
|
|
8fc97ea1ce | ||
|
|
423eba3733 | ||
|
|
49a23fdc2e | ||
|
|
fddac2443d | ||
|
|
182037ad67 | ||
|
|
5923956045 | ||
|
|
a89b9f6158 | ||
|
|
d7931a28ce | ||
|
|
cc47d33b32 | ||
|
|
68625e48b9 | ||
|
|
3496d64a52 | ||
|
|
f97ced2240 | ||
|
|
3d44f1c825 | ||
|
|
306c58e7ed | ||
|
|
82588b0daf | ||
|
|
aef8f13290 | ||
|
|
4ae7c90d49 | ||
|
|
cc2234bf54 | ||
|
|
368d280da2 | ||
|
|
4faf727f1b | ||
|
|
f28e472f59 | ||
|
|
69c5d5c86e | ||
|
|
f9332b813e | ||
|
|
052ce499c9 | ||
|
|
54db2e0ab1 | ||
|
|
b261836f71 | ||
|
|
a0290954d6 | ||
|
|
112eb04079 | ||
|
|
057cbe7cc3 | ||
|
|
945a9e0ac2 | ||
|
|
a92ea7f822 | ||
|
|
b57b223a59 | ||
|
|
f377c75dbd | ||
|
|
8d3de8dee5 | ||
|
|
cfdf992600 | ||
|
|
fd8c677b87 | ||
|
|
ff2eb6d2d3 | ||
|
|
97fcf48caa | ||
|
|
e17b3a753e | ||
|
|
865b0a3e56 | ||
|
|
0d1ddc5f44 | ||
|
|
6780a0c8d4 | ||
|
|
fee652d54a | ||
|
|
42b7c48671 | ||
|
|
75afee59c3 | ||
|
|
ae3f718fe3 | ||
|
|
4b02335637 | ||
|
|
7a52c2fa71 | ||
|
|
ec5d067d28 | ||
|
|
3c9fec78fa | ||
|
|
0a08ee836c | ||
|
|
5f804cb0eb | ||
|
|
a0fd942048 | ||
|
|
dad1577fe3 | ||
|
|
338f2311d4 | ||
|
|
27a1c0288b | ||
|
|
dd45be518f | ||
|
|
a9c058ba9d | ||
|
|
3e07423778 | ||
|
|
63ccb3df4c | ||
|
|
906ef85d90 | ||
|
|
895edf4f17 | ||
|
|
ff1c035d42 | ||
|
|
f61fe80f60 | ||
|
|
dfbdcc1bf0 | ||
|
|
b09636f5ca | ||
|
|
8727e609f0 | ||
|
|
40fc2907a1 | ||
|
|
81fd5535fc | ||
|
|
ad079b8ed4 | ||
|
|
a543560f7d | ||
|
|
bb2cc6ef2d | ||
|
|
977f23f0e7 | ||
|
|
24c047c94e | ||
|
|
22b4aa4d8b | ||
|
|
110753e92c | ||
|
|
be70656745 | ||
|
|
d36e13e8ed | ||
|
|
2e9896a9ab | ||
|
|
ee06ec0c40 | ||
|
|
aa0e3e3c9f | ||
|
|
3477e1a4f5 | ||
|
|
a4b788980c | ||
|
|
519a843340 | ||
|
|
269299d913 | ||
|
|
cc4b16b50d | ||
|
|
d10bcc8a53 | ||
|
|
92db9682e0 | ||
|
|
cd773e4764 | ||
|
|
f14ffd5b1d | ||
|
|
e34f597fe2 | ||
|
|
95ddc04a73 | ||
|
|
c6d5cbd52c | ||
|
|
75b695664a | ||
|
|
59ecf48b72 | ||
|
|
2fb13c76f5 | ||
|
|
7438aea869 | ||
|
|
83772c87ac | ||
|
|
6250f675db | ||
|
|
a31639682b | ||
|
|
576979c562 | ||
|
|
c53989adb8 | ||
|
|
a1bb62f43c | ||
|
|
5eec2e7889 | ||
|
|
f4bb236c04 | ||
|
|
c82df0590d | ||
|
|
43e13f0cf2 | ||
|
|
63a8209a83 | ||
|
|
7984f055e2 | ||
|
|
3104898c7c | ||
|
|
8cb716fe8e | ||
|
|
9cdf5ab9a1 | ||
|
|
bcf7ed501d | ||
|
|
09b0dd2b2d | ||
|
|
04a47dfb8d | ||
|
|
bc9b3f6ff1 | ||
|
|
086a30e61a | ||
|
|
cd8e7a1030 | ||
|
|
8e92c5d985 | ||
|
|
5708ec5a89 | ||
|
|
f665431132 | ||
|
|
9e27511ef9 | ||
|
|
344f876b0a | ||
|
|
10217a3b19 | ||
|
|
778cc4c435 | ||
|
|
bd999ca090 | ||
|
|
4d9980b0e6 | ||
|
|
a459b8fdbb | ||
|
|
c925c02e69 | ||
|
|
4566bece90 | ||
|
|
403b7c14aa | ||
|
|
b3e07077fa | ||
|
|
f7cee2ed56 | ||
|
|
b7173100c8 | ||
|
|
cb496379bc | ||
|
|
c37b9c95e6 | ||
|
|
919e01f26e | ||
|
|
cad21935d6 | ||
|
|
d290fdfc5f | ||
|
|
c77161e2b0 | ||
|
|
d2dfb81a09 | ||
|
|
4acf7ce840 | ||
|
|
2f6b84a2cc | ||
|
|
2c00a4ac35 | ||
|
|
c27ca18674 | ||
|
|
7c7f3d4fcd | ||
|
|
8fba4b0cbe | ||
|
|
b0015ab6e8 | ||
|
|
3a210d6fa6 | ||
|
|
b5a4a55370 | ||
|
|
35a449c7d0 | ||
|
|
1305e16425 | ||
|
|
08003ceba9 | ||
|
|
059db643bc | ||
|
|
39731debdc | ||
|
|
9ef56cbc48 | ||
|
|
becea84955 | ||
|
|
ceac7b46fc | ||
|
|
594095a363 | ||
|
|
3397066343 | ||
|
|
d1d8c68bf1 | ||
|
|
d37bf8a4ae | ||
|
|
e4e31be7d4 | ||
|
|
5ede8c12ba | ||
|
|
db509f4075 | ||
|
|
85e58b4a49 | ||
|
|
64b6a4ebf2 | ||
|
|
a0c48de39d | ||
|
|
d9a281c493 | ||
|
|
eb52f38c47 | ||
|
|
c1f51d5be7 | ||
|
|
08cb2039c5 | ||
|
|
6485ea4051 | ||
|
|
aa9e91f926 | ||
|
|
70ac6614e8 | ||
|
|
64ce231705 | ||
|
|
7a98f89e1b | ||
|
|
264e336a49 | ||
|
|
595328963a | ||
|
|
d951a55be0 | ||
|
|
7ffc84fb86 | ||
|
|
5871b54172 | ||
|
|
92976b7735 | ||
|
|
2e13c1fa4b | ||
|
|
b5134f15b4 | ||
|
|
bcb320b537 | ||
|
|
1475964145 | ||
|
|
1802ccf374 | ||
|
|
3849de1931 | ||
|
|
1a46974cb9 | ||
|
|
25918b8b76 | ||
|
|
20bd0737a2 | ||
|
|
31fdfbaf38 | ||
|
|
8428cae1c8 | ||
|
|
65ae34169d | ||
|
|
ecff995e7c | ||
|
|
40dc9ff95e | ||
|
|
24a421c83e | ||
|
|
b204b3c8eb | ||
|
|
34738bb20a | ||
|
|
1b1068248d | ||
|
|
9f684978cf | ||
|
|
747717e2ee | ||
|
|
ed7f2df04e | ||
|
|
b159a72ce9 | ||
|
|
29faf13afd | ||
|
|
427d6c3316 | ||
|
|
eafea28266 | ||
|
|
1cb9a79fd4 | ||
|
|
959791ffde | ||
|
|
a5775cdb94 | ||
|
|
05272d1070 | ||
|
|
b5d2cfdbea | ||
|
|
e716f82670 | ||
|
|
dc5af66748 | ||
|
|
40e177a02e | ||
|
|
36a8243f73 | ||
|
|
d90647e9ba | ||
|
|
c7152af191 | ||
|
|
2f9ba31b0a | ||
|
|
ef48baafcc | ||
|
|
1227bd4898 | ||
|
|
09e610b900 | ||
|
|
b317520543 | ||
|
|
25c3881782 | ||
|
|
27e8916843 | ||
|
|
fa27207351 | ||
|
|
3753d50992 | ||
|
|
b7654c181d | ||
|
|
50e226a146 | ||
|
|
991f28906e | ||
|
|
f18a9493b3 | ||
|
|
bca9a787f6 | ||
|
|
9699d76dcb | ||
|
|
5f07efa12a | ||
|
|
a175033e3b | ||
|
|
878b504f8e | ||
|
|
669ab640da | ||
|
|
2f381c22e3 | ||
|
|
ee06c12374 | ||
|
|
225c2803ac | ||
|
|
1e0bd6717e | ||
|
|
33c84965ad | ||
|
|
a668e47fa1 | ||
|
|
c95d76266a | ||
|
|
902948e3c6 | ||
|
|
2805a2d0cc | ||
|
|
410c5ae919 | ||
|
|
7525fd5e3e | ||
|
|
55208d7d1f | ||
|
|
88e2cdd283 | ||
|
|
6ac69b604e | ||
|
|
76ba747706 | ||
|
|
469c0242d4 | ||
|
|
115531e944 | ||
|
|
6edfacbf4e | ||
|
|
a2249becba | ||
|
|
b53c53d9d8 | ||
|
|
13736219ff | ||
|
|
3ac5ff0cac | ||
|
|
19119cc4ae | ||
|
|
38ac7b41ad | ||
|
|
b47d1ad5fd | ||
|
|
45f642c4e4 | ||
|
|
04dc28cb33 | ||
|
|
f7e9d79322 | ||
|
|
5c6076d72d | ||
|
|
ee1901225b | ||
|
|
b61ba449fb | ||
|
|
d53e2fa8c1 | ||
|
|
20ac2dcd04 | ||
|
|
ac7db26f17 | ||
|
|
4a65a23706 | ||
|
|
425d83c497 | ||
|
|
a7d338a58e | ||
|
|
6a612972e2 | ||
|
|
f06f25532c | ||
|
|
116c487384 | ||
|
|
5f70abb16d | ||
|
|
c17110f6e7 | ||
|
|
69cbc2feb5 | ||
|
|
feb0b83365 | ||
|
|
03796f2337 | ||
|
|
d4f5a35e87 | ||
|
|
da707f3e40 | ||
|
|
59a6fd1ed8 | ||
|
|
8c8d9e5cc4 | ||
|
|
d36170879c | ||
|
|
204e483c08 | ||
|
|
f582eb5310 | ||
|
|
6f9a14d6c4 | ||
|
|
76fcad0a0b | ||
|
|
cc06799838 | ||
|
|
8a26c382a2 | ||
|
|
22198d8bd2 | ||
|
|
d534dcadfb | ||
|
|
708ae35068 | ||
|
|
50cea4f64e | ||
|
|
c782a32076 | ||
|
|
edc877442f | ||
|
|
a1fe0f6305 | ||
|
|
cb5aee9fa4 | ||
|
|
9b18b14f11 | ||
|
|
0fd7bb8d3f | ||
|
|
c836018ac7 | ||
|
|
ba678eabdc | ||
|
|
9442d3d0f3 | ||
|
|
9f0313dd0b | ||
|
|
3d109f9c4c | ||
|
|
f8a337fb9f | ||
|
|
3c0966279c | ||
|
|
c033979130 | ||
|
|
c828961327 | ||
|
|
83a95a0488 | ||
|
|
f3c131ffaf | ||
|
|
b06e38699a | ||
|
|
3a07e2fe21 | ||
|
|
ca668f8a37 | ||
|
|
5181aecc7b | ||
|
|
0e92cfbd0d | ||
|
|
60c7507a33 | ||
|
|
c7c3fae5c2 | ||
|
|
4acbb2a312 | ||
|
|
4e6159aa07 | ||
|
|
6a1d05646c | ||
|
|
2e05043f43 | ||
|
|
1b8216e911 | ||
|
|
a2121b86df | ||
|
|
1cd17e9edd | ||
|
|
5229f5a13c | ||
|
|
4ff014d275 | ||
|
|
83243f471a | ||
|
|
3c0c51a946 | ||
|
|
08ad449774 | ||
|
|
eae1b99036 | ||
|
|
44f27b23d0 | ||
|
|
92c83bc280 | ||
|
|
10bbd435b7 | ||
|
|
2ef8672a6b | ||
|
|
a22dd264cd | ||
|
|
baf5116841 | ||
|
|
e55017bbfc | ||
|
|
19636bda4e | ||
|
|
83124e0c05 | ||
|
|
a079870bca | ||
|
|
ce71b8c1cf | ||
|
|
7b0c25f91e | ||
|
|
feab25d0be | ||
|
|
956b4406d0 | ||
|
|
3a0fbae4d9 | ||
|
|
f106dc2a29 | ||
|
|
252a539e69 | ||
|
|
df6badfdd5 | ||
|
|
7479ae521c | ||
|
|
416fb94ae8 | ||
|
|
3a620fe55d | ||
|
|
5208750cdb | ||
|
|
c684f8f043 | ||
|
|
73084863b7 | ||
|
|
503310cdb8 | ||
|
|
bda8d34c2b | ||
|
|
2ee87483f9 | ||
|
|
9e04bf1ece | ||
|
|
29c8c9f989 | ||
|
|
1035e714ff | ||
|
|
57fa022c9f | ||
|
|
76c3f7bc8f | ||
|
|
6d2646239e | ||
|
|
c955e61ba7 | ||
|
|
c31a5279af | ||
|
|
840780dc4a | ||
|
|
02b3c37b9f | ||
|
|
d14fe813a9 | ||
|
|
44ff23b227 | ||
|
|
257459abc6 | ||
|
|
e988dc0e42 | ||
|
|
7d544dee47 | ||
|
|
1670f88e54 | ||
|
|
58c7edfed6 | ||
|
|
122d7f681f | ||
|
|
acec1ba4bf | ||
|
|
0040757cd3 | ||
|
|
49d554e9d8 | ||
|
|
fa3389ed23 | ||
|
|
188a84a893 | ||
|
|
ceff1622c1 | ||
|
|
8d15cacf92 | ||
|
|
80161bfa96 | ||
|
|
c32ab1b84f | ||
|
|
73c0ce628b | ||
|
|
dc68397e48 | ||
|
|
c934b47f2e | ||
|
|
07d3d6508a | ||
|
|
e4a8896fdc | ||
|
|
33e1a9457a | ||
|
|
b6a20fd6e4 | ||
|
|
ae9757bf43 | ||
|
|
b9a34b1b05 | ||
|
|
c33f66b691 | ||
|
|
cf8d6c2621 | ||
|
|
6c789f7165 | ||
|
|
7d77eff4f4 | ||
|
|
f83278bd61 | ||
|
|
9a96018cc2 | ||
|
|
ab3612517f | ||
|
|
0909722bb5 | ||
|
|
1cb8f9237c | ||
|
|
4cac366468 | ||
|
|
a6138b3445 | ||
|
|
093e4614d3 | ||
|
|
82efb8a784 | ||
|
|
be720709fe | ||
|
|
325b13b101 | ||
|
|
203d1c2b45 | ||
|
|
c3c97f2956 | ||
|
|
ac535de2fa | ||
|
|
9d4f0f5824 | ||
|
|
b4f5eaa541 | ||
|
|
66cdbf6215 | ||
|
|
c9e0bfb7fe | ||
|
|
6da8ef83af | ||
|
|
f53559b8d0 | ||
|
|
49f038b9d1 | ||
|
|
ce67657e0a | ||
|
|
56c520f455 | ||
|
|
9f88b077ee | ||
|
|
50315a7346 | ||
|
|
6b58afe823 | ||
|
|
167cba9e93 | ||
|
|
ce89a410d2 | ||
|
|
98d0f33f8f | ||
|
|
c305341ef4 | ||
|
|
0607a67a92 | ||
|
|
5f2f95676c | ||
|
|
4bf16243fc | ||
|
|
607738f22e | ||
|
|
200df49d6e | ||
|
|
580a1b7fc2 | ||
|
|
3372f9fc0d | ||
|
|
4787ac64ff | ||
|
|
fef625ce27 | ||
|
|
0b53dd8fa7 | ||
|
|
fe628e44e1 | ||
|
|
d314b6a552 | ||
|
|
02462d1752 | ||
|
|
5b734d8c52 | ||
|
|
81d640ed7c | ||
|
|
7e2ad05fae | ||
|
|
bda5890f17 | ||
|
|
c7dd293e01 | ||
|
|
fbf0a20f38 | ||
|
|
87ccfbab02 | ||
|
|
97f39282ef | ||
|
|
4fd3d49fc1 | ||
|
|
a70c8a9cae | ||
|
|
c0926633e8 | ||
|
|
1ae91097ba | ||
|
|
bfd76880a9 | ||
|
|
662578dbe7 | ||
|
|
48c6d3d89a | ||
|
|
7bdb530440 | ||
|
|
bfe953c18d | ||
|
|
136676012f | ||
|
|
0994ffc195 | ||
|
|
df19feac34 | ||
|
|
961fa89b7a | ||
|
|
ddf9e08069 | ||
|
|
b5f3978b8a | ||
|
|
82dc6c32ec | ||
|
|
889e2d6f06 | ||
|
|
9a28642a4e | ||
|
|
0b953462f7 | ||
|
|
061eb686c6 | ||
|
|
937297561f | ||
|
|
bf70d6f087 | ||
|
|
26fdfc42f4 | ||
|
|
abab8c6ec8 | ||
|
|
a7697f6095 | ||
|
|
49270e99e5 | ||
|
|
d75ce1e12e | ||
|
|
289e768ca5 | ||
|
|
44c587400d | ||
|
|
df467b9dba | ||
|
|
510543e14b | ||
|
|
c3133f020d | ||
|
|
a7439aa056 | ||
|
|
d7bea0c4c6 | ||
|
|
764a3c29e9 | ||
|
|
3c57572b89 | ||
|
|
fe7c6554f7 | ||
|
|
19bb7f5a83 | ||
|
|
c0e20ad56b | ||
|
|
49887ff06e | ||
|
|
1f6555c9ad | ||
|
|
7f8efa7cef | ||
|
|
8106956be2 | ||
|
|
cc435ba817 | ||
|
|
0c55a4d7bb | ||
|
|
c4b4c0ce59 | ||
|
|
d31c1df639 | ||
|
|
780286ea81 | ||
|
|
20a75b9c9e | ||
|
|
2a2e2716bd | ||
|
|
6a07c22826 | ||
|
|
7c294915c8 | ||
|
|
7788cb288e | ||
|
|
c1762c709e | ||
|
|
8690528080 | ||
|
|
5376294389 | ||
|
|
fa1b703bf8 | ||
|
|
72d2c7f078 | ||
|
|
09ecc66e53 | ||
|
|
879dc295a8 | ||
|
|
8a5a1d3301 | ||
|
|
67c8067aed | ||
|
|
123e32e345 | ||
|
|
3a09d67f59 | ||
|
|
ec3ed8fbcd | ||
|
|
18370ebd08 | ||
|
|
acbc09b232 | ||
|
|
9d1cf253b4 | ||
|
|
e46304d1ce | ||
|
|
668c62b1f4 | ||
|
|
49f418f146 | ||
|
|
c46c735f2f | ||
|
|
82aa7fcbad | ||
|
|
2cfeeb4b13 | ||
|
|
aa859c488f | ||
|
|
1b2915aa2a | ||
|
|
e99c3d4705 | ||
|
|
d23491646a | ||
|
|
1d740a63bd | ||
|
|
d1897fabf0 | ||
|
|
d4178d6440 | ||
|
|
f4d42289d4 | ||
|
|
d0def466da | ||
|
|
959f44502b | ||
|
|
1840541f6d | ||
|
|
c5ec6927b3 | ||
|
|
7beaf3705e | ||
|
|
792ffa2d26 | ||
|
|
bbd61977f1 | ||
|
|
e3d1fa2686 | ||
|
|
293d3b4fb3 | ||
|
|
e1d8155565 | ||
|
|
c37b27a926 | ||
|
|
6b3a05e23f | ||
|
|
0e92bb58b0 | ||
|
|
63cbd4deb0 | ||
|
|
17bcd4e2ab | ||
|
|
72f301c655 | ||
|
|
a62a8518b9 | ||
|
|
fa169d6aa2 | ||
|
|
d2bcb86e1e | ||
|
|
ed7361622b | ||
|
|
3117ec5a7d | ||
|
|
cb4716f403 | ||
|
|
b48c0e968f | ||
|
|
aa2ed5fb0c | ||
|
|
8b7a279c61 | ||
|
|
b286e9d337 | ||
|
|
d671c3d9fa | ||
|
|
7086f2dc89 | ||
|
|
7e8bb9ea00 | ||
|
|
4e46bb6671 | ||
|
|
de35658096 | ||
|
|
034f5db3bd | ||
|
|
57375bfd73 | ||
|
|
b846e33ee3 | ||
|
|
cc9b817f0e | ||
|
|
0d419aba8a | ||
|
|
ae22321d9c | ||
|
|
87169febf8 | ||
|
|
dd044844e5 | ||
|
|
0c8c596ee5 | ||
|
|
b9496fef1d | ||
|
|
b4b9d3a4b7 | ||
|
|
0128c89f8d | ||
|
|
9e77d06c72 | ||
|
|
25bb1cc957 | ||
|
|
2c6f8299f0 | ||
|
|
6a2773c3ac | ||
|
|
1eea917121 | ||
|
|
ea1bbbabfa | ||
|
|
399d2bc73c | ||
|
|
0759dbcdc9 | ||
|
|
1ae0f9c19d | ||
|
|
e8364a03bc | ||
|
|
046d88ab2d | ||
|
|
f161f78a33 | ||
|
|
1912444886 | ||
|
|
b6ef5a0a3d | ||
|
|
401c88adbb | ||
|
|
42984d1bfb | ||
|
|
6997082b03 | ||
|
|
139217dc79 | ||
|
|
2cc2a857a2 | ||
|
|
7dfb463ba9 | ||
|
|
da07871bc6 | ||
|
|
530d2309e7 | ||
|
|
7e7a5d38f8 | ||
|
|
ecf949dee0 | ||
|
|
9b0ba10b0b | ||
|
|
9f9c4cf32c | ||
|
|
536ebf604f | ||
|
|
03a616b737 | ||
|
|
0b05f67114 | ||
|
|
0ede690580 | ||
|
|
d81545a871 | ||
|
|
1cda1fc201 | ||
|
|
490dad7838 | ||
|
|
13ecbb8bce | ||
|
|
3346bfc9a8 | ||
|
|
c5de65f115 | ||
|
|
4fffcf9975 | ||
|
|
8962d9b293 | ||
|
|
050c1560e8 | ||
|
|
68b3041f50 | ||
|
|
1ddd153399 | ||
|
|
df0a60caae | ||
|
|
675c86582d | ||
|
|
e6d01ed1a3 | ||
|
|
d8d1064e05 | ||
|
|
5d04cb81ba | ||
|
|
5d5906e980 | ||
|
|
2e7b862ad3 | ||
|
|
ad86e22824 | ||
|
|
536b8a213b | ||
|
|
2e13877926 | ||
|
|
967d63dec4 | ||
|
|
573c4268b6 | ||
|
|
f19e83dcf1 | ||
|
|
caabe8fc87 | ||
|
|
7c4e5309fc | ||
|
|
542124e90c | ||
|
|
e0d02be0f5 | ||
|
|
461e6d1b5b | ||
|
|
d767e6d7eb | ||
|
|
bff1584012 | ||
|
|
3d91a11b95 | ||
|
|
1349b46a8c | ||
|
|
74330ba1dd | ||
|
|
64ab227f62 | ||
|
|
1c51fbd1b4 | ||
|
|
4c2dd553f2 | ||
|
|
2fb985afa4 | ||
|
|
44c93d5074 | ||
|
|
dcf07a46aa | ||
|
|
284a9e0612 | ||
|
|
60349a8690 | ||
|
|
64072be83c | ||
|
|
229abb8412 | ||
|
|
7b1d1fd288 | ||
|
|
1ca1f6ad22 | ||
|
|
0ad66f4bc4 | ||
|
|
d5757c4fb8 | ||
|
|
7fe40bce86 | ||
|
|
5da3d64ede | ||
|
|
2e93b06ac0 | ||
|
|
1e6aa4b40f | ||
|
|
262383395d | ||
|
|
127226c421 | ||
|
|
fabcb021cb | ||
|
|
60ab1ab83e | ||
|
|
1f37095087 | ||
|
|
93c2f70b64 | ||
|
|
b0562df6bb | ||
|
|
65d6a5c774 | ||
|
|
650af0f7b0 | ||
|
|
cf9de25c25 | ||
|
|
fc4009aa50 | ||
|
|
d04cf4d897 | ||
|
|
2e45c67ef2 | ||
|
|
b6d8e1f842 | ||
|
|
284bc364fe | ||
|
|
a050654b4c | ||
|
|
7311dae483 | ||
|
|
c57c3cd1d3 | ||
|
|
3ec5e85485 | ||
|
|
ff95af0367 | ||
|
|
aa9c7d5435 | ||
|
|
dcc9f33357 | ||
|
|
1ace645505 | ||
|
|
dc2b87dce1 | ||
|
|
8e47f5d494 | ||
|
|
333d381f41 | ||
|
|
f9b064cc19 | ||
|
|
116a6c1b2e | ||
|
|
c4506b8e6c | ||
|
|
6786a7be4a | ||
|
|
bb370a304d | ||
|
|
fdcf53c688 | ||
|
|
d3f575547c | ||
|
|
68797e51c6 | ||
|
|
c76c55cdee | ||
|
|
f529ec3018 | ||
|
|
ad667be0d7 | ||
|
|
133fa09261 | ||
|
|
acf19cebf8 | ||
|
|
5dfa4c0840 | ||
|
|
f918602f58 | ||
|
|
2cf2dd24a4 | ||
|
|
eefb069d08 | ||
|
|
3dcffc7df8 | ||
|
|
b121277142 | ||
|
|
d283fcf7b4 | ||
|
|
e7f151ad02 | ||
|
|
0710b781d3 | ||
|
|
7c01ad6917 | ||
|
|
56d2f06631 | ||
|
|
9e47911b19 | ||
|
|
ef80497fbe | ||
|
|
e22cf106c2 | ||
|
|
5ffb270ec1 | ||
|
|
f85f3b0f25 | ||
|
|
e7ec83d626 | ||
|
|
11479cd8c3 | ||
|
|
176e760de1 | ||
|
|
430c60ed1a | ||
|
|
dfea3623f6 | ||
|
|
b38783e4cb | ||
|
|
9382a4c21b | ||
|
|
3cd4c5566f | ||
|
|
601c0977df | ||
|
|
c56f036bab | ||
|
|
44dd50c0ef | ||
|
|
56919ae45f | ||
|
|
6c14e7127d | ||
|
|
578af00b0d | ||
|
|
d6c0bf69b6 | ||
|
|
e8884b4ec0 | ||
|
|
5e79609955 | ||
|
|
4950c96f1c | ||
|
|
51b0cf535e | ||
|
|
4cc17a7f6e | ||
|
|
dca07c5634 | ||
|
|
fd42294faf | ||
|
|
c1246e8c4e | ||
|
|
59fc902cfb | ||
|
|
1fe9755d01 | ||
|
|
1da09a4706 | ||
|
|
f3c591469b | ||
|
|
b1200f9f59 | ||
|
|
47617d6c04 | ||
|
|
4794ab6095 | ||
|
|
bc85767f19 | ||
|
|
e37c218c2a | ||
|
|
a0aaa23904 | ||
|
|
27a6c72091 | ||
|
|
2dcc66f03e | ||
|
|
d70a05a088 | ||
|
|
c2317edf8a | ||
|
|
cb7ac404d9 | ||
|
|
5abc6c995f | ||
|
|
0f21c39e49 | ||
|
|
f6513127ce | ||
|
|
ddd72b2b37 | ||
|
|
7f5df1fb66 | ||
|
|
2e71b64de1 | ||
|
|
45f1f9263f | ||
|
|
878288f06a | ||
|
|
406cdf8d16 | ||
|
|
5b28b024ae | ||
|
|
7c693d8107 | ||
|
|
b8a6d1ac4d | ||
|
|
40533f50df | ||
|
|
539ced191b | ||
|
|
1a400b890b | ||
|
|
ebe5a5579c | ||
|
|
afb18ca75b | ||
|
|
01c62932bd | ||
|
|
6cd8db7b28 | ||
|
|
bb46d91bc6 | ||
|
|
3cd5322496 | ||
|
|
cadecdcab7 | ||
|
|
cd4030b7db | ||
|
|
0a2264cad4 | ||
|
|
bb2a02daa8 | ||
|
|
5991195062 | ||
|
|
54c4055af3 | ||
|
|
cb07210bc7 | ||
|
|
3e40d624a8 | ||
|
|
63ce675914 | ||
|
|
14e5e87a4d | ||
|
|
e7e81c6639 | ||
|
|
23d0601d82 | ||
|
|
6db9138eeb | ||
|
|
6a7c200002 | ||
|
|
e3f70b7125 | ||
|
|
a25e859fa7 | ||
|
|
5b2af1f6b3 | ||
|
|
59df72c4b0 | ||
|
|
4e2eb2f24c | ||
|
|
b905f4b8aa | ||
|
|
fefe87ed1e | ||
|
|
b66905c2f6 | ||
|
|
39472e4d81 | ||
|
|
85fba1325a | ||
|
|
0f39f05fa1 | ||
|
|
8d551c2664 | ||
|
|
346a22f684 | ||
|
|
b1571e4437 | ||
|
|
5ac2abe3ab | ||
|
|
5b15426cc6 | ||
|
|
1ac944b7c1 | ||
|
|
fd90dbb123 | ||
|
|
6ccad91537 | ||
|
|
c89db53ebf | ||
|
|
4ffd70a42a | ||
|
|
bbeb48a60d | ||
|
|
aefe9bc116 | ||
|
|
bcb95f647d | ||
|
|
145a7fa146 | ||
|
|
06f0b6030a | ||
|
|
191ee3a0ed | ||
|
|
f6358694ae | ||
|
|
af14d65a98 | ||
|
|
9fe75dc521 | ||
|
|
0051bea034 | ||
|
|
76c79dba8e | ||
|
|
84dc82506a | ||
|
|
ae1625734c | ||
|
|
e2ce4c0fa9 | ||
|
|
a06a15e769 | ||
|
|
7c5de29b61 | ||
|
|
5f9befebae | ||
|
|
6a7b885891 | ||
|
|
cd8e7bbdca | ||
|
|
5d731ad8c3 | ||
|
|
7964270929 | ||
|
|
ea513d392e | ||
|
|
feba9024eb | ||
|
|
b3e16ce8e0 | ||
|
|
31dd77c694 | ||
|
|
ae58f89fbf | ||
|
|
b3bc36b253 | ||
|
|
7287509fef | ||
|
|
b1c49045a8 | ||
|
|
0d5634475c | ||
|
|
e6bfe7d40c | ||
|
|
811cd0653f | ||
|
|
e2b8a21ff5 | ||
|
|
24c7941f65 | ||
|
|
600a9ee4c5 | ||
|
|
fdfdfedf01 | ||
|
|
a67688322d | ||
|
|
6fe057e277 | ||
|
|
f23e8bfb02 | ||
|
|
eab9da98f2 | ||
|
|
f161992836 | ||
|
|
40e13b91fe | ||
|
|
af6824605b | ||
|
|
babf58f8d2 | ||
|
|
968f5d7693 | ||
|
|
4cc6bd69ae | ||
|
|
199437e859 | ||
|
|
e5fac0a01d | ||
|
|
5d14b84969 | ||
|
|
bcccd06cee | ||
|
|
6b0ab9a49a | ||
|
|
023002ae73 | ||
|
|
579d384c04 | ||
|
|
e2e1524454 | ||
|
|
4a5853c1c2 | ||
|
|
64756d14d0 | ||
|
|
bac2ef601d | ||
|
|
cf3bab89f9 | ||
|
|
dfe41ad984 | ||
|
|
b784bebaa9 | ||
|
|
bcf727cf58 | ||
|
|
ecd0a53412 | ||
|
|
3456434e37 | ||
|
|
454c5b1ed2 | ||
|
|
dc2c437a1a | ||
|
|
819d3f5ded | ||
|
|
4f802689f2 | ||
|
|
9cbbe55598 | ||
|
|
7e2dafdcb8 | ||
|
|
c7873d68f7 | ||
|
|
939ec526a8 | ||
|
|
b20a635db0 | ||
|
|
a656bee0df | ||
|
|
42f07e3f14 | ||
|
|
5803b05bd5 | ||
|
|
ccf0ba50c4 | ||
|
|
f3bc977d32 | ||
|
|
80609e0816 | ||
|
|
795d481ca6 | ||
|
|
1b936b9af8 | ||
|
|
f141cc28b0 | ||
|
|
4cb64b58be | ||
|
|
028af34d3d | ||
|
|
ce54997be5 | ||
|
|
3d213fa713 | ||
|
|
e71f3790ce | ||
|
|
67b9cba4d3 | ||
|
|
78a471f684 | ||
|
|
d4289c5d54 | ||
|
|
0c17c5440a | ||
|
|
c4116da564 | ||
|
|
d0821953bb | ||
|
|
e782adef94 | ||
|
|
d3572c2562 | ||
|
|
1f3838b155 | ||
|
|
6aa459073e | ||
|
|
0932c33185 | ||
|
|
5e542aa841 | ||
|
|
6d53abd5af | ||
|
|
3ea58bf8db | ||
|
|
71a4c2c3d2 | ||
|
|
a3e391a523 | ||
|
|
9cb15b302c | ||
|
|
15c1a28d37 | ||
|
|
d3a500e54e | ||
|
|
a0a5eb8aef | ||
|
|
a92955eade | ||
|
|
f043f3d4f9 | ||
|
|
992a057a1b | ||
|
|
07da1e7e1a | ||
|
|
2c07222ef6 | ||
|
|
918e315d47 | ||
|
|
c824731bc6 | ||
|
|
0c39caa622 | ||
|
|
1f1e28baf8 | ||
|
|
0c303389d6 | ||
|
|
01a896ef5b | ||
|
|
0e5e760135 | ||
|
|
7e7d877874 | ||
|
|
57ccb6fd6b | ||
|
|
efa2876e29 | ||
|
|
59ef7d8fd1 | ||
|
|
1f308c9ec3 | ||
|
|
4943d3aa53 | ||
|
|
828d561113 | ||
|
|
fcf72a7123 | ||
|
|
d3f5bc6e2d | ||
|
|
f525a05be8 | ||
|
|
fc7ec4299e | ||
|
|
21d053b1b6 | ||
|
|
68e64a5aa7 | ||
|
|
8e718fe288 | ||
|
|
efec9070e1 | ||
|
|
e3646d4d4a | ||
|
|
4219f16f61 | ||
|
|
c3b1802e95 | ||
|
|
40fe078021 | ||
|
|
a5a6600e74 | ||
|
|
03b9303f22 | ||
|
|
b5a59ea6f9 | ||
|
|
c6b2124129 | ||
|
|
d320a6facb | ||
|
|
0793c2cb8c | ||
|
|
d14755abb8 | ||
|
|
abd4aa2e6b | ||
|
|
58417e78e5 | ||
|
|
390eb1c6e9 | ||
|
|
d4c6530a72 | ||
|
|
ff17b44a41 | ||
|
|
5bd2d47571 | ||
|
|
f8e475cd34 | ||
|
|
a05e063949 | ||
|
|
eb06a90109 | ||
|
|
e2f6632fee | ||
|
|
5c5c583dcc | ||
|
|
0d8d5c02d0 | ||
|
|
382e0c6ad2 | ||
|
|
a8d1c44408 | ||
|
|
78b4318c34 | ||
|
|
b47031a099 | ||
|
|
0f7b65a921 | ||
|
|
33f7903aeb | ||
|
|
f3c2740917 | ||
|
|
09a57c7a52 | ||
|
|
9068f0606e | ||
|
|
c577b7e369 | ||
|
|
5850464ba7 | ||
|
|
50e240d5e4 | ||
|
|
75c2a45b25 | ||
|
|
c958d63897 | ||
|
|
b633b8d0d3 | ||
|
|
76948416a9 | ||
|
|
f4a527c57c | ||
|
|
c491baff0e | ||
|
|
6d05fc6f57 | ||
|
|
ca53add820 | ||
|
|
6fe3099ab4 | ||
|
|
a34eceb327 | ||
|
|
c9042c3186 | ||
|
|
b46fe0d51c | ||
|
|
6d1d3173fe | ||
|
|
030d044d03 | ||
|
|
29fb8e0f74 | ||
|
|
6e326976d5 | ||
|
|
03a7d72a62 | ||
|
|
f913febd71 | ||
|
|
daa0fbdc6b | ||
|
|
d4c52b599d | ||
|
|
ec88373eb7 | ||
|
|
4286cafdeb | ||
|
|
3880d8e2f2 | ||
|
|
671c84ad44 | ||
|
|
a0d687bb24 | ||
|
|
704385ff0a | ||
|
|
81a657edec | ||
|
|
9d0bad29c0 | ||
|
|
2fb8e32104 | ||
|
|
c522e499b2 | ||
|
|
4700955480 | ||
|
|
2c66081fa4 | ||
|
|
855e88da43 | ||
|
|
ad302db9a8 | ||
|
|
bfa5fff500 | ||
|
|
01c64fd554 | ||
|
|
13a2b92a32 | ||
|
|
29e79f8f61 | ||
|
|
8f7527ede0 | ||
|
|
7cd149a4d8 | ||
|
|
e45912fd8a | ||
|
|
56c4ba67c6 | ||
|
|
7e7ce2f38e | ||
|
|
7dc9eba2d0 | ||
|
|
f91d96b51a | ||
|
|
bc19609147 | ||
|
|
1ccaf3a0bd | ||
|
|
03bfd829da | ||
|
|
e1f7a1e0a0 | ||
|
|
ceeac0ecf0 | ||
|
|
c9d0eac739 | ||
|
|
8f24d924ee | ||
|
|
8537cc9edf | ||
|
|
58f3985567 | ||
|
|
872db67f21 | ||
|
|
006f90997a | ||
|
|
26b4776394 | ||
|
|
66c64459e6 | ||
|
|
dc8657f57f | ||
|
|
9d647b90e0 | ||
|
|
f5730c950b | ||
|
|
15d37daebd | ||
|
|
795c9876af | ||
|
|
45f653167d | ||
|
|
403d9b6ac1 | ||
|
|
722af5f659 | ||
|
|
471b9f02ec | ||
|
|
fd294b6f98 | ||
|
|
88baaa72be | ||
|
|
61084cf1ba | ||
|
|
5b63f0755a | ||
|
|
9eb5cf6c98 | ||
|
|
679db5a22b | ||
|
|
0e35168bdb | ||
|
|
035dcc7ab7 | ||
|
|
252deed5b9 | ||
|
|
c2c4cad753 | ||
|
|
42e76477cf | ||
|
|
1eade74e5a | ||
|
|
f1f0fa0aa9 | ||
|
|
deef158822 | ||
|
|
fef2006663 | ||
|
|
5c97fd576a | ||
|
|
c4eb6b7b65 | ||
|
|
31324761cc | ||
|
|
e495f03ee9 | ||
|
|
f5769627e4 | ||
|
|
06ad73f85b | ||
|
|
fa20363853 | ||
|
|
2564432e71 | ||
|
|
addf47600d | ||
|
|
7f534a7966 | ||
|
|
eabffece1f | ||
|
|
afed842ad1 | ||
|
|
c46cfb5d47 | ||
|
|
34fe42bbd9 | ||
|
|
0c1d96b749 | ||
|
|
9b67f52d56 | ||
|
|
d37907d35d | ||
|
|
fee8d0cf78 | ||
|
|
f5f9c6b81f | ||
|
|
4e3460a34b | ||
|
|
8545b6ce6b | ||
|
|
e417903c23 | ||
|
|
81eae3fa48 | ||
|
|
90c58087e8 | ||
|
|
19bc1e6313 | ||
|
|
4a4e8c87b8 | ||
|
|
f04e559dc2 | ||
|
|
8e5e657344 | ||
|
|
a4f1f62068 | ||
|
|
a3e279f06f | ||
|
|
d11954e80c | ||
|
|
812170ebce | ||
|
|
fdd3c77298 | ||
|
|
342de209a2 | ||
|
|
caeb32488e | ||
|
|
ff7e70f4d5 | ||
|
|
950f51909c | ||
|
|
f86e6d344c | ||
|
|
08581282dd | ||
|
|
e1e47e76ec | ||
|
|
3ff059848c | ||
|
|
22c7df5936 | ||
|
|
81a44d1340 | ||
|
|
2c089e6166 | ||
|
|
589dae7b0c | ||
|
|
3ff13189aa | ||
|
|
7151c3fac1 | ||
|
|
3e023b77dd | ||
|
|
e3fc89890c | ||
|
|
ce2a6cfe5c | ||
|
|
31d9eaf54c | ||
|
|
781c445d14 | ||
|
|
26a416399f | ||
|
|
f7dc7f039e | ||
|
|
3c74fea087 | ||
|
|
be0635bfd3 | ||
|
|
6723ef95c2 | ||
|
|
1a8fd62680 | ||
|
|
8b57ed46b1 | ||
|
|
25c08e56c2 | ||
|
|
0f148b6ab6 | ||
|
|
47575fe357 | ||
|
|
7c14453b5a | ||
|
|
a47d5536fa | ||
|
|
db8f7f21e8 | ||
|
|
3c312c55f1 | ||
|
|
2d11419cba | ||
|
|
07a4508944 | ||
|
|
62913739bb | ||
|
|
55e9d8d944 | ||
|
|
a9439d58c7 | ||
|
|
800ad40c4c | ||
|
|
62864637a3 | ||
|
|
4d4ac7ea24 | ||
|
|
119651482d | ||
|
|
ecf0a1a736 | ||
|
|
94942d1ac4 | ||
|
|
b0a5b54949 | ||
|
|
ac57eab8ac | ||
|
|
74a4144193 | ||
|
|
5c44cb0f01 | ||
|
|
c044d711ef | ||
|
|
f2132f6a7d | ||
|
|
69871b15ff | ||
|
|
f4ec02a592 | ||
|
|
53f7743678 | ||
|
|
15893bc558 | ||
|
|
73b974f1b5 | ||
|
|
0e7bdc208b | ||
|
|
e0a07b7a92 | ||
|
|
4da58e8846 | ||
|
|
966b9e5c2b | ||
|
|
1625192c81 | ||
|
|
c5e8c6603c | ||
|
|
37e541d326 | ||
|
|
862a827fe6 | ||
|
|
b96c5c9e4b | ||
|
|
f7e91f1f08 | ||
|
|
2d77178ba3 | ||
|
|
b38e6d8bf3 | ||
|
|
b601cdb6a5 | ||
|
|
2803154213 | ||
|
|
ae5297e6d7 | ||
|
|
fa7490fb38 | ||
|
|
bad80521a8 | ||
|
|
8303e30033 | ||
|
|
27de1e271e | ||
|
|
98cecfe940 | ||
|
|
2e65538fb5 | ||
|
|
e6371cbf9c | ||
|
|
0b8b6ac56a | ||
|
|
cc17cc4af7 | ||
|
|
6afd7e1a38 | ||
|
|
91e22c1fb3 | ||
|
|
ad6129816d | ||
|
|
409db9d7ef | ||
|
|
2ccd58e917 | ||
|
|
7585ad430a | ||
|
|
c105c5a449 | ||
|
|
54065b59a1 | ||
|
|
f9250ae522 | ||
|
|
2f8621ed3d | ||
|
|
98a3e7cffa | ||
|
|
d7f2966216 | ||
|
|
8687b214e7 | ||
|
|
f5f1f0da8e | ||
|
|
818359bfd0 | ||
|
|
8174005ac8 | ||
|
|
0180cae8c3 | ||
|
|
dd1ea541ec | ||
|
|
19aac5b14c | ||
|
|
f3f8a211cd | ||
|
|
3edcbc3b99 | ||
|
|
5a1cc8745e | ||
|
|
12495547c4 | ||
|
|
ff654ab094 | ||
|
|
e55f55cd3e | ||
|
|
29aad066f0 | ||
|
|
74d3bdc68c | ||
|
|
7f9b3a8666 | ||
|
|
426f6de16f | ||
|
|
cf19b81dd4 | ||
|
|
d4c7e95092 | ||
|
|
aa07b5bdd8 | ||
|
|
c7cbb22667 | ||
|
|
ff72b68731 | ||
|
|
433be0e46b | ||
|
|
900607034e | ||
|
|
733e6fa14f | ||
|
|
cd72eb20c6 | ||
|
|
d754e616a5 | ||
|
|
d613e0a488 | ||
|
|
942fa53ed9 | ||
|
|
1729841083 | ||
|
|
315d83bc88 | ||
|
|
223aa0ccd5 | ||
|
|
38494a48d8 | ||
|
|
38456bddb5 | ||
|
|
b8a12b0e5b | ||
|
|
2d37c0aa42 | ||
|
|
c8c693db53 | ||
|
|
cdff0fceea | ||
|
|
3b6f47aea1 | ||
|
|
7bc37651c3 | ||
|
|
4fe43c3e50 | ||
|
|
0826b7c3ca | ||
|
|
d219c5c4c6 | ||
|
|
1a498348ee | ||
|
|
c6b03555f7 | ||
|
|
bb1a270532 | ||
|
|
69ea4b846a | ||
|
|
373a0e4a7d | ||
|
|
f4f5ab2392 | ||
|
|
b20b3229bf | ||
|
|
77fb93bb61 | ||
|
|
ec72b46dcb | ||
|
|
367f1813de | ||
|
|
74116057a7 | ||
|
|
9deb40216e | ||
|
|
daef76ec0b | ||
|
|
569a29fbbc | ||
|
|
0c06bfd3d9 | ||
|
|
8f46f2cac8 | ||
|
|
8f48515b80 | ||
|
|
c7dab4abea | ||
|
|
5e4c4725bc | ||
|
|
9861d74221 | ||
|
|
bb3b606820 | ||
|
|
09fb51189e | ||
|
|
bd19899bbc | ||
|
|
b69753fb76 | ||
|
|
9dc1b5f6f5 | ||
|
|
55c1ac36e3 | ||
|
|
c12e6cdc09 | ||
|
|
85562e8b95 | ||
|
|
fd34cc0b87 | ||
|
|
6322393782 | ||
|
|
1f9e954610 | ||
|
|
6491746809 | ||
|
|
6d2f1ff81e | ||
|
|
c724e5fb20 | ||
|
|
600726976c | ||
|
|
49b5c2058d | ||
|
|
21df21b144 | ||
|
|
620e71e800 | ||
|
|
db2216848d | ||
|
|
cfffe91ed5 | ||
|
|
a95aed1047 | ||
|
|
2883a36c76 | ||
|
|
ac4245013f | ||
|
|
b09e484492 | ||
|
|
dc63ddb010 | ||
|
|
09778a8eab | ||
|
|
8cbe9f1bd0 | ||
|
|
be61689458 | ||
|
|
4b63bc051e | ||
|
|
a098ba5e79 | ||
|
|
edee4b3fe5 | ||
|
|
0c9013e60e | ||
|
|
701c4bcf27 | ||
|
|
22f2fac56b | ||
|
|
605125c0e7 | ||
|
|
65d0ee126a | ||
|
|
4db6435090 | ||
|
|
4383fd3c45 | ||
|
|
b6be76b0ab | ||
|
|
92d8fa1193 | ||
|
|
9c51bf3edf | ||
|
|
cf0e4e6f8c | ||
|
|
c3719f35e3 | ||
|
|
0b1f074bcf | ||
|
|
7fe8514434 | ||
|
|
37c4dcf8ba | ||
|
|
e33dd3c499 | ||
|
|
94be52886e | ||
|
|
6646aa5644 | ||
|
|
d556eba296 | ||
|
|
a5b573b2d3 | ||
|
|
18d30ea8fa | ||
|
|
4324ffccf4 | ||
|
|
182ee9d7e4 | ||
|
|
68c1cfed46 | ||
|
|
1159784538 | ||
|
|
e683b5fdec | ||
|
|
3c409c5070 | ||
|
|
4b7361dfe7 | ||
|
|
037d5c11a5 | ||
|
|
95d857e091 | ||
|
|
4efa087cd1 | ||
|
|
60f0003436 | ||
|
|
fdb265cd6e | ||
|
|
34704a17f2 | ||
|
|
4a959ec2fd | ||
|
|
f182886fce | ||
|
|
2fbaddbecf | ||
|
|
cafcecf03d | ||
|
|
49473845cf | ||
|
|
d4d4ed22a0 | ||
|
|
240ed6f0b1 | ||
|
|
084a24e958 | ||
|
|
cd9e3648e9 | ||
|
|
7ed51be4e6 | ||
|
|
0c8358ae67 | ||
|
|
25cefd9129 | ||
|
|
af75c0ca0c | ||
|
|
a91b2629d3 | ||
|
|
de9070dba1 | ||
|
|
813b518b6f | ||
|
|
c47e800f60 | ||
|
|
8398f45d43 | ||
|
|
aeaaa50f6c | ||
|
|
f33ce846b8 | ||
|
|
4718b9dc07 | ||
|
|
fba00f7c5a | ||
|
|
3360383fd7 | ||
|
|
6c30f62693 | ||
|
|
ab5b0382da | ||
|
|
671f3f5890 | ||
|
|
9bae445624 | ||
|
|
30529ccdf5 | ||
|
|
a8a02d3a2e | ||
|
|
5da33ca244 | ||
|
|
04c1e95f08 | ||
|
|
2186fc1fc7 | ||
|
|
fb49a9192e | ||
|
|
ccbc5abec6 | ||
|
|
7aa6fd479d | ||
|
|
3fcc16c1a0 | ||
|
|
b3e0298189 | ||
|
|
7e1fe7d852 | ||
|
|
5d7d77d4b6 | ||
|
|
418856769b | ||
|
|
46a32dd3ee | ||
|
|
ecb4dc57b4 | ||
|
|
89d426470b | ||
|
|
23c7a1b5b7 | ||
|
|
3b21e9434f | ||
|
|
d4a4428e64 | ||
|
|
2dfc057135 | ||
|
|
a25eebef9b | ||
|
|
741c4ca15a | ||
|
|
0bcdf2e4dc | ||
|
|
cd5a720211 | ||
|
|
5cb04946b0 | ||
|
|
c8953c6275 | ||
|
|
e8dc9c9454 | ||
|
|
a0c325681f | ||
|
|
8d3bf19422 | ||
|
|
4477867ef4 | ||
|
|
e696c884dc | ||
|
|
80bcaa49e6 | ||
|
|
0096c1bb02 | ||
|
|
38b37a068d | ||
|
|
0281f31df2 | ||
|
|
40b182c550 | ||
|
|
d1dedc7511 | ||
|
|
04cd9b3eb6 | ||
|
|
de6003367d | ||
|
|
a5f42eeddf | ||
|
|
a8ba041b67 | ||
|
|
e700fc6f34 | ||
|
|
af29d3d257 | ||
|
|
487701a143 | ||
|
|
f32e037c58 | ||
|
|
8bd903dd96 | ||
|
|
560c100484 | ||
|
|
52444d177b | ||
|
|
b4f7ff29ef | ||
|
|
f7c6a5bfa2 | ||
|
|
6fe14f7a6b | ||
|
|
786e5addd8 | ||
|
|
2e9a15f523 | ||
|
|
bb0d2ddc53 | ||
|
|
702fb014a5 | ||
|
|
834eab9457 | ||
|
|
a85da04601 | ||
|
|
414f1c27e4 | ||
|
|
c76e2eb900 | ||
|
|
c523e15302 | ||
|
|
2dc8de295d | ||
|
|
d645fd6327 | ||
|
|
219a7f3a07 | ||
|
|
d95e3e0055 | ||
|
|
2cc31ff425 | ||
|
|
8258fd7d9f | ||
|
|
784cca2233 | ||
|
|
436539a700 | ||
|
|
dcb3da9f28 | ||
|
|
a354c841f1 | ||
|
|
3824f064cd | ||
|
|
cba6db752b | ||
|
|
a458e26581 | ||
|
|
9d68727a84 | ||
|
|
38b9a874e0 | ||
|
|
7a680fb9f2 | ||
|
|
a5f9262adb | ||
|
|
b05e32fa8c | ||
|
|
53d8cff835 | ||
|
|
00fe97ff88 | ||
|
|
607511fd64 | ||
|
|
8663c265d8 | ||
|
|
6c5d35d6ce | ||
|
|
95532cb318 | ||
|
|
4d91bc5908 | ||
|
|
b13900402d | ||
|
|
1bb6c03bd0 | ||
|
|
1445949e31 | ||
|
|
360d3834ca | ||
|
|
aacdcad529 | ||
|
|
ad9341835f | ||
|
|
b028adb6af | ||
|
|
39f683b272 | ||
|
|
a6c46c89eb | ||
|
|
d534cf6f02 | ||
|
|
dd4326f7c4 | ||
|
|
40aecd688e | ||
|
|
63730a6e2c | ||
|
|
4d4d26aef8 | ||
|
|
de6b32d8c6 | ||
|
|
a0af7f0524 | ||
|
|
c043bd3422 | ||
|
|
18ae1d6940 | ||
|
|
d6f64f9773 | ||
|
|
db99a4cb90 | ||
|
|
108689661f | ||
|
|
d3e00dba8e | ||
|
|
fcd33e5035 | ||
|
|
af9082cd9f | ||
|
|
6a0bb18fca | ||
|
|
8aa8d87781 | ||
|
|
4998af8d7a | ||
|
|
c6aa95f3f3 | ||
|
|
481be29366 | ||
|
|
3617b6ad8c | ||
|
|
3fb8e19a38 | ||
|
|
2ea2f1b4f2 | ||
|
|
26cb8ec4f1 | ||
|
|
7fe56bea86 | ||
|
|
11b16b8a86 | ||
|
|
de020ee695 | ||
|
|
3b83487611 | ||
|
|
09bab4f162 | ||
|
|
49fcc799ca | ||
|
|
10bc803775 | ||
|
|
4f40770fc6 | ||
|
|
a4495c6ef1 | ||
|
|
67d837c4ec | ||
|
|
138825af6d | ||
|
|
c093841336 | ||
|
|
2df1da4226 | ||
|
|
2792d60e2d | ||
|
|
656a3ace07 | ||
|
|
aec8e88c14 | ||
|
|
bdd5ca140d | ||
|
|
8b3b0def03 | ||
|
|
6440ece177 | ||
|
|
bd3518637c | ||
|
|
aef2a1c484 | ||
|
|
a4b28e5737 | ||
|
|
a3bc2eb836 | ||
|
|
3059da5805 | ||
|
|
18d5a492c8 | ||
|
|
160b0ea7d9 | ||
|
|
4dd1267bea | ||
|
|
b5c4328682 | ||
|
|
571fc69ef4 | ||
|
|
f51595cfc9 | ||
|
|
d54aea0036 | ||
|
|
51bb2974bc | ||
|
|
7a859061fd | ||
|
|
cefa9fcd75 | ||
|
|
d3bacd0b73 | ||
|
|
b94a98fc90 | ||
|
|
e0b2687231 | ||
|
|
cc6179a4dd | ||
|
|
e947bac4a3 | ||
|
|
11ecbb6ca7 | ||
|
|
322789cd4c | ||
|
|
f28464dba0 | ||
|
|
8f6456b1f8 | ||
|
|
1f32786c82 | ||
|
|
829c729ee9 | ||
|
|
5d3aacb892 | ||
|
|
741e9c5ed5 | ||
|
|
1408c1b623 | ||
|
|
c256f8d09e | ||
|
|
55c018c525 | ||
|
|
3fa94b5143 | ||
|
|
5127e2f89c | ||
|
|
3175fa3aca | ||
|
|
5614174b39 | ||
|
|
39fc52fe0a | ||
|
|
81188705b1 | ||
|
|
63c4873d8a | ||
|
|
1a85dcd890 | ||
|
|
27470fc504 | ||
|
|
65d18445d3 | ||
|
|
84dd54b33a | ||
|
|
7c410d36e3 | ||
|
|
98a603a570 | ||
|
|
5876052170 | ||
|
|
f8303b4623 | ||
|
|
20005a7a22 | ||
|
|
4f0bfbab21 | ||
|
|
811442832e | ||
|
|
40811311d7 | ||
|
|
198de211f8 | ||
|
|
9f5412fa9d | ||
|
|
0dc9de81ae | ||
|
|
5b8f42ce5e | ||
|
|
5314274ed6 | ||
|
|
c831856711 | ||
|
|
1bade6d796 | ||
|
|
629a4a950e | ||
|
|
aebb1f6ec8 | ||
|
|
6e42bc55e0 | ||
|
|
1235fba7ee | ||
|
|
7a459db022 | ||
|
|
607987def5 | ||
|
|
397ec62180 | ||
|
|
9315210fbe | ||
|
|
5127990a43 | ||
|
|
40ad2b155a | ||
|
|
a0412d026c | ||
|
|
7d2134c488 | ||
|
|
d894f52b97 | ||
|
|
735f475c24 | ||
|
|
353dd73e24 | ||
|
|
49fe06498a | ||
|
|
bc95ec8084 | ||
|
|
f79906bf16 | ||
|
|
b3262fcb80 | ||
|
|
52b8f924aa | ||
|
|
52f57160aa | ||
|
|
6d4f23919c | ||
|
|
899623f71b | ||
|
|
c5d677ac7b | ||
|
|
c75270a9fc | ||
|
|
1588a379eb | ||
|
|
72d2075828 | ||
|
|
e99c682637 | ||
|
|
c815f70831 | ||
|
|
0da50eaa79 | ||
|
|
b0af84a549 | ||
|
|
b9631e8521 | ||
|
|
f664f7a201 | ||
|
|
f72b3882c3 | ||
|
|
ea47a2973c | ||
|
|
04be9ca670 | ||
|
|
6f0baf6ca9 | ||
|
|
1f5ec6b8d5 | ||
|
|
a2a91520aa | ||
|
|
fd7b5d3de7 | ||
|
|
30ea844c43 | ||
|
|
efac53b121 | ||
|
|
73c0ef59c1 | ||
|
|
7e65ab2d3b | ||
|
|
fec769f632 | ||
|
|
90e42642b6 | ||
|
|
9d9610a882 | ||
|
|
1fc81f4b66 | ||
|
|
4f0b1e847c | ||
|
|
9567ac32f2 | ||
|
|
8dd9cfa2a6 | ||
|
|
dbda8ef893 | ||
|
|
cd143c15d5 | ||
|
|
509a388ccc | ||
|
|
76c6482495 | ||
|
|
010a44f831 | ||
|
|
e6b0d644d4 | ||
|
|
02dc68c899 | ||
|
|
11ac97cd09 | ||
|
|
61f6565321 | ||
|
|
55d951f211 | ||
|
|
143ce6fcd5 | ||
|
|
e264c6ad2e | ||
|
|
036b6785f1 | ||
|
|
caf5cc90ae | ||
|
|
b05e98b1b6 | ||
|
|
31d0779377 | ||
|
|
6b056e915e | ||
|
|
9d6c0dc580 | ||
|
|
6e973e07f4 | ||
|
|
c8098b9eac | ||
|
|
ed20ce388a | ||
|
|
33e01e431d | ||
|
|
7d631e4959 | ||
|
|
29eb566448 | ||
|
|
a770d2a972 | ||
|
|
688cffb031 | ||
|
|
2cccc26541 | ||
|
|
f96f083bb5 | ||
|
|
2e078aff7d | ||
|
|
bd1f192dc4 | ||
|
|
b62f241051 | ||
|
|
95d1ac354e | ||
|
|
54728f5d57 | ||
|
|
d9356b0f86 | ||
|
|
6b68d9d90b | ||
|
|
359a8c4a81 | ||
|
|
dcb95d131b | ||
|
|
f4e37ba7c0 | ||
|
|
1cbceec0e1 | ||
|
|
5b3c5407a1 | ||
|
|
27a120c7c3 | ||
|
|
375f3e8bc1 | ||
|
|
a75b4af374 | ||
|
|
b2a4cd488d | ||
|
|
1d8d203e9e | ||
|
|
4e7fe460a5 | ||
|
|
9be14a63b1 | ||
|
|
afd3c76088 | ||
|
|
6b697506c3 | ||
|
|
3eba296157 | ||
|
|
1b51de08f5 | ||
|
|
3e37f3fa54 | ||
|
|
a18679e95d | ||
|
|
0154f81e33 | ||
|
|
366931952b | ||
|
|
606fc352aa | ||
|
|
75f817b39c | ||
|
|
0bc49bf244 | ||
|
|
930a84b459 | ||
|
|
21c89e8163 | ||
|
|
b3770cd26c | ||
|
|
0cd4d44bd3 | ||
|
|
af15e73e64 | ||
|
|
33f176b8f9 | ||
|
|
42f21972fd | ||
|
|
2d79e54c46 | ||
|
|
224408b0e8 | ||
|
|
610e447d7c | ||
|
|
c2c0e19305 | ||
|
|
e8c4b0d57c | ||
|
|
36e7684d9a | ||
|
|
795c079af0 | ||
|
|
94e1d3f0fc | ||
|
|
1df002de81 | ||
|
|
b7115659b3 | ||
|
|
258ec6b89a | ||
|
|
d1ecdfc510 | ||
|
|
a807e66d4a | ||
|
|
8f9921d00c | ||
|
|
99bc4e9a87 | ||
|
|
9289cfdde9 | ||
|
|
bedbe3caad | ||
|
|
2e329426ab | ||
|
|
4c68d03457 | ||
|
|
0911fa4fa2 | ||
|
|
c5737c5f74 | ||
|
|
106198fa20 | ||
|
|
4eb74a3c93 | ||
|
|
3f0bcc9568 | ||
|
|
f0c35fde6d | ||
|
|
8357eeb762 | ||
|
|
61da54d6ca | ||
|
|
efea47833d | ||
|
|
24ea08b6d3 | ||
|
|
2808b334ed | ||
|
|
96159cf739 | ||
|
|
577dfa4f54 | ||
|
|
66075d620e | ||
|
|
60f1d21914 | ||
|
|
b108621a59 | ||
|
|
4a4e703f16 | ||
|
|
61984730ac | ||
|
|
f196d3bab8 | ||
|
|
7da45cb49e | ||
|
|
e994305da6 | ||
|
|
2af37b484e | ||
|
|
faf41f7d96 | ||
|
|
7629e29397 | ||
|
|
1cff7fcfea | ||
|
|
694cf6e958 | ||
|
|
0e12fbb2a0 | ||
|
|
450ad45882 | ||
|
|
d674e50591 | ||
|
|
61f2f4b761 | ||
|
|
baa2f49b14 | ||
|
|
8c0bd234d8 | ||
|
|
c4fd41562f | ||
|
|
a1d1b4e49f | ||
|
|
96fb7a45f7 | ||
|
|
d5eedd2c65 | ||
|
|
fe4f907099 | ||
|
|
1b45eaf3de | ||
|
|
cfbc0a1579 | ||
|
|
db1b99d8dd | ||
|
|
65a880e9fa | ||
|
|
37b4005d3e | ||
|
|
70faa252e7 | ||
|
|
3620be8dbc | ||
|
|
21c64dd60f | ||
|
|
fb69d790ce | ||
|
|
debd066edd | ||
|
|
f58d81b1e9 | ||
|
|
8d507f161b | ||
|
|
b015f7c801 | ||
|
|
80abe952ba | ||
|
|
c12162407c | ||
|
|
7f5c3b223a | ||
|
|
2f3e4ebf39 | ||
|
|
2c14f8587e | ||
|
|
42224052e2 | ||
|
|
a8dd5aa0fc | ||
|
|
f3d0a9bc3f | ||
|
|
d629b9e36a | ||
|
|
4d54ba2200 | ||
|
|
0035ef9194 | ||
|
|
fcb20296d7 | ||
|
|
6bb9080017 | ||
|
|
bbde16dc08 | ||
|
|
ac9716f193 | ||
|
|
8a2bc1c21b | ||
|
|
942b474ad7 | ||
|
|
f3ef9b671f | ||
|
|
3538631e8e | ||
|
|
1577ab04e1 | ||
|
|
7f2dfaa5b4 | ||
|
|
fd126746f7 | ||
|
|
63f7e9feb0 | ||
|
|
5eb380e103 | ||
|
|
832e821919 | ||
|
|
197e3f144d | ||
|
|
056b5b41e2 | ||
|
|
15d40fd64a | ||
|
|
979d3da69c | ||
|
|
72984cc4a8 | ||
|
|
0a7a815124 | ||
|
|
1ce68a49c6 | ||
|
|
b1b6abf285 | ||
|
|
9dfd6970f1 | ||
|
|
3583c13339 | ||
|
|
00ab198c9f | ||
|
|
669d9a89ca | ||
|
|
9c54603726 | ||
|
|
dc09a50472 | ||
|
|
68eb7031e2 | ||
|
|
19623cac21 | ||
|
|
4ca25ca533 | ||
|
|
178c49a430 | ||
|
|
32e2cd9f06 | ||
|
|
7aa514d9ba | ||
|
|
7c2575d723 | ||
|
|
f93ea20d5e | ||
|
|
73cb6ff00d | ||
|
|
72267fa60b | ||
|
|
6b6a27e849 | ||
|
|
daea10121c | ||
|
|
999a1e514b | ||
|
|
be30960366 | ||
|
|
38e5084018 | ||
|
|
fdd9bb1af6 | ||
|
|
81546820ab | ||
|
|
84e87f0e8a | ||
|
|
901592a88e | ||
|
|
24f908d9be | ||
|
|
f62ff0ad66 | ||
|
|
8e0ecbeb8f | ||
|
|
095367f760 | ||
|
|
5d34eb12e0 | ||
|
|
d4e760efe1 | ||
|
|
75ab8e697b | ||
|
|
f4b05d46ed | ||
|
|
04c5f2c36a | ||
|
|
db50f95482 | ||
|
|
0e52a08a47 | ||
|
|
7b5d49ef60 | ||
|
|
430ba60b33 | ||
|
|
3af1f3bc63 | ||
|
|
bdcb94af81 | ||
|
|
2ea9e723c2 | ||
|
|
e19091d809 | ||
|
|
64ab59c0e0 | ||
|
|
4707b363aa | ||
|
|
1a72245c15 | ||
|
|
dea7b9050d | ||
|
|
3bd810fedc | ||
|
|
f9cbf8361d | ||
|
|
eccd4d0325 | ||
|
|
e0decf1233 | ||
|
|
100927f16c | ||
|
|
bb670f6658 | ||
|
|
d37992aaf9 | ||
|
|
9048ee533d | ||
|
|
2b1e5927ca | ||
|
|
b5e03030d1 | ||
|
|
65056bfa72 | ||
|
|
c50bb90374 | ||
|
|
ec4fc265e0 | ||
|
|
8ea41af5c4 | ||
|
|
966331dac7 | ||
|
|
cf056bace7 | ||
|
|
405a455906 | ||
|
|
3a8b431a5b | ||
|
|
3ce0c17237 | ||
|
|
61a2e0f104 | ||
|
|
7c44251216 | ||
|
|
26e70664d6 | ||
|
|
8ac27cc798 | ||
|
|
d314164fed | ||
|
|
d2cbed151b | ||
|
|
fc06ae58b2 | ||
|
|
a8768c78a2 | ||
|
|
ee8763f60d | ||
|
|
db633330fe | ||
|
|
c1ffafd663 | ||
|
|
72f35dc914 | ||
|
|
e5f82f53b9 | ||
|
|
e39e6893e0 | ||
|
|
9ab77d65f4 | ||
|
|
8ed96cad1d | ||
|
|
7795eb8239 | ||
|
|
207c7ab1e0 | ||
|
|
27af79684f | ||
|
|
6b61a8eed1 | ||
|
|
181e6eac75 | ||
|
|
fd1979857c | ||
|
|
448bc3facd | ||
|
|
97cabadb88 | ||
|
|
8e284a70b7 | ||
|
|
73f9febe06 | ||
|
|
6a6cc22e9c | ||
|
|
b293639b76 | ||
|
|
f06036be09 | ||
|
|
867571af78 | ||
|
|
f6314d3124 | ||
|
|
1e87dd7903 | ||
|
|
3b6af2f0c2 | ||
|
|
5bdff41641 | ||
|
|
67e9d105cb | ||
|
|
f1fc99f16f | ||
|
|
f89e359d53 | ||
|
|
77ec170a50 | ||
|
|
34320f5f20 | ||
|
|
a26271e46e | ||
|
|
e2e7466250 | ||
|
|
1e24cc4643 | ||
|
|
dfc23c3528 | ||
|
|
cd11a5dc27 | ||
|
|
899734296b | ||
|
|
7a3a81c152 | ||
|
|
e62a4a05ac | ||
|
|
463ca207ce | ||
|
|
da6e1b31ea | ||
|
|
8c783b1680 | ||
|
|
efce88ff12 | ||
|
|
01608b7e18 | ||
|
|
a5f0e0395a | ||
|
|
0b723174fd | ||
|
|
5d248bf0df | ||
|
|
c039ccdeb0 | ||
|
|
d88fb32a73 | ||
|
|
37ac409586 | ||
|
|
7b24e94c66 | ||
|
|
e12cd2a50c | ||
|
|
98b2ba4fc1 | ||
|
|
2f0afdccc1 | ||
|
|
79734df554 | ||
|
|
c52657fa1a | ||
|
|
9cac8409cd | ||
|
|
18703ce02d | ||
|
|
709a166bd6 | ||
|
|
8048e6297c | ||
|
|
fb0dded103 | ||
|
|
055e969e7a | ||
|
|
f10db8a30e | ||
|
|
c19af3525e | ||
|
|
7c60ccfc35 | ||
|
|
84cba33aab | ||
|
|
a52b1ec64f | ||
|
|
f30c4720ae | ||
|
|
7fc8c02688 | ||
|
|
54a7a0d534 | ||
|
|
8d73160a75 | ||
|
|
ff10602c65 | ||
|
|
ca50fe386d | ||
|
|
39f3c6e41d | ||
|
|
ba1b96e518 | ||
|
|
ef486b2cc6 | ||
|
|
06f3cb4f8e | ||
|
|
074f5ff996 | ||
|
|
8c26f32d5f | ||
|
|
9a2ee54389 | ||
|
|
ab69c03698 | ||
|
|
fab1f4e7a0 | ||
|
|
41eed484c1 | ||
|
|
7d18f9bdde | ||
|
|
3a48c3de7a | ||
|
|
d769a9936b | ||
|
|
1697cb3b1a | ||
|
|
62aa32a417 | ||
|
|
a0d0852838 | ||
|
|
2f479cae69 | ||
|
|
4820d57fa8 | ||
|
|
04e3b0b3c1 | ||
|
|
a7f78b9f68 | ||
|
|
f3d8eb4665 | ||
|
|
090f79b951 | ||
|
|
88c0dbf661 | ||
|
|
9e3822ceaf | ||
|
|
007b0a8fe6 | ||
|
|
7f0ebf8871 | ||
|
|
5414e94a1a | ||
|
|
461dee8657 | ||
|
|
297b6193fe | ||
|
|
4b74e40a5f | ||
|
|
5a9b08dec2 | ||
|
|
5e6f9f79a2 | ||
|
|
e2f93e6ae1 | ||
|
|
93314b59fb | ||
|
|
29269c6686 | ||
|
|
3c84b6e2f6 | ||
|
|
04fb708543 | ||
|
|
df302f277c | ||
|
|
5e63e663bb | ||
|
|
ca10cb2d37 | ||
|
|
c9854153f8 | ||
|
|
129e3c6326 | ||
|
|
66996711ae | ||
|
|
8fe37cea51 | ||
|
|
de64b6f267 | ||
|
|
9a9d9c7cc1 | ||
|
|
a191e9762a | ||
|
|
a7b35c6e22 | ||
|
|
5034346b67 | ||
|
|
661f64b902 | ||
|
|
bbc83f721c | ||
|
|
01f4541331 | ||
|
|
0e4a894f62 | ||
|
|
1c135a9b5b | ||
|
|
e65c85ce73 | ||
|
|
26b58991f9 | ||
|
|
8390df37ca | ||
|
|
371fc73f24 | ||
|
|
921dae5444 | ||
|
|
9b3abbec89 | ||
|
|
6935baba5b | ||
|
|
dec1e32f96 | ||
|
|
710c2ccfcd | ||
|
|
8e66e534ae | ||
|
|
0f5f30b993 | ||
|
|
b199f733f7 | ||
|
|
0cdcf3a3e0 | ||
|
|
8e09486e82 | ||
|
|
0c24b78573 | ||
|
|
1436be9699 | ||
|
|
0489ad7c62 | ||
|
|
c553570533 | ||
|
|
bda112297f | ||
|
|
331a4e4406 | ||
|
|
a9faf8ceff | ||
|
|
2866d1ace9 | ||
|
|
11a74f7a31 | ||
|
|
634a2035ee | ||
|
|
ffada9257d | ||
|
|
e09164e5b3 | ||
|
|
de1a5f3034 | ||
|
|
86e83faef3 | ||
|
|
9f06c8df76 | ||
|
|
6e511de7db | ||
|
|
e34aae9982 | ||
|
|
675b388b8e | ||
|
|
7d239fe4ac | ||
|
|
edd92caba1 | ||
|
|
5c3b4abf42 | ||
|
|
d3a3466b14 | ||
|
|
4399383781 | ||
|
|
bb383998bb | ||
|
|
ffeb174ca1 | ||
|
|
a90d74dde8 | ||
|
|
9d7fd79e76 | ||
|
|
6f29d234eb | ||
|
|
6f5517f602 | ||
|
|
cc43c745b2 | ||
|
|
db8d961b27 | ||
|
|
a0bdec2846 | ||
|
|
5bbcd386fa | ||
|
|
7657632024 | ||
|
|
ab29063a97 | ||
|
|
c06ef23eb1 | ||
|
|
7b2f7aa827 | ||
|
|
7113c10f4b | ||
|
|
14033946e5 | ||
|
|
6e0e056ca7 | ||
|
|
7aa4f0ccdb | ||
|
|
4b04450fa6 | ||
|
|
ad81560be5 | ||
|
|
5c26faa20e | ||
|
|
bd85fa2457 | ||
|
|
430136fdc9 | ||
|
|
a616aa8e55 | ||
|
|
05b9166c25 | ||
|
|
71770eb92e | ||
|
|
2089a2a956 | ||
|
|
488efa2316 | ||
|
|
44551dad2d | ||
|
|
00e0e72bca | ||
|
|
a611b70087 | ||
|
|
757ed2dfe7 | ||
|
|
8971a67aca | ||
|
|
5a343da5cc | ||
|
|
4c77c1691b | ||
|
|
aadff33011 | ||
|
|
25d7705379 | ||
|
|
867ba3c7da | ||
|
|
3f08d9604e | ||
|
|
5d813aa4d0 | ||
|
|
ce3a1ddcb0 | ||
|
|
e37752f957 | ||
|
|
40d920ddc9 | ||
|
|
4362eb79e6 | ||
|
|
f6c9af488b | ||
|
|
a34ac6a596 | ||
|
|
3b3baa996b | ||
|
|
d6b81a9721 | ||
|
|
a460c753e7 | ||
|
|
9f59e956fa | ||
|
|
bd02eb8e6b | ||
|
|
a266790a25 | ||
|
|
3462e3b6c1 | ||
|
|
ed29944b91 | ||
|
|
a0251b3256 | ||
|
|
557474095f | ||
|
|
b7dd267807 | ||
|
|
58a0b1d2c3 | ||
|
|
d8acc3a8f2 | ||
|
|
5f21c75e02 | ||
|
|
79d72b6292 | ||
|
|
aa67c738a1 | ||
|
|
117628bf7e | ||
|
|
70dbbf52f0 | ||
|
|
99bf2c6f9e | ||
|
|
3fdeea7f65 | ||
|
|
ea9d110036 | ||
|
|
16ad232e0d | ||
|
|
5b8e5fce20 | ||
|
|
0633d703d0 | ||
|
|
ec6ce9fcd8 | ||
|
|
c9e53d5a30 | ||
|
|
828e10773c | ||
|
|
34b5c1a1b9 | ||
|
|
b2a7975493 | ||
|
|
f0af686d17 | ||
|
|
eda1121054 | ||
|
|
d97eb240d9 | ||
|
|
8c296d96c7 | ||
|
|
65a49bb6e4 | ||
|
|
cfedc90fdd | ||
|
|
5665a62938 | ||
|
|
36521869ae | ||
|
|
84fd7a49ad | ||
|
|
24b5f05522 | ||
|
|
17415424bf | ||
|
|
920c0fdb62 | ||
|
|
40414f2823 | ||
|
|
3d43bc0480 | ||
|
|
7bee5f1ab6 | ||
|
|
a43f5c8d21 | ||
|
|
8361069344 | ||
|
|
c9661e2732 | ||
|
|
bd13cf84a1 | ||
|
|
e54cfc002b | ||
|
|
5aac63d9f5 | ||
|
|
6a19bbee7d | ||
|
|
2e5c4b4515 | ||
|
|
79d1aaf7f5 | ||
|
|
a659969bcf | ||
|
|
53bdf9dac4 | ||
|
|
ad394fb090 | ||
|
|
92a123a47d | ||
|
|
755173bd2e | ||
|
|
27477402c9 | ||
|
|
dc9c41e119 | ||
|
|
3c7f9e7ba4 | ||
|
|
fbf018598e | ||
|
|
83b4dcb55c | ||
|
|
5812571df4 | ||
|
|
b1c688abe8 | ||
|
|
f4b30bbdd7 | ||
|
|
e4008862ce | ||
|
|
2b7079eed2 | ||
|
|
983685fde3 | ||
|
|
eef1cc716d | ||
|
|
34e2a9dc37 | ||
|
|
1786692406 | ||
|
|
c37afce303 | ||
|
|
1ea99cdd4d | ||
|
|
4c1d22b8a6 | ||
|
|
5f22c93db7 | ||
|
|
13a42f1d9e | ||
|
|
c4d5d85c3e | ||
|
|
d915ccec6e | ||
|
|
ea1b70191c | ||
|
|
19815c3bce | ||
|
|
66fb6b5a1c | ||
|
|
94ac87f4f5 | ||
|
|
79d5bf66a7 | ||
|
|
a4535c92c3 | ||
|
|
cecdb15692 | ||
|
|
3c08eae85b | ||
|
|
db928ea1ae | ||
|
|
bb002356b4 | ||
|
|
431e78cf09 | ||
|
|
81b9ec50b0 | ||
|
|
e0ba803ca9 | ||
|
|
7ae57483f3 | ||
|
|
d22640ef4e | ||
|
|
f3eeeb760f | ||
|
|
695e112039 | ||
|
|
133e67adb8 | ||
|
|
6079cd3df8 | ||
|
|
6f4fd2dc6e | ||
|
|
b30eb9c00c | ||
|
|
1236d8be19 | ||
|
|
cb35ecb4b0 | ||
|
|
54550aa002 | ||
|
|
d3db963dce | ||
|
|
1dde23a0c9 | ||
|
|
5feccc73c7 | ||
|
|
1cf13a7c1a | ||
|
|
7289ac645a | ||
|
|
699909f808 | ||
|
|
344610e24b | ||
|
|
092901b9ea | ||
|
|
3ac6b34f4b | ||
|
|
d56b961c47 | ||
|
|
858a73e187 | ||
|
|
1623aee1e0 | ||
|
|
c0a633ea1d | ||
|
|
5628c85b51 | ||
|
|
2e1accc0f3 | ||
|
|
93b747f1ba | ||
|
|
21c16b4a51 | ||
|
|
e5e1e165b9 | ||
|
|
8ae39ae8d4 | ||
|
|
110e01a861 | ||
|
|
578e774778 | ||
|
|
d7d13e458c | ||
|
|
0bf579cf27 | ||
|
|
77cefa924c | ||
|
|
1fe26901af | ||
|
|
0dd50cf3d8 | ||
|
|
54b3c711c3 | ||
|
|
f404161d23 | ||
|
|
5a13068aaa | ||
|
|
32067b9adf | ||
|
|
ea2f5f0035 | ||
|
|
ea6540ef90 | ||
|
|
1d5c1de5d3 | ||
|
|
4b11d87a22 | ||
|
|
c2149f9ea6 | ||
|
|
73a4994cac | ||
|
|
c9a4a6975c | ||
|
|
1a1aa37a0e | ||
|
|
7d3abdc512 | ||
|
|
db4c2243e3 | ||
|
|
6dc243e1af | ||
|
|
adb5fb3bee | ||
|
|
7955319771 | ||
|
|
3da76522f8 | ||
|
|
c9ac1b5a06 | ||
|
|
51dff6b537 | ||
|
|
1f4b55e98e | ||
|
|
229ea27050 | ||
|
|
505b4c434d | ||
|
|
12ab6872ec | ||
|
|
4c78e887e1 | ||
|
|
8871655a9b | ||
|
|
db1966c156 | ||
|
|
d4c0c8940b | ||
|
|
d4134195ea | ||
|
|
a8fd1b4c16 | ||
|
|
086473c8eb | ||
|
|
5642ef61ca | ||
|
|
fec7c62b17 | ||
|
|
e046b1bfdb | ||
|
|
01007986dc | ||
|
|
ad56ba1bfa | ||
|
|
54c2d5a6cc | ||
|
|
25ad84e5cb | ||
|
|
dcdf8a4d5c | ||
|
|
5d24be8c51 | ||
|
|
fa42efcf91 | ||
|
|
7f4f778bb1 | ||
|
|
8a2e5cace8 | ||
|
|
23c66b6cfe | ||
|
|
b65fe814a0 | ||
|
|
e74c8587bd | ||
|
|
ab34b86574 | ||
|
|
011ecd980d | ||
|
|
9ca1c6666e | ||
|
|
ba5316ca8e | ||
|
|
f957227576 | ||
|
|
70f763dbe0 | ||
|
|
f8201e6478 | ||
|
|
e053941467 | ||
|
|
17e2478522 | ||
|
|
17df7141ae | ||
|
|
5167dee0e3 | ||
|
|
a1a596b02a | ||
|
|
27f98d24eb | ||
|
|
51ef4568dd | ||
|
|
4c731de8b7 | ||
|
|
fc692cb540 | ||
|
|
cedfade08d | ||
|
|
eedbc7f436 | ||
|
|
b6a683eb6e | ||
|
|
df677ff8aa | ||
|
|
1d8b352d2d | ||
|
|
c8432e3763 | ||
|
|
b3f88735a8 | ||
|
|
789b56872c | ||
|
|
009ed26fd2 | ||
|
|
5ed0ce79ab | ||
|
|
8b8a82bb67 | ||
|
|
94c22fec46 | ||
|
|
8be760b594 | ||
|
|
42b4ec310f | ||
|
|
4ea676b229 | ||
|
|
dda676b1b2 | ||
|
|
f7a3dbc5ed | ||
|
|
1f3947ea4c | ||
|
|
cb7589cc95 | ||
|
|
2ca4b30553 | ||
|
|
bb238c4106 | ||
|
|
4b0b49d1ed | ||
|
|
dd080de16c | ||
|
|
1ae257944b | ||
|
|
a2c8cfb84d | ||
|
|
c01740d516 | ||
|
|
1ce5cd154a | ||
|
|
1fce27f0c3 | ||
|
|
4fc985b518 | ||
|
|
0e999f281b | ||
|
|
aadc802fdd | ||
|
|
d8a7589752 | ||
|
|
f1021ab820 | ||
|
|
8bd3cccc08 | ||
|
|
78fbfa1dde | ||
|
|
16dd841ce5 | ||
|
|
992de38184 | ||
|
|
835e86ad19 | ||
|
|
ef5fb7a98e | ||
|
|
e8cb3cbfa4 | ||
|
|
68b2c9e7d3 | ||
|
|
e78427483c | ||
|
|
25364aa2a6 | ||
|
|
525d2df3cc | ||
|
|
701031a473 | ||
|
|
1960e02ab7 | ||
|
|
ca2ed1c941 | ||
|
|
bde8528859 | ||
|
|
86392857c5 | ||
|
|
95c6c16851 | ||
|
|
ce4f0c4fee | ||
|
|
2d081e6ce6 | ||
|
|
000106200f | ||
|
|
2bb4274517 | ||
|
|
5cd81b8c92 | ||
|
|
5712053ad8 | ||
|
|
192db1c343 | ||
|
|
a3bd57489a | ||
|
|
d69e76959b | ||
|
|
6d784a1a7e | ||
|
|
11d2bca8a7 | ||
|
|
f922e84eb6 | ||
|
|
e2bca737f0 | ||
|
|
940ce98d2c | ||
|
|
72590e6b8f | ||
|
|
3e81ca7da5 | ||
|
|
c4fa7a965d | ||
|
|
1a6e14c3bb | ||
|
|
7379d8a54d | ||
|
|
b63464d239 | ||
|
|
1dac4b2dc1 | ||
|
|
44e7b36a8b | ||
|
|
a26c677df4 | ||
|
|
5d10dda5a1 | ||
|
|
0253a46dbb | ||
|
|
9593059258 | ||
|
|
3f0efc2a6f | ||
|
|
b9593adc7c | ||
|
|
6cf3b54b4b | ||
|
|
78411d29a7 | ||
|
|
f8a49c41ef | ||
|
|
a0a0c8e308 | ||
|
|
e5814dad73 | ||
|
|
f076594288 | ||
|
|
7dfe0bf9b2 | ||
|
|
d9ce8828c9 | ||
|
|
cb2df234ae | ||
|
|
7d73dc6602 | ||
|
|
16bd8cef38 | ||
|
|
f2567f9af4 | ||
|
|
c363758449 | ||
|
|
dfdeb8be9b | ||
|
|
d1c8f60ca9 | ||
|
|
2fb961c922 | ||
|
|
2e17b28994 | ||
|
|
c3f558b034 | ||
|
|
65ce1a04b2 | ||
|
|
3af4a19f76 | ||
|
|
5178f69f18 | ||
|
|
52e2005b3e | ||
|
|
94fa51e3f7 | ||
|
|
590547e12d | ||
|
|
c6832d2513 | ||
|
|
1fd63c30e9 | ||
|
|
f08ae9f2ea | ||
|
|
5c61e97358 | ||
|
|
87e38e2617 | ||
|
|
92e1856caa | ||
|
|
20c099b7ef | ||
|
|
7eb74c7e2a | ||
|
|
8d63c300e2 | ||
|
|
01ccdd3ae1 | ||
|
|
ab074726df | ||
|
|
ed26458a24 | ||
|
|
fcf1d34e55 | ||
|
|
19f99ea273 | ||
|
|
fe5bb76def | ||
|
|
7ecf508453 | ||
|
|
83e6e44eab | ||
|
|
69a93342c0 | ||
|
|
e17338622a | ||
|
|
a67fd7ea99 | ||
|
|
cf2b8afbe9 | ||
|
|
a1e7761384 | ||
|
|
d068915b42 | ||
|
|
adeb0d48fc | ||
|
|
55c89ea865 | ||
|
|
8bd07e358f | ||
|
|
01113e82f3 | ||
|
|
6d79582890 | ||
|
|
2ae3c89406 | ||
|
|
1818102ffe | ||
|
|
406d6dd6fc | ||
|
|
c8ef854f01 | ||
|
|
87dcaf5a00 | ||
|
|
c3bdd0e537 | ||
|
|
c23fd6e66f | ||
|
|
e809eee896 | ||
|
|
c44ef2126c | ||
|
|
e2bfb5633b | ||
|
|
064ee8ba8f | ||
|
|
a5c130446e | ||
|
|
4162817c0b | ||
|
|
81cab6e089 | ||
|
|
d78204d147 | ||
|
|
d8b523d067 | ||
|
|
c4cfad6069 | ||
|
|
5bddb88ce2 | ||
|
|
8c4ee69aeb | ||
|
|
b3a533f8ce | ||
|
|
a885314a39 | ||
|
|
0567a76445 | ||
|
|
d6dc2d6eab | ||
|
|
b75a694682 | ||
|
|
2e7e9b73a0 | ||
|
|
7a11523692 | ||
|
|
f85a9866fe | ||
|
|
9b05c27938 | ||
|
|
fd96729362 | ||
|
|
c57cc096f8 | ||
|
|
c8efd0a465 | ||
|
|
db60139845 | ||
|
|
cadefd323a | ||
|
|
baab88f42a | ||
|
|
767b74dd35 | ||
|
|
90e8287f43 | ||
|
|
d8b7e5b8fd | ||
|
|
7769447283 | ||
|
|
d6a790cf13 | ||
|
|
033c66363d | ||
|
|
3ff1789963 | ||
|
|
9737c0c4dd | ||
|
|
b201383a80 | ||
|
|
2253b82304 | ||
|
|
2581446d85 | ||
|
|
a6291b286c | ||
|
|
96a396bfcb | ||
|
|
0833a11686 | ||
|
|
9c7f7f3d32 | ||
|
|
7847fe8074 | ||
|
|
c57d25ac51 | ||
|
|
1341b5b9f8 | ||
|
|
fb54e9e103 | ||
|
|
3a835dde7d | ||
|
|
128a4a36ca | ||
|
|
255bb6dd07 | ||
|
|
786b1e3a30 | ||
|
|
d5f38a558e | ||
|
|
ce5d4b7db8 | ||
|
|
8c0b36fe9e | ||
|
|
c7e6459c64 | ||
|
|
86e31e696d | ||
|
|
be0b1bb994 | ||
|
|
03e74bfeb4 | ||
|
|
972223cd50 | ||
|
|
761b7b9354 | ||
|
|
6a3d1895d9 | ||
|
|
d1178a26ce | ||
|
|
8ffdfa3cb1 | ||
|
|
384e56b9b4 | ||
|
|
d198e962b0 | ||
|
|
0136fdadbb | ||
|
|
c616568830 | ||
|
|
995d2c1ede | ||
|
|
051a5e9a38 | ||
|
|
60d89097de | ||
|
|
6c35255549 | ||
|
|
c985d8846d | ||
|
|
9a8ab26381 | ||
|
|
711622fd5b | ||
|
|
96474823b5 | ||
|
|
bbf4b54613 | ||
|
|
9795c5dd6b | ||
|
|
addcace80d | ||
|
|
77e43a5fa8 | ||
|
|
b751188e56 | ||
|
|
1ad9a15864 | ||
|
|
d0d7878e0a | ||
|
|
be5d365348 | ||
|
|
a8e0002a64 | ||
|
|
bf75cf7225 | ||
|
|
c024b680bc | ||
|
|
c896475765 | ||
|
|
101fdb3598 | ||
|
|
b13505afdf | ||
|
|
9d96b171a0 | ||
|
|
8b5a0cde69 | ||
|
|
bed7593cdd | ||
|
|
9fed946567 | ||
|
|
4d0bc0ae39 | ||
|
|
f9824aa7de | ||
|
|
4d2522964a | ||
|
|
dbe4a59b8e | ||
|
|
918f8a3ed4 | ||
|
|
f645596606 | ||
|
|
d778dd081d | ||
|
|
f6ed02c3fb | ||
|
|
7fa5dd7a35 | ||
|
|
a3186af099 | ||
|
|
a2d95ac742 | ||
|
|
10715bbea7 | ||
|
|
89fcb12556 | ||
|
|
cc3d7ddee5 | ||
|
|
cc01f99acb | ||
|
|
62b75190bb | ||
|
|
520124c1be | ||
|
|
e251bfcbaf | ||
|
|
aef809348f | ||
|
|
2d4a8774b8 | ||
|
|
b55c8fd828 | ||
|
|
dfff091b5f | ||
|
|
47eb7efafa | ||
|
|
b2a7fff26e | ||
|
|
5f70123723 | ||
|
|
dd629da8d3 | ||
|
|
74f7d52d95 | ||
|
|
7a65a990ba | ||
|
|
fe0076e291 | ||
|
|
1a8bc06cc6 | ||
|
|
8c41081a5c | ||
|
|
5b40eed554 | ||
|
|
b1c4d34eef | ||
|
|
0152b607f8 | ||
|
|
ab6e72047b | ||
|
|
15399bfe95 | ||
|
|
0ff748987b | ||
|
|
58e0e7736b | ||
|
|
2d1b2ca938 | ||
|
|
9a4152eb2d | ||
|
|
6ab443545f | ||
|
|
98a9b4a10c | ||
|
|
a6251606dd | ||
|
|
c3b21e143c | ||
|
|
b496593883 | ||
|
|
4ef4b019ca | ||
|
|
a8021531ab | ||
|
|
93fd948978 | ||
|
|
a1b3740dc6 | ||
|
|
40920457cb | ||
|
|
5039c84fd0 | ||
|
|
220a43bf46 | ||
|
|
45d3e19c38 | ||
|
|
5bab565cfe | ||
|
|
319a4282c8 | ||
|
|
c6aa8bc8e9 | ||
|
|
6f1bfa202e | ||
|
|
6fa9f86d1c | ||
|
|
019a9527d2 | ||
|
|
d100ca485f | ||
|
|
35ab6900ee | ||
|
|
c8570302f5 | ||
|
|
74f10486bc | ||
|
|
2b12425a62 | ||
|
|
c600aad7a7 | ||
|
|
67b2f0a977 | ||
|
|
70c6b48a07 | ||
|
|
76084f8538 | ||
|
|
64c408d2b7 | ||
|
|
73b050ae34 | ||
|
|
59991393ca | ||
|
|
69b2717b62 | ||
|
|
f2a323e048 | ||
|
|
7d07e6ea51 | ||
|
|
7c846972bf | ||
|
|
4f76c258af | ||
|
|
eca2afb982 | ||
|
|
9ff6934c83 | ||
|
|
e04839765d | ||
|
|
d0c655109f | ||
|
|
b28b55abb1 | ||
|
|
c3a0db1aba | ||
|
|
5e929d7d01 | ||
|
|
17f113f8cd | ||
|
|
445cd4ccda | ||
|
|
55845bbbb9 | ||
|
|
1976481ba2 | ||
|
|
5f17edbc72 | ||
|
|
6f7fe4b481 | ||
|
|
66ebe6e690 | ||
|
|
a9cd67e0ce | ||
|
|
994a470fbf | ||
|
|
0ce0684dae | ||
|
|
377eb4782a | ||
|
|
f1a79e6b9f | ||
|
|
007a1e4659 | ||
|
|
fcb873b6dd | ||
|
|
a66d1ad855 | ||
|
|
76a5950f19 | ||
|
|
b7a91bdb03 | ||
|
|
e4bbc5c50b | ||
|
|
b481ccd749 | ||
|
|
e7b9e55599 | ||
|
|
05eaa7135f | ||
|
|
d063b319e8 | ||
|
|
be4fd56660 | ||
|
|
a406a3c00b | ||
|
|
c7295da5eb | ||
|
|
505f561e1c | ||
|
|
7bd8477fa1 | ||
|
|
36ef15940e | ||
|
|
f2ba7aefa6 | ||
|
|
73b58b0e87 | ||
|
|
6ce4f096b2 | ||
|
|
3e7ece7f5f | ||
|
|
48a219473e | ||
|
|
887ffd102f | ||
|
|
b1a719dd4c | ||
|
|
b4efe8f374 | ||
|
|
03f844d4be | ||
|
|
a212589865 | ||
|
|
29dfc5bd3c | ||
|
|
a6ac06c47a | ||
|
|
4d914db1db | ||
|
|
68572f106d | ||
|
|
c5ca4db94e | ||
|
|
3980f08cc5 | ||
|
|
f93fa4b613 | ||
|
|
06f2dba92c | ||
|
|
30a14741c9 | ||
|
|
2f39b688f4 | ||
|
|
724a2ef83b | ||
|
|
f7e0e46143 | ||
|
|
83acb47295 | ||
|
|
e5282caea5 | ||
|
|
6a481eed36 | ||
|
|
e145f903de | ||
|
|
2afd1c8663 | ||
|
|
948d02055d | ||
|
|
e2b4c0787a | ||
|
|
2d21e59b54 | ||
|
|
00ccafb90d | ||
|
|
b82e02b5ed | ||
|
|
096550f163 | ||
|
|
81e5963a5d | ||
|
|
14569e4fae | ||
|
|
6cc32a56b9 | ||
|
|
ebdb86c460 | ||
|
|
400c9d6a2d | ||
|
|
e9a1b06746 | ||
|
|
4f3aaa1ede | ||
|
|
187258cc3a | ||
|
|
dfbcb1566b | ||
|
|
e3b0a70eb9 | ||
|
|
790a40ec99 | ||
|
|
a824bec9e1 | ||
|
|
10db0c3c66 | ||
|
|
12620b6152 | ||
|
|
2294283506 | ||
|
|
cebcf6a4fc | ||
|
|
a79a78b6e6 | ||
|
|
c6ad744ce2 | ||
|
|
b430b3c8df | ||
|
|
0b316a8c5e | ||
|
|
b8e93e6099 | ||
|
|
a84a88bf09 | ||
|
|
02d54dd187 | ||
|
|
fb054c7f8d | ||
|
|
77da29b4f7 | ||
|
|
828a9a8c51 | ||
|
|
c680947db5 | ||
|
|
5348f4eafe | ||
|
|
7781498181 | ||
|
|
b8ce139b8a | ||
|
|
75911b6c64 | ||
|
|
bf0d95145d | ||
|
|
4326d560e9 | ||
|
|
65fa6f2f00 | ||
|
|
124629e1d9 | ||
|
|
557fade4a7 | ||
|
|
98a65b5d1d | ||
|
|
caaa35e5a7 | ||
|
|
a7459489ff | ||
|
|
87e59ff876 | ||
|
|
9d87c913e7 | ||
|
|
0e8c010645 | ||
|
|
470d01a508 | ||
|
|
c16b9ed25b | ||
|
|
d498199e8a | ||
|
|
013687dccd | ||
|
|
baf25ca7a7 | ||
|
|
6c28bd884b | ||
|
|
510091f082 | ||
|
|
7db44c113c | ||
|
|
6cbf4306e7 | ||
|
|
777386ea67 | ||
|
|
95e5e90791 | ||
|
|
a86868526e | ||
|
|
f1ab6e2533 | ||
|
|
9f516a8ccc | ||
|
|
e07af68018 | ||
|
|
a37d9a2d8e | ||
|
|
57811b5371 | ||
|
|
7ff9ba4fe6 | ||
|
|
fad34bdbc3 | ||
|
|
22b41d892a | ||
|
|
7a97c7575d | ||
|
|
b0e175ad3d | ||
|
|
0de60aa6aa | ||
|
|
933e10d8a0 | ||
|
|
2efac3d949 | ||
|
|
c33841329d | ||
|
|
f37800560f | ||
|
|
60e61a0627 | ||
|
|
260dbeb3d2 | ||
|
|
70f495b4e1 | ||
|
|
663db8f978 | ||
|
|
c412739040 | ||
|
|
8b13d71fcf | ||
|
|
1b129b289c | ||
|
|
a89ceb96b9 | ||
|
|
9af5f9f094 | ||
|
|
6776c2e536 | ||
|
|
4c3b4219fe | ||
|
|
a09806bb98 | ||
|
|
e175c8cc4d | ||
|
|
a53faf4565 | ||
|
|
dc653ac46c | ||
|
|
c544777d37 | ||
|
|
93a37df90a | ||
|
|
1da02cca4c | ||
|
|
4b1d777ad4 | ||
|
|
fb0916be0f | ||
|
|
806083cb25 | ||
|
|
5ba74e30b8 | ||
|
|
c39e08cb2a | ||
|
|
e4653be9a1 | ||
|
|
cd5765be1e | ||
|
|
c481b06451 | ||
|
|
91ba4618e7 | ||
|
|
fdc5521389 | ||
|
|
e88c915206 | ||
|
|
1e60698053 | ||
|
|
5702bd7ee8 | ||
|
|
8eef3eb582 | ||
|
|
31db353173 | ||
|
|
2c4a0dd998 | ||
|
|
7d7e41dacc | ||
|
|
453a53b372 | ||
|
|
ef68d18f64 | ||
|
|
ded1d2343f | ||
|
|
e6241a2f73 | ||
|
|
467254ec66 | ||
|
|
135e137921 | ||
|
|
e13a5b57d4 | ||
|
|
f1c00cdd18 | ||
|
|
8c3de351b0 | ||
|
|
0bcdb7eb70 | ||
|
|
a92b71fffc | ||
|
|
89960ab715 | ||
|
|
2a369803ae | ||
|
|
b0134a377e | ||
|
|
502c650cd9 | ||
|
|
a1bf8d2229 | ||
|
|
25b743bdec | ||
|
|
dbf7db02a2 | ||
|
|
8c998659c6 | ||
|
|
4e23b3dff5 | ||
|
|
159d3c4c6c | ||
|
|
612b5ae0bc | ||
|
|
60cbe9c1d4 | ||
|
|
4dadd29727 | ||
|
|
e4610b9baa | ||
|
|
926a0f2437 | ||
|
|
9325ec681e | ||
|
|
af383e6c39 | ||
|
|
b000691ab9 | ||
|
|
22812a0aae | ||
|
|
dda7ebfe0d | ||
|
|
9a211af659 | ||
|
|
82459a2802 | ||
|
|
1774fb2d02 | ||
|
|
f0081c7697 | ||
|
|
1e53bedca5 | ||
|
|
cf1c7e7378 | ||
|
|
5c3b569e97 | ||
|
|
cb29dcc238 | ||
|
|
d48b3f1e9a | ||
|
|
a4d60e7bd6 | ||
|
|
1a6e2509c7 | ||
|
|
8159b749f4 | ||
|
|
bec11c2939 | ||
|
|
8a189b6778 | ||
|
|
93c6845a6d | ||
|
|
b659c805fc | ||
|
|
15eaf8dc84 | ||
|
|
cafe89047c | ||
|
|
b5705ff47a | ||
|
|
1b07b25ad2 | ||
|
|
a46163bcd7 | ||
|
|
6531b1ebbc | ||
|
|
dc7bbdce11 | ||
|
|
a29cbc1112 | ||
|
|
afc2099865 | ||
|
|
7d251444e6 | ||
|
|
1c2289dacd | ||
|
|
044ac5d5d3 | ||
|
|
38167ed273 | ||
|
|
e15ffbc856 | ||
|
|
6cf2716615 | ||
|
|
0468b315d4 | ||
|
|
de66c74a91 | ||
|
|
7db73cd215 | ||
|
|
242eceb1c6 | ||
|
|
c2b84db5a2 | ||
|
|
487bee35ab | ||
|
|
9fabeb77bc | ||
|
|
bfea2dec4d | ||
|
|
2ed07850c6 | ||
|
|
b72d36d96f | ||
|
|
e3ff048ff6 | ||
|
|
ceef43681d | ||
|
|
3ec00676e4 | ||
|
|
e6575fb1db | ||
|
|
fa98d733d6 | ||
|
|
2981a10e62 | ||
|
|
551c06f885 | ||
|
|
a1c59071a1 | ||
|
|
13af443057 | ||
|
|
b8e2b0d0f9 | ||
|
|
53cd776bf6 | ||
|
|
180bba8767 | ||
|
|
377cf1662e | ||
|
|
420c747551 | ||
|
|
7c5b4a87f2 | ||
|
|
7ea241b412 | ||
|
|
1547d4ee2f | ||
|
|
3dde4113e7 | ||
|
|
205e6ef18f | ||
|
|
d53830076b | ||
|
|
296a01b7bd | ||
|
|
f47fdd63f7 | ||
|
|
b0b5f5035a | ||
|
|
629ece6e41 | ||
|
|
4c79263dcf | ||
|
|
856b6201dc | ||
|
|
f2160b1479 | ||
|
|
535f6a13b3 | ||
|
|
2ab760e456 | ||
|
|
8b75fbc1e6 | ||
|
|
82f410e955 | ||
|
|
68a19bd39f | ||
|
|
48689622b4 | ||
|
|
acc2075986 | ||
|
|
1984ae1583 | ||
|
|
427f309aea | ||
|
|
84482ad30d | ||
|
|
09b67e9440 | ||
|
|
80cf74d85f | ||
|
|
17e055a00e | ||
|
|
a8d8c9d24e | ||
|
|
99a59763f1 | ||
|
|
0fa3a329e8 | ||
|
|
5fbe532ec5 | ||
|
|
5f3de889d7 | ||
|
|
a8db14196a | ||
|
|
03b10d64a8 | ||
|
|
86892d87e9 | ||
|
|
41218272c4 | ||
|
|
8b5514fa9f | ||
|
|
f14de56712 | ||
|
|
ecc5c9865b | ||
|
|
929a56a6e8 | ||
|
|
4416df8c39 | ||
|
|
fc80610663 | ||
|
|
cb03bfcb80 | ||
|
|
35ed10e252 | ||
|
|
41fc1621b1 | ||
|
|
9fefaef31e | ||
|
|
689a942f19 | ||
|
|
cb9654f1f4 | ||
|
|
a8f8cef484 | ||
|
|
6cf51c3222 | ||
|
|
0d8ae0cabe | ||
|
|
49d6f93d8b | ||
|
|
5173d709e0 | ||
|
|
778c3ab25c | ||
|
|
aa17d9ac9a | ||
|
|
ffe1d9485e | ||
|
|
71abebe837 | ||
|
|
ca07b64af0 | ||
|
|
2fde2ce581 | ||
|
|
cb0da2ca5e | ||
|
|
c0422839b9 | ||
|
|
862b884f02 | ||
|
|
708e745cfd | ||
|
|
bb882a1239 | ||
|
|
6b2bf2fa8e | ||
|
|
2640b43355 | ||
|
|
d201e9b5c5 | ||
|
|
8f0f79506c | ||
|
|
121d2f92cb | ||
|
|
87e641aeda | ||
|
|
27403e2fef | ||
|
|
b5ceef5e68 | ||
|
|
5d68470c95 | ||
|
|
e176b4d8b6 | ||
|
|
218821f694 | ||
|
|
a8f4a61dc2 | ||
|
|
9221604424 | ||
|
|
5bddbd0ca9 | ||
|
|
f8dde93e05 | ||
|
|
489b562232 | ||
|
|
294a0dde63 | ||
|
|
53fbb98d4f | ||
|
|
8a2c08a0c1 | ||
|
|
b15b40ea10 | ||
|
|
0c865f540f | ||
|
|
ef4a92859c | ||
|
|
2a7b06f648 | ||
|
|
6c2ca22b3f | ||
|
|
592690f8f2 | ||
|
|
1eb87e7c73 | ||
|
|
a0e40c1fc1 | ||
|
|
2c920ae1df | ||
|
|
bbde3b36bf | ||
|
|
88a016c516 | ||
|
|
22d4058564 | ||
|
|
79e6c529ea | ||
|
|
7b22b8cd92 | ||
|
|
bc2ae82e81 | ||
|
|
764f4037b0 | ||
|
|
a60454a786 | ||
|
|
d136ad3e57 | ||
|
|
739588f9c3 | ||
|
|
505de4703b | ||
|
|
236a1f2a2d | ||
|
|
91efc5ad87 | ||
|
|
123c816048 | ||
|
|
fab6d05157 | ||
|
|
3240464c7c | ||
|
|
a2ffd27b7c | ||
|
|
af6c921757 | ||
|
|
180e2188ba | ||
|
|
23fbd5919f | ||
|
|
8aec98017a | ||
|
|
9b4fe7d92d | ||
|
|
99f11a01fc | ||
|
|
b3eacb19f6 | ||
|
|
f12840a72e | ||
|
|
f472bc563d | ||
|
|
3e05a5780d | ||
|
|
2454f8d269 | ||
|
|
b4a913e339 | ||
|
|
b82aef65e5 | ||
|
|
3730ce404f | ||
|
|
d7748704d7 | ||
|
|
1690f5475d | ||
|
|
a644bd2b03 | ||
|
|
62ca2e0227 | ||
|
|
d56289f897 | ||
|
|
aa02e72829 | ||
|
|
a878570a8d | ||
|
|
54352225f1 | ||
|
|
0b7d4c8c1e | ||
|
|
2091bf2144 | ||
|
|
0fec7b2599 | ||
|
|
74d314558c | ||
|
|
4fb45c4783 | ||
|
|
6816ecb3ea | ||
|
|
6766825159 | ||
|
|
3e63d6ca5d | ||
|
|
6ca9596807 | ||
|
|
5695fc84e1 | ||
|
|
2aea6362db | ||
|
|
bb70329c25 | ||
|
|
75bc07dc42 | ||
|
|
bac27f1ce3 | ||
|
|
787591dd79 | ||
|
|
c7c353df05 | ||
|
|
8470a9eda6 | ||
|
|
c5adb85741 | ||
|
|
2f9619f02a | ||
|
|
11cab90ce2 | ||
|
|
9ae48c2d7d | ||
|
|
00fc8205da | ||
|
|
62e85640da | ||
|
|
1b99b2a25d | ||
|
|
605ad52197 | ||
|
|
af80c5e018 | ||
|
|
18ac42b2e4 | ||
|
|
9ea57fcc30 | ||
|
|
7c27474164 | ||
|
|
afdee14332 | ||
|
|
7f5f12d37a | ||
|
|
cea0df71f8 | ||
|
|
aef484d5fc | ||
|
|
dacc051a57 | ||
|
|
e111f530c3 | ||
|
|
c00ca055bc | ||
|
|
305589cd01 | ||
|
|
6610244275 | ||
|
|
e462e64d42 | ||
|
|
39521df546 | ||
|
|
6dd8a1525c | ||
|
|
fca7a8fa47 | ||
|
|
1175179da1 | ||
|
|
06ab581edb | ||
|
|
dbcecbd3b8 | ||
|
|
4205c0a38d | ||
|
|
a76904c314 | ||
|
|
529ca14534 | ||
|
|
7423077f95 | ||
|
|
f116ee7802 | ||
|
|
09cf8c001e | ||
|
|
cfe0e18e4e | ||
|
|
2caad4a27b | ||
|
|
b5e7938ebe | ||
|
|
bd3e280fe5 | ||
|
|
39164d1438 | ||
|
|
a9c068ae3b | ||
|
|
6c7856549b | ||
|
|
d85cbc7b61 | ||
|
|
d8cbac4576 | ||
|
|
c0874a000e | ||
|
|
e317a39b2d | ||
|
|
61d4bd8adf | ||
|
|
a8deedaa66 | ||
|
|
15790ef4b4 | ||
|
|
8cf618ea75 | ||
|
|
5a81c9ecf0 | ||
|
|
4ccc2b3cfc | ||
|
|
ff8845de52 | ||
|
|
e4d4a2d8eb | ||
|
|
5a2a23cc2d | ||
|
|
8a233ddfbb | ||
|
|
2b40dc133d | ||
|
|
b26263c62d | ||
|
|
2df317eb49 | ||
|
|
5eef0e61ba | ||
|
|
021558d6dd | ||
|
|
7a6cab8381 | ||
|
|
1fcb70e553 | ||
|
|
712bbc9085 | ||
|
|
7b2370d608 | ||
|
|
98f398c99a | ||
|
|
e5efd5bf69 | ||
|
|
9d504a9e19 | ||
|
|
e96e09d112 | ||
|
|
28a6ec8065 | ||
|
|
875560b8dc | ||
|
|
fa360360cb | ||
|
|
e543b5228c | ||
|
|
63ea6cd15a | ||
|
|
79a773d25c | ||
|
|
dcc537e040 | ||
|
|
37488d0f7e | ||
|
|
aa645019e9 | ||
|
|
6179ec5319 | ||
|
|
331f91ba43 | ||
|
|
a50203dfec | ||
|
|
b7eab24f14 | ||
|
|
d824ffd02b | ||
|
|
238c6f7c88 | ||
|
|
0dd244fb0c | ||
|
|
61a8afa06a | ||
|
|
ed49eadb6a | ||
|
|
ecf19f8af4 | ||
|
|
9d5eb462c9 | ||
|
|
1088c5fa57 | ||
|
|
ad2bd3db0f | ||
|
|
abbcf855c4 | ||
|
|
83e648b7d6 | ||
|
|
89d049ff73 | ||
|
|
ac3a2bce72 | ||
|
|
ad20c2d242 | ||
|
|
6c9aa9527d | ||
|
|
7ad1e2be73 | ||
|
|
604f038cfb | ||
|
|
b185b1a4d9 | ||
|
|
89a65000a5 | ||
|
|
9c83903c2a | ||
|
|
68af57b759 | ||
|
|
9c4b4abb50 | ||
|
|
233ffb3b10 | ||
|
|
34e2bac4d0 | ||
|
|
6d4c38a3c8 | ||
|
|
b6ec5707e8 | ||
|
|
68d3b7b20c | ||
|
|
b84b36d885 | ||
|
|
f43e375d62 | ||
|
|
ab67fa2c15 | ||
|
|
7aff56c284 | ||
|
|
c13dc3a829 | ||
|
|
baf89c9d63 | ||
|
|
a8b4d21a65 | ||
|
|
6c20288ff1 | ||
|
|
935d4f3bda |
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
.*
|
||||
Makefile
|
||||
*.o
|
||||
lib*.a
|
||||
.*.swp
|
||||
cmake_install.cmake
|
||||
CMakeFiles
|
||||
CMakeCache.txt
|
||||
CPackConfig.cmake
|
||||
CPackSourceConfig.cmake
|
||||
cmake_uninstall.cmake
|
||||
CTestTestfile.cmake
|
||||
install_manifest.txt
|
||||
build*
|
||||
Build
|
||||
417
CMakeLists.txt
Normal file
417
CMakeLists.txt
Normal file
@@ -0,0 +1,417 @@
|
||||
cmake_minimum_required (VERSION 2.6.4)
|
||||
include (CheckFunctionExists)
|
||||
include (CheckIncludeFile)
|
||||
include (CheckCXXSourceCompiles)
|
||||
|
||||
|
||||
project(SimGear)
|
||||
|
||||
# read 'version' file into a variable (stripping any newlines or spaces)
|
||||
file(READ version versionFile)
|
||||
string(STRIP ${versionFile} SIMGEAR_VERSION)
|
||||
|
||||
# use simgear version also as the SO version (if building SOs)
|
||||
SET(SIMGEAR_SOVERSION ${SIMGEAR_VERSION})
|
||||
|
||||
# Warning when build is not an out-of-source build.
|
||||
string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" InSourceBuild)
|
||||
if(InSourceBuild)
|
||||
message(WARNING "Avoid building inside the source tree!")
|
||||
message(WARNING "Create a separate build directory instead (i.e. 'sgbuild') and call CMake from there: ")
|
||||
message(WARNING " mkdir ../sgbuild && cd ../sgbuild && cmake ${CMAKE_SOURCE_DIR}")
|
||||
endif(InSourceBuild)
|
||||
|
||||
if (NOT EMBEDDED_SIMGEAR)
|
||||
#packaging
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING")
|
||||
SET(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Simulation support libraries for FlightGear and related projects")
|
||||
SET(CPACK_PACKAGE_VENDOR "The FlightGear project")
|
||||
SET(CPACK_GENERATOR "TBZ2")
|
||||
SET(CPACK_INSTALL_CMAKE_PROJECTS ${CMAKE_CURRENT_BINARY_DIR};SimGear;ALL;/)
|
||||
|
||||
|
||||
# split version string into components, note CMAKE_MATCH_0 is the entire regexp match
|
||||
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" CPACK_PACKAGE_VERSION ${SIMGEAR_VERSION} )
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_3})
|
||||
|
||||
message(STATUS "version is ${CPACK_PACKAGE_VERSION_MAJOR} dot ${CPACK_PACKAGE_VERSION_MINOR} dot ${CPACK_PACKAGE_VERSION_PATCH}")
|
||||
|
||||
set(CPACK_SOURCE_GENERATOR TBZ2)
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "simgear-${SIMGEAR_VERSION}" CACHE INTERNAL "tarball basename")
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
"^${PROJECT_SOURCE_DIR}/.git;\\\\.gitignore;Makefile.am;~$;${CPACK_SOURCE_IGNORE_FILES}")
|
||||
|
||||
message(STATUS "ignoring: ${CPACK_SOURCE_IGNORE_FILES}")
|
||||
|
||||
include (CPack)
|
||||
endif()
|
||||
|
||||
# We have some custom .cmake scripts not in the official distribution.
|
||||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
|
||||
|
||||
# Change the default build type to something fast
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING
|
||||
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
|
||||
FORCE)
|
||||
endif(NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
# Determine name of library installation directory, i.e. "lib" vs "lib64", which
|
||||
# differs between all Debian-based vs all other Linux distros.
|
||||
# See cmake bug #11964, http://cmake.org/gitweb?p=cmake.git;a=commit;h=126c993d
|
||||
# GNUInstallDirs requires CMake >= 2.8.5, use own file for older cmake
|
||||
if(${CMAKE_VERSION} VERSION_GREATER 2.8.4)
|
||||
include(GNUInstallDirs)
|
||||
else(${CMAKE_VERSION} VERSION_GREATER 2.8.4)
|
||||
include(OldGNUInstallDirs)
|
||||
endif(${CMAKE_VERSION} VERSION_GREATER 2.8.4)
|
||||
message(STATUS "Library installation directory: ${CMAKE_INSTALL_LIBDIR}")
|
||||
|
||||
#####################################################################################
|
||||
# Configure library search paths
|
||||
#####################################################################################
|
||||
|
||||
if(NOT "${CMAKE_LIBRARY_ARCHITECTURE}" STREQUAL "")
|
||||
# Workaround for Ubuntu/Debian which introduced the "multiarch" library
|
||||
# directory structure, which is unsupported by CMake < 2.8.10, so we need to
|
||||
# add paths manually
|
||||
# see http://www.cmake.org/Bug/view.php?id=12049 and
|
||||
# http://www.cmake.org/Bug/view.php?id=12037
|
||||
list(APPEND ADDITIONAL_LIBRARY_PATHS
|
||||
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/lib/${CMAKE_LIBRARY_ARCHITECTURE})
|
||||
message(STATUS "additional library directories: ${ADDITIONAL_LIBRARY_PATHS}")
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
# TBD: are these really necessary? Aren't they considered by cmake automatically?
|
||||
list(APPEND ADDITIONAL_LIBRARY_PATHS
|
||||
/opt/local
|
||||
/usr/local
|
||||
/usr)
|
||||
endif()
|
||||
#####################################################################################
|
||||
|
||||
if (NOT MSVC)
|
||||
option(SIMGEAR_SHARED "Set to ON to build SimGear as a shared library/framework" OFF)
|
||||
option(SYSTEM_EXPAT "Set to ON to build SimGear using the system libExpat" OFF)
|
||||
else()
|
||||
# Building SimGear DLLs is currently not supported for MSVC.
|
||||
set(SIMGEAR_SHARED OFF)
|
||||
# Using a system expat is currently not supported for MSVC - it would require shared simgear (DLL).
|
||||
set(SYSTEM_EXPAT OFF)
|
||||
endif()
|
||||
|
||||
option(SIMGEAR_HEADLESS "Set to ON to build SimGear without GUI/graphics support" OFF)
|
||||
option(JPEG_FACTORY "Enable JPEG-factory support" OFF)
|
||||
option(SG_SVN_CLIENT "Set to ON to build SimGear with built-in SVN support" OFF)
|
||||
option(ENABLE_LIBSVN "Set to ON to build SimGear with libsvnclient support" ON)
|
||||
option(ENABLE_RTI "Set to ON to build SimGear with RTI support" OFF)
|
||||
option(ENABLE_TESTS "Set to OFF to disable building SimGear's test applications" ON)
|
||||
option(ENABLE_SOUND "Set to OFF to disable building SimGear's sound support" ON)
|
||||
option(ENABLE_PKGUTIL "Set to ON to build the sg_pkgutil application (default)" ON)
|
||||
|
||||
if (MSVC)
|
||||
GET_FILENAME_COMPONENT(PARENT_DIR ${PROJECT_BINARY_DIR} PATH)
|
||||
if (CMAKE_CL_64)
|
||||
SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdparty.x64")
|
||||
else (CMAKE_CL_64)
|
||||
SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdparty")
|
||||
endif (CMAKE_CL_64)
|
||||
if (EXISTS ${TEST_3RDPARTY_DIR})
|
||||
set(MSVC_3RDPARTY_ROOT ${PARENT_DIR} CACHE PATH "Location where the third-party dependencies are extracted")
|
||||
else (EXISTS ${TEST_3RDPARTY_DIR})
|
||||
set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
|
||||
endif (EXISTS ${TEST_3RDPARTY_DIR})
|
||||
else (MSVC)
|
||||
set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
|
||||
endif (MSVC)
|
||||
|
||||
if (MSVC AND MSVC_3RDPARTY_ROOT)
|
||||
message(STATUS "3rdparty files located in ${MSVC_3RDPARTY_ROOT}")
|
||||
set( OSG_MSVC "msvc" )
|
||||
if (${MSVC_VERSION} EQUAL 1700)
|
||||
set( OSG_MSVC ${OSG_MSVC}110 )
|
||||
elseif (${MSVC_VERSION} EQUAL 1600)
|
||||
set( OSG_MSVC ${OSG_MSVC}100 )
|
||||
else (${MSVC_VERSION} EQUAL 1700)
|
||||
set( OSG_MSVC ${OSG_MSVC}90 )
|
||||
endif (${MSVC_VERSION} EQUAL 1700)
|
||||
if (CMAKE_CL_64)
|
||||
set( OSG_MSVC ${OSG_MSVC}-64 )
|
||||
set( MSVC_3RDPARTY_DIR 3rdParty.x64 )
|
||||
else (CMAKE_CL_64)
|
||||
set( MSVC_3RDPARTY_DIR 3rdParty )
|
||||
endif (CMAKE_CL_64)
|
||||
|
||||
set (CMAKE_LIBRARY_PATH ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenScenegraph/lib ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenRTI/lib )
|
||||
set (CMAKE_INCLUDE_PATH ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenScenegraph/include ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenRTI/include)
|
||||
find_path(BOOST_ROOT boost/version.hpp
|
||||
${MSVC_3RDPARTY_ROOT}/boost
|
||||
${MSVC_3RDPARTY_ROOT}/boost_1_52_0
|
||||
${MSVC_3RDPARTY_ROOT}/boost_1_51_0
|
||||
${MSVC_3RDPARTY_ROOT}/boost_1_50_0
|
||||
${MSVC_3RDPARTY_ROOT}/boost_1_49_0
|
||||
${MSVC_3RDPARTY_ROOT}/boost_1_48_0
|
||||
${MSVC_3RDPARTY_ROOT}/boost_1_47_0
|
||||
${MSVC_3RDPARTY_ROOT}/boost_1_46_1
|
||||
${MSVC_3RDPARTY_ROOT}/boost_1_46_0
|
||||
${MSVC_3RDPARTY_ROOT}/boost_1_45_0
|
||||
${MSVC_3RDPARTY_ROOT}/boost_1_44_0
|
||||
)
|
||||
# set (BOOST_ROOT ${MSVC_3RDPARTY_ROOT}/boost_1_44_0)
|
||||
message(STATUS "BOOST_ROOT is ${BOOST_ROOT}")
|
||||
set (OPENAL_INCLUDE_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include)
|
||||
set (OPENAL_LIBRARY_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib)
|
||||
endif (MSVC AND MSVC_3RDPARTY_ROOT)
|
||||
|
||||
if(APPLE)
|
||||
find_library(CORE_SERVICES_LIBRARY CoreServices)
|
||||
endif()
|
||||
|
||||
find_package(Boost REQUIRED)
|
||||
set (BOOST_CXX_FLAGS "-DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_BIMAP_DISABLE_SERIALIZATION")
|
||||
|
||||
if(SIMGEAR_HEADLESS)
|
||||
message(STATUS "SimGear mode: HEADLESS")
|
||||
set(ENABLE_SOUND 0)
|
||||
else()
|
||||
message(STATUS "SimGear mode: NORMAL")
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
if (ENABLE_SOUND)
|
||||
find_package(OpenAL REQUIRED)
|
||||
message(STATUS "Sound support: ENABLED")
|
||||
endif(ENABLE_SOUND)
|
||||
|
||||
find_package(OpenSceneGraph 3.0.0 REQUIRED osgText osgSim osgDB osgParticle osgGA osgUtil)
|
||||
endif(SIMGEAR_HEADLESS)
|
||||
|
||||
if(JPEG_FACTORY)
|
||||
message(STATUS "JPEG-factory: ENABLED")
|
||||
find_package(JPEG REQUIRED)
|
||||
include_directories(${JPEG_INCLUDE_DIR})
|
||||
else()
|
||||
message(STATUS "JPEG-factory: DISABLED")
|
||||
endif(JPEG_FACTORY)
|
||||
|
||||
if (SG_SVN_CLIENT)
|
||||
message(STATUS "Using built-in subversion client code")
|
||||
elseif(ENABLE_LIBSVN)
|
||||
find_package(SvnClient)
|
||||
|
||||
if(LIBSVN_FOUND)
|
||||
message(STATUS "Subversion client support: ENABLED")
|
||||
set(HAVE_SVN_CLIENT_H 1)
|
||||
set(HAVE_LIBSVN_CLIENT_1 1)
|
||||
else()
|
||||
# Oops. ENABLE_LIBSVN is ON, but svn is still missing.
|
||||
# Provide clearly visible warning/hint, so builders know what else they should install (or disable).
|
||||
message(WARNING "Failed to enable subversion client support. Unable to find required subversion client library. Some features may not be available (scenery download).")
|
||||
message(WARNING "Install 'libsvn' library/DLL (libsvn-devel/libsvnclient/...). Otherwise disable subversion support (set 'ENABLE_LIBSVN' to 'OFF').")
|
||||
endif(LIBSVN_FOUND)
|
||||
else()
|
||||
message(STATUS "Subversion client support: DISABLED")
|
||||
endif(SG_SVN_CLIENT)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if (SYSTEM_EXPAT)
|
||||
message(STATUS "Requested to use system Expat library, forcing SIMGEAR_SHARED to true")
|
||||
set(SIMGEAR_SHARED ON)
|
||||
find_package(EXPAT REQUIRED)
|
||||
include_directories(${EXPAT_INCLUDE_DIRS})
|
||||
else()
|
||||
message(STATUS "Using built-in expat code")
|
||||
add_definitions(-DHAVE_EXPAT_CONFIG_H)
|
||||
endif(SYSTEM_EXPAT)
|
||||
|
||||
check_include_file(inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H)
|
||||
check_include_file(unistd.h HAVE_UNISTD_H)
|
||||
check_include_file(windows.h HAVE_WINDOWS_H)
|
||||
|
||||
if(HAVE_INTTYPES_H)
|
||||
# ShivaVG needs inttypes.h
|
||||
add_definitions(-DHAVE_INTTYPES_H)
|
||||
endif()
|
||||
|
||||
if(ENABLE_RTI)
|
||||
# See if we have any rti library variant installed
|
||||
message(STATUS "RTI: ENABLED")
|
||||
find_package(RTI)
|
||||
else()
|
||||
message(STATUS "RTI: DISABLED")
|
||||
endif(ENABLE_RTI)
|
||||
|
||||
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
||||
check_function_exists(ftime HAVE_FTIME)
|
||||
check_function_exists(timegm HAVE_TIMEGM)
|
||||
check_function_exists(rint HAVE_RINT)
|
||||
check_function_exists(mkdtemp HAVE_MKDTEMP)
|
||||
check_function_exists(bcopy HAVE_BCOPY)
|
||||
check_function_exists(mmap HAVE_MMAP)
|
||||
|
||||
if(HAVE_UNISTD_H)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH})
|
||||
check_cxx_source_compiles(
|
||||
"#include <unistd.h>
|
||||
#if !defined(_POSIX_TIMERS) || (0 >= _POSIX_TIMERS)
|
||||
#error clock_gettime is not supported
|
||||
#endif
|
||||
|
||||
int main() { return 0; }
|
||||
"
|
||||
HAVE_CLOCK_GETTIME)
|
||||
endif(HAVE_UNISTD_H)
|
||||
|
||||
set(RT_LIBRARY "")
|
||||
if(HAVE_CLOCK_GETTIME)
|
||||
check_library_exists(rt clock_gettime "" HAVE_RT)
|
||||
if(HAVE_RT)
|
||||
set(RT_LIBRARY rt)
|
||||
endif(HAVE_RT)
|
||||
endif(HAVE_CLOCK_GETTIME)
|
||||
|
||||
SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually 'd' on windows")
|
||||
SET(CMAKE_RELEASE_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows")
|
||||
SET(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows")
|
||||
SET(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows")
|
||||
|
||||
# isnan might not be real symbol, so can't check using function_exists
|
||||
check_cxx_source_compiles(
|
||||
"#include <cmath>
|
||||
void f() { isnan(0.0);} "
|
||||
HAVE_ISNAN)
|
||||
|
||||
check_cxx_source_compiles(
|
||||
"#include <cmath>
|
||||
void f() { std::isnan(0.0);} "
|
||||
HAVE_STD_ISNAN)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(WARNING_FLAGS_CXX "-Wall")
|
||||
set(WARNING_FLAGS_C "-Wall")
|
||||
|
||||
# certain GCC versions don't provide the atomic builds, and hence
|
||||
# require is to provide them in SGAtomic.cxx
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH})
|
||||
check_cxx_source_compiles(
|
||||
"int main() { unsigned mValue; return __sync_add_and_fetch(&mValue, 1); }"
|
||||
GCC_ATOMIC_BUILTINS_FOUND)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(WARNING_FLAGS_CXX "-Wall -Wno-overloaded-virtual")
|
||||
set(WARNING_FLAGS_C "-Wall")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
|
||||
if(MINGW)
|
||||
add_definitions(-D_WIN32_WINNT=0x501)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# turn off various warnings
|
||||
# foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996)
|
||||
# SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}")
|
||||
# endforeach(warning)
|
||||
|
||||
set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /wd4996 /wd4250 -Dstrdup=_strdup")
|
||||
if (${MSVC_VERSION} GREATER 1599)
|
||||
set( MSVC_LD_FLAGS "/FORCE:MULTIPLE" )
|
||||
endif (${MSVC_VERSION} GREATER 1599)
|
||||
endif(MSVC)
|
||||
|
||||
# assumed on Windows
|
||||
set(HAVE_GETLOCALTIME 1)
|
||||
|
||||
set( WINSOCK_LIBRARY "ws2_32.lib" )
|
||||
set( RT_LIBRARY "winmm" )
|
||||
endif(WIN32)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS_C} ${MSVC_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS_CXX} ${MSVC_FLAGS} ${BOOST_CXX_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MSVC_LD_FLAGS}")
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR})
|
||||
include_directories(${PROJECT_SOURCE_DIR}/simgear/canvas/ShivaVG/include)
|
||||
include_directories(${PROJECT_BINARY_DIR}/simgear)
|
||||
include_directories(${PROJECT_BINARY_DIR}/simgear/xml)
|
||||
|
||||
include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${OPENAL_INCLUDE_DIR}
|
||||
${LibArchive_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
# configure a header file to pass some of the CMake settings
|
||||
# to the source code
|
||||
configure_file (
|
||||
"${PROJECT_SOURCE_DIR}/simgear/simgear_config_cmake.h.in"
|
||||
"${PROJECT_BINARY_DIR}/simgear/simgear_config.h"
|
||||
)
|
||||
|
||||
configure_file (
|
||||
"${PROJECT_SOURCE_DIR}/simgear/xml/expat_config_cmake.in"
|
||||
"${PROJECT_BINARY_DIR}/simgear/xml/expat_config.h"
|
||||
)
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
# enable CTest / make test target
|
||||
message(STATUS "Tests: ENABLED")
|
||||
|
||||
include (Dart)
|
||||
enable_testing()
|
||||
else()
|
||||
message(STATUS "Tests: DISABLED")
|
||||
endif(ENABLE_TESTS)
|
||||
|
||||
# always set TEST_LIBS as it is also used by other tools/applications
|
||||
# TODO maybe better rename?
|
||||
if(SIMGEAR_SHARED)
|
||||
set( TEST_LIBS
|
||||
SimGearCore)
|
||||
else()
|
||||
set( TEST_LIBS
|
||||
SimGearCore
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${ZLIB_LIBRARY}
|
||||
${WINSOCK_LIBRARY}
|
||||
${RT_LIBRARY}
|
||||
${CORE_SERVICES_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(NOT SIMGEAR_HEADLESS)
|
||||
set( TEST_LIBS
|
||||
SimGearScene
|
||||
${TEST_LIBS}
|
||||
${OPENGL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
install (FILES ${PROJECT_BINARY_DIR}/simgear/simgear_config.h DESTINATION include/simgear/)
|
||||
add_subdirectory(simgear)
|
||||
|
||||
if (NOT EMBEDDED_SIMGEAR)
|
||||
#-----------------------------------------------------------------------------
|
||||
### uninstall target
|
||||
#-----------------------------------------------------------------------------
|
||||
CONFIGURE_FILE(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
ADD_CUSTOM_TARGET(uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
|
||||
endif()
|
||||
|
||||
83
CMakeModules/FindSvnClient.cmake
Normal file
83
CMakeModules/FindSvnClient.cmake
Normal file
@@ -0,0 +1,83 @@
|
||||
# Find Subversion client libraries, and dependencies
|
||||
# including APR (Apache Portable Runtime)
|
||||
|
||||
include (CheckFunctionExists)
|
||||
include (CheckIncludeFile)
|
||||
include (CheckLibraryExists)
|
||||
|
||||
macro(find_static_component comp libs)
|
||||
# account for alternative Windows svn distribution naming
|
||||
if(MSVC)
|
||||
set(compLib "lib${comp}")
|
||||
else(MSVC)
|
||||
set(compLib "${comp}")
|
||||
endif(MSVC)
|
||||
|
||||
string(TOUPPER "${comp}" compLibBase)
|
||||
set( compLibName ${compLibBase}_LIBRARY )
|
||||
|
||||
# NO_DEFAULT_PATH is important on Mac - we need to ensure subversion
|
||||
# libraires in dist/ or Macports are picked over the Apple version
|
||||
# in /usr, since that's what we will ship.
|
||||
# On other platforms we do need default paths though, i.e. since Linux
|
||||
# distros may use architecture-specific directories (like
|
||||
# /usr/lib/x86_64-linux-gnu) which we cannot hardcode/guess here.
|
||||
FIND_LIBRARY(${compLibName}
|
||||
if(APPLE)
|
||||
NO_DEFAULT_PATH
|
||||
endif(APPLE)
|
||||
NAMES ${compLib}
|
||||
HINTS $ENV{LIBSVN_DIR} ${CMAKE_INSTALL_PREFIX} ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib
|
||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
||||
PATHS ${ADDITIONAL_LIBRARY_PATHS}
|
||||
)
|
||||
|
||||
list(APPEND ${libs} ${${compLibName}})
|
||||
endmacro()
|
||||
|
||||
find_program(HAVE_APR_CONFIG apr-1-config)
|
||||
if(HAVE_APR_CONFIG)
|
||||
|
||||
execute_process(COMMAND apr-1-config --cppflags --includes
|
||||
OUTPUT_VARIABLE APR_CFLAGS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND apr-1-config --link-ld
|
||||
OUTPUT_VARIABLE RAW_APR_LIBS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# clean up some vars, or other CMake pieces complain
|
||||
string(STRIP "${RAW_APR_LIBS}" APR_LIBS)
|
||||
|
||||
else(HAVE_APR_CONFIG)
|
||||
message(STATUS "apr-1-config not found, implement manual search for APR")
|
||||
endif(HAVE_APR_CONFIG)
|
||||
|
||||
if(HAVE_APR_CONFIG OR MSVC)
|
||||
find_path(LIBSVN_INCLUDE_DIR svn_client.h
|
||||
NO_DEFAULT_PATH
|
||||
HINTS
|
||||
$ENV{LIBSVN_DIR} ${CMAKE_INSTALL_PREFIX} ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include
|
||||
PATH_SUFFIXES include/subversion-1
|
||||
PATHS
|
||||
/opt/local
|
||||
/usr/local
|
||||
/usr
|
||||
)
|
||||
|
||||
set(LIBSVN_LIBRARIES "")
|
||||
if (MSVC)
|
||||
find_static_component("apr-1" LIBSVN_LIBRARIES)
|
||||
else (MSVC)
|
||||
list(APPEND LIBSVN_LIBRARIES ${APR_LIBS})
|
||||
endif (MSVC)
|
||||
find_static_component("svn_client-1" LIBSVN_LIBRARIES)
|
||||
find_static_component("svn_subr-1" LIBSVN_LIBRARIES)
|
||||
find_static_component("svn_ra-1" LIBSVN_LIBRARIES)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSVN DEFAULT_MSG LIBSVN_LIBRARIES LIBSVN_INCLUDE_DIR)
|
||||
if(NOT LIBSVN_FOUND)
|
||||
set(LIBSVN_LIBRARIES "")
|
||||
endif(NOT LIBSVN_FOUND)
|
||||
endif(HAVE_APR_CONFIG OR MSVC)
|
||||
182
CMakeModules/OldGNUInstallDirs.cmake
Normal file
182
CMakeModules/OldGNUInstallDirs.cmake
Normal file
@@ -0,0 +1,182 @@
|
||||
# - Define GNU standard installation directories
|
||||
# Provides install directory variables as defined for GNU software:
|
||||
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
# Inclusion of this module defines the following variables:
|
||||
# CMAKE_INSTALL_<dir> - destination for files of a given type
|
||||
# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
|
||||
# where <dir> is one of:
|
||||
# BINDIR - user executables (bin)
|
||||
# SBINDIR - system admin executables (sbin)
|
||||
# LIBEXECDIR - program executables (libexec)
|
||||
# SYSCONFDIR - read-only single-machine data (etc)
|
||||
# SHAREDSTATEDIR - modifiable architecture-independent data (com)
|
||||
# LOCALSTATEDIR - modifiable single-machine data (var)
|
||||
# LIBDIR - object code libraries (lib or lib64)
|
||||
# INCLUDEDIR - C header files (include)
|
||||
# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
|
||||
# DATAROOTDIR - read-only architecture-independent data root (share)
|
||||
# DATADIR - read-only architecture-independent data (DATAROOTDIR)
|
||||
# INFODIR - info documentation (DATAROOTDIR/info)
|
||||
# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
|
||||
# MANDIR - man documentation (DATAROOTDIR/man)
|
||||
# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
|
||||
# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of
|
||||
# install() commands for the corresponding file type. If the includer does
|
||||
# not define a value the above-shown default will be used and the value will
|
||||
# appear in the cache for editing by the user.
|
||||
# Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
|
||||
# from the corresponding destination by prepending (if necessary) the value
|
||||
# of CMAKE_INSTALL_PREFIX.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
|
||||
# Copyright 2011 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# Installation directories
|
||||
#
|
||||
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SBINDIR)
|
||||
set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR)
|
||||
set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
|
||||
set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR)
|
||||
set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR)
|
||||
set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(_LIBDIR_DEFAULT "lib")
|
||||
# Override this default 'lib' with 'lib64' iff:
|
||||
# - we are on Linux system but NOT cross-compiling
|
||||
# - we are NOT on debian
|
||||
# - we are on a 64 bits system
|
||||
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
|
||||
# Note that the future of multi-arch handling may be even
|
||||
# more complicated than that: http://wiki.debian.org/Multiarch
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
|
||||
AND NOT CMAKE_CROSSCOMPILING
|
||||
AND NOT EXISTS "/etc/debian_version")
|
||||
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
|
||||
message(AUTHOR_WARNING
|
||||
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
|
||||
"Please enable at least one language before including GNUInstallDirs.")
|
||||
else()
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(_LIBDIR_DEFAULT "lib64")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
|
||||
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR)
|
||||
set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR)
|
||||
set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Values whose defaults are relative to DATAROOTDIR. Store empty values in
|
||||
# the cache and store the defaults in local variables if the cache values are
|
||||
# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
|
||||
|
||||
if(NOT CMAKE_INSTALL_DATADIR)
|
||||
set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)")
|
||||
set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_INFODIR)
|
||||
set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)")
|
||||
set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCALEDIR)
|
||||
set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)")
|
||||
set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_MANDIR)
|
||||
set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)")
|
||||
set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_DOCDIR)
|
||||
set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)")
|
||||
set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
mark_as_advanced(
|
||||
CMAKE_INSTALL_BINDIR
|
||||
CMAKE_INSTALL_SBINDIR
|
||||
CMAKE_INSTALL_LIBEXECDIR
|
||||
CMAKE_INSTALL_SYSCONFDIR
|
||||
CMAKE_INSTALL_SHAREDSTATEDIR
|
||||
CMAKE_INSTALL_LOCALSTATEDIR
|
||||
CMAKE_INSTALL_LIBDIR
|
||||
CMAKE_INSTALL_INCLUDEDIR
|
||||
CMAKE_INSTALL_OLDINCLUDEDIR
|
||||
CMAKE_INSTALL_DATAROOTDIR
|
||||
CMAKE_INSTALL_DATADIR
|
||||
CMAKE_INSTALL_INFODIR
|
||||
CMAKE_INSTALL_LOCALEDIR
|
||||
CMAKE_INSTALL_MANDIR
|
||||
CMAKE_INSTALL_DOCDIR
|
||||
)
|
||||
|
||||
# Result directories
|
||||
#
|
||||
foreach(dir
|
||||
BINDIR
|
||||
SBINDIR
|
||||
LIBEXECDIR
|
||||
SYSCONFDIR
|
||||
SHAREDSTATEDIR
|
||||
LOCALSTATEDIR
|
||||
LIBDIR
|
||||
INCLUDEDIR
|
||||
OLDINCLUDEDIR
|
||||
DATAROOTDIR
|
||||
DATADIR
|
||||
INFODIR
|
||||
LOCALEDIR
|
||||
MANDIR
|
||||
DOCDIR
|
||||
)
|
||||
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
|
||||
endif()
|
||||
endforeach()
|
||||
29
CMakeModules/SimGearComponent.cmake
Normal file
29
CMakeModules/SimGearComponent.cmake
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
macro(simgear_component_common name includePath sourcesList sources headers)
|
||||
set(fc${sourcesList} ${name})
|
||||
set(fh${sourcesList} ${name})
|
||||
foreach(s ${sources})
|
||||
set_property(GLOBAL
|
||||
APPEND PROPERTY ${sourcesList} "${CMAKE_CURRENT_SOURCE_DIR}/${s}")
|
||||
set(fc${sourcesList} "${fc${sourcesList}}#${CMAKE_CURRENT_SOURCE_DIR}/${s}")
|
||||
endforeach()
|
||||
|
||||
foreach(h ${headers})
|
||||
set_property(GLOBAL
|
||||
APPEND PROPERTY PUBLIC_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${h}")
|
||||
set(fh${sourcesList} "${fh${sourcesList}}#${CMAKE_CURRENT_SOURCE_DIR}/${h}")
|
||||
endforeach()
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY FG_GROUPS_${sourcesList}_C "${fc${sourcesList}}@")
|
||||
set_property(GLOBAL APPEND PROPERTY FG_GROUPS_${sourcesList}_H "${fh${sourcesList}}@")
|
||||
|
||||
install (FILES ${headers} DESTINATION include/simgear/${includePath})
|
||||
endmacro()
|
||||
|
||||
function(simgear_component name includePath sources headers)
|
||||
simgear_component_common(${name} ${includePath} CORE_SOURCES "${sources}" "${headers}")
|
||||
endfunction()
|
||||
|
||||
function(simgear_scene_component name includePath sources headers)
|
||||
simgear_component_common(${name} ${includePath} SCENE_SOURCES "${sources}" "${headers}")
|
||||
endfunction()
|
||||
22
CMakeModules/cmake_uninstall.cmake.in
Normal file
22
CMakeModules/cmake_uninstall.cmake.in
Normal file
@@ -0,0 +1,22 @@
|
||||
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
ENDIF()
|
||||
|
||||
FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
STRING(REGEX REPLACE "\n" ";" files "${files}")
|
||||
|
||||
FOREACH(file ${files})
|
||||
MESSAGE(STATUS "Uninstalling \"${file}\"")
|
||||
IF(EXISTS "${file}")
|
||||
EXEC_PROGRAM(
|
||||
"@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RETURN_VALUE rm_retval
|
||||
)
|
||||
IF(NOT "${rm_retval}" STREQUAL 0)
|
||||
MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
MESSAGE(STATUS "File \"${file}\" does not exist.")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
481
COPYING
Normal file
481
COPYING
Normal file
@@ -0,0 +1,481 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
811
Doxyfile
Normal file
811
Doxyfile
Normal file
@@ -0,0 +1,811 @@
|
||||
# Doxyfile 1.2.6
|
||||
|
||||
# This file describes the settings to be used by doxygen for a project
|
||||
#
|
||||
# All text after a hash (#) is considered a comment and will be ignored
|
||||
# The format is:
|
||||
# TAG = value [value, ...]
|
||||
# For lists items can also be appended using:
|
||||
# TAG += value [value, ...]
|
||||
# Values that contain spaces should be placed between quotes (" ")
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
|
||||
# by quotes) that should identify the project.
|
||||
|
||||
PROJECT_NAME = SimGear
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 2.11.0
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = ../doxy
|
||||
|
||||
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all constant output in the proper language.
|
||||
# The default language is English, other supported languages are:
|
||||
# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese,
|
||||
# Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian,
|
||||
# Polish, Portuguese and Slovene.
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
|
||||
# documentation are documented, even if no documentation was available.
|
||||
# Private class members and static file members will be hidden unless
|
||||
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
|
||||
|
||||
EXTRACT_ALL = NO
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_PRIVATE = NO
|
||||
|
||||
# If the EXTRACT_STATIC tag is set to YES all static members of a file
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_STATIC = YES
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
|
||||
# undocumented members of documented classes, files or namespaces.
|
||||
# If set to NO (the default) these members will be included in the
|
||||
# various overviews, but no documentation section is generated.
|
||||
# This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_MEMBERS = YES
|
||||
|
||||
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
|
||||
# undocumented classes that are normally visible in the class hierarchy.
|
||||
# If set to NO (the default) these class will be included in the various
|
||||
# overviews. This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_CLASSES = YES
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
|
||||
# include brief member descriptions after the members that are listed in
|
||||
# the file and class documentation (similar to JavaDoc).
|
||||
# Set to NO to disable this.
|
||||
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
|
||||
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
|
||||
# the brief description of a member or function before the detailed description.
|
||||
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
|
||||
# brief descriptions will be completely suppressed.
|
||||
|
||||
REPEAT_BRIEF = YES
|
||||
|
||||
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
|
||||
# Doxygen will generate a detailed section even if there is only a brief
|
||||
# description.
|
||||
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
|
||||
# path before files name in the file list and in the header files. If set
|
||||
# to NO the shortest path that makes the file name unique will be used.
|
||||
|
||||
FULL_PATH_NAMES = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
|
||||
# can be used to strip a user defined part of the path. Stripping is
|
||||
# only done if one of the specified strings matches the left-hand part of
|
||||
# the path. It is allowed to use relative paths in the argument list.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
|
||||
# The INTERNAL_DOCS tag determines if documentation
|
||||
# that is typed after a \internal command is included. If the tag is set
|
||||
# to NO (the default) then the documentation will be excluded.
|
||||
# Set it to YES to include the internal documentation.
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
|
||||
# generate a class diagram (in Html and LaTeX) for classes with base or
|
||||
# super classes. Setting the tag to NO turns the diagrams off.
|
||||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
|
||||
# be generated. Documented entities will be cross-referenced with these sources.
|
||||
|
||||
SOURCE_BROWSER = YES
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body
|
||||
# of functions and classes directly in the documentation.
|
||||
|
||||
INLINE_SOURCES = NO
|
||||
|
||||
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
|
||||
# doxygen to hide any special comment blocks from generated source code
|
||||
# fragments. Normal C and C++ comments will always remain visible.
|
||||
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
|
||||
# file names in lower case letters. If set to YES upper case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# users are adviced to set this option to NO.
|
||||
|
||||
CASE_SENSE_NAMES = YES
|
||||
|
||||
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
|
||||
# will show members with their full class and namespace scopes in the
|
||||
# documentation. If set to YES the scope will be hidden.
|
||||
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
|
||||
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
|
||||
# will generate a verbatim copy of the header file for each class for
|
||||
# which an include is specified. Set to NO to disable this.
|
||||
|
||||
VERBATIM_HEADERS = YES
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
|
||||
# will put list of the files that are included by a file in the documentation
|
||||
# of that file.
|
||||
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
|
||||
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
|
||||
# will interpret the first line (until the first dot) of a JavaDoc-style
|
||||
# comment as the brief description. If set to NO, the JavaDoc
|
||||
# comments will behave just like the Qt-style comments (thus requiring an
|
||||
# explict @brief command for a brief description.
|
||||
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
|
||||
# member inherits the documentation from any documented member that it
|
||||
# reimplements.
|
||||
|
||||
INHERIT_DOCS = YES
|
||||
|
||||
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
|
||||
# is inserted in the documentation for inline members.
|
||||
|
||||
INLINE_INFO = YES
|
||||
|
||||
# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
|
||||
# will sort the (detailed) documentation of file and class members
|
||||
# alphabetically by member name. If set to NO the members will appear in
|
||||
# declaration order.
|
||||
|
||||
SORT_MEMBER_DOCS = YES
|
||||
|
||||
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||
# tag is set to YES, then doxygen will reuse the documentation of the first
|
||||
# member in the group (if any) for the other members of the group. By default
|
||||
# all members of a group must be documented explicitly.
|
||||
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
|
||||
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
|
||||
# Doxygen uses this value to replace tabs by spaces in code fragments.
|
||||
|
||||
TAB_SIZE = 8
|
||||
|
||||
# The ENABLE_SECTIONS tag can be used to enable conditional
|
||||
# documentation sections, marked by \if sectionname ... \endif.
|
||||
|
||||
ENABLED_SECTIONS =
|
||||
|
||||
# The GENERATE_TODOLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the todo list. This list is created by putting \todo
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TODOLIST = YES
|
||||
|
||||
# The GENERATE_TESTLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the test list. This list is created by putting \test
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TESTLIST = YES
|
||||
|
||||
# The GENERATE_BUGLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the bug list. This list is created by putting \bug
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_BUGLIST = YES
|
||||
|
||||
# This tag can be used to specify a number of aliases that acts
|
||||
# as commands in the documentation. An alias has the form "name=value".
|
||||
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
|
||||
# put the command \sideeffect (or @sideeffect) in the documentation, which
|
||||
# will result in a user defined paragraph with heading "Side Effects:".
|
||||
# You can put \n's in the value part of an alias to insert newlines.
|
||||
|
||||
ALIASES =
|
||||
|
||||
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
|
||||
# the initial value of a variable or define consist of for it to appear in
|
||||
# the documentation. If the initializer consists of more lines than specified
|
||||
# here it will be hidden. Use a value of 0 to hide initializers completely.
|
||||
# The appearance of the initializer of individual variables and defines in the
|
||||
# documentation can be controlled using \showinitializer or \hideinitializer
|
||||
# command in the documentation regardless of this setting.
|
||||
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C.
|
||||
# For instance some of the names that are used will be different. The list
|
||||
# of all members will be omitted, etc.
|
||||
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
|
||||
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
|
||||
# at the bottom of the documentation of classes and structs. If set to YES the
|
||||
# list will mention the files that were used to generate the documentation.
|
||||
|
||||
SHOW_USED_FILES = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The QUIET tag can be used to turn on/off the messages that are generated
|
||||
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
QUIET = NO
|
||||
|
||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||
# generated by doxygen. Possible values are YES and NO. If left blank
|
||||
# NO is used.
|
||||
|
||||
WARNINGS = YES
|
||||
|
||||
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
|
||||
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
|
||||
# automatically be disabled.
|
||||
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that
|
||||
# doxygen can produce. The string should contain the $file, $line, and $text
|
||||
# tags, which will be replaced by the file and line number from which the
|
||||
# warning originated and the warning text.
|
||||
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
|
||||
# The WARN_LOGFILE tag can be used to specify a file to which warning
|
||||
# and error messages should be written. If left blank the output is written
|
||||
# to stderr.
|
||||
|
||||
WARN_LOGFILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The INPUT tag can be used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like "myfile.cpp" or
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = \
|
||||
DoxygenMain.cxx \
|
||||
simgear/bucket \
|
||||
simgear/compiler.h \
|
||||
simgear/constants.h \
|
||||
simgear/debug \
|
||||
simgear/environment \
|
||||
simgear/ephemeris \
|
||||
simgear/io \
|
||||
simgear/magvar \
|
||||
simgear/math \
|
||||
simgear/misc \
|
||||
simgear/nasal \
|
||||
simgear/props \
|
||||
simgear/route \
|
||||
simgear/scene \
|
||||
simgear/screen \
|
||||
simgear/serial \
|
||||
simgear/structure \
|
||||
simgear/sg_inlines.h \
|
||||
simgear/sg_traits.hxx \
|
||||
simgear/sound \
|
||||
simgear/threads \
|
||||
simgear/timing \
|
||||
simgear/xml
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
FILE_PATTERNS = *.h *.hxx *.c *.cxx *.cpp
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
# should be searched for input files as well. Possible values are YES and NO.
|
||||
# If left blank NO is used.
|
||||
|
||||
RECURSIVE = YES
|
||||
|
||||
# The EXCLUDE tag can be used to specify files and/or directories that should
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE = simgear/scene/sky/clouds3d
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||
# certain files from those directories.
|
||||
|
||||
EXCLUDE_PATTERNS =
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain example code fragments that are included (see
|
||||
# the \include command).
|
||||
|
||||
EXAMPLE_PATH =
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
EXAMPLE_PATTERNS =
|
||||
|
||||
# The IMAGE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain image that are included in the documentation (see
|
||||
# the \image command).
|
||||
|
||||
IMAGE_PATH =
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
# by executing (via popen()) the command <filter> <input-file>, where <filter>
|
||||
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
|
||||
# input file. Doxygen will then use the output that the filter program writes
|
||||
# to standard output.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||
# INPUT_FILTER) will be used to filter the input files when producing source
|
||||
# files to browse.
|
||||
|
||||
FILTER_SOURCE_FILES = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
|
||||
# of all compounds will be generated. Enable this if the project
|
||||
# contains a lot of classes, structs, unions or interfaces.
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
|
||||
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||
# in which this list will be split (can be a number in the range [1..20])
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all
|
||||
# classes will be put under the same header in the alphabetical index.
|
||||
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
|
||||
# should be ignored while generating the index headers.
|
||||
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
||||
# generate HTML output.
|
||||
|
||||
GENERATE_HTML = YES
|
||||
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `html' will be used as the default path.
|
||||
|
||||
HTML_OUTPUT = html
|
||||
|
||||
# The HTML_HEADER tag can be used to specify a personal HTML header for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard header.
|
||||
|
||||
HTML_HEADER =
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard footer.
|
||||
|
||||
HTML_FOOTER =
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
# fine-tune the look of the HTML output. If the tag is left blank doxygen
|
||||
# will generate a default style sheet
|
||||
|
||||
HTML_STYLESHEET =
|
||||
|
||||
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||
# files or namespaces will be aligned in HTML using tables. If set to
|
||||
# NO a bullet list will be used.
|
||||
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
|
||||
# will be generated that can be used as input for tools like the
|
||||
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
|
||||
# of the generated HTML documentation.
|
||||
|
||||
GENERATE_HTMLHELP = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
|
||||
# controls if a separate .chi index file is generated (YES) or that
|
||||
# it should be included in the master .chm file (NO).
|
||||
|
||||
GENERATE_CHI = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
|
||||
# controls whether a binary table of contents is generated (YES) or a
|
||||
# normal table of contents (NO) in the .chm file.
|
||||
|
||||
BINARY_TOC = NO
|
||||
|
||||
# The TOC_EXPAND flag can be set YES to add extra items for group members
|
||||
# to the contents of the Html help documentation and to the tree view.
|
||||
|
||||
TOC_EXPAND = NO
|
||||
|
||||
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
|
||||
# top of each HTML page. The value NO (the default) enables the index and
|
||||
# the value YES disables it.
|
||||
|
||||
DISABLE_INDEX = NO
|
||||
|
||||
# This tag can be used to set the number of enum values (range [1..20])
|
||||
# that doxygen will group on one line in the generated HTML documentation.
|
||||
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
|
||||
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
|
||||
# generated containing a tree-like index structure (just like the one that
|
||||
# is generated for HTML Help). For this to work a browser that supports
|
||||
# JavaScript and frames is required (for instance Netscape 4.0+
|
||||
# or Internet explorer 4.0+).
|
||||
|
||||
GENERATE_TREEVIEW = NO
|
||||
|
||||
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
|
||||
# used to set the initial width (in pixels) of the frame in which the tree
|
||||
# is shown.
|
||||
|
||||
TREEVIEW_WIDTH = 250
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||
# generate Latex output.
|
||||
|
||||
GENERATE_LATEX = YES
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `latex' will be used as the default path.
|
||||
|
||||
LATEX_OUTPUT = latex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
|
||||
# LaTeX documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_LATEX = NO
|
||||
|
||||
# The PAPER_TYPE tag can be used to set the paper type that is used
|
||||
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
||||
# executive. If left blank a4wide will be used.
|
||||
|
||||
PAPER_TYPE = letter
|
||||
|
||||
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
||||
# packages that should be included in the LaTeX output.
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
|
||||
# the generated latex document. The header should contain everything until
|
||||
# the first chapter. If it is left blank doxygen will generate a
|
||||
# standard header. Notice: only use this tag if you know what you are doing!
|
||||
|
||||
LATEX_HEADER =
|
||||
|
||||
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
|
||||
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
|
||||
# contain links (just like the HTML output) instead of page references
|
||||
# This makes the output suitable for online browsing using a pdf viewer.
|
||||
|
||||
PDF_HYPERLINKS = NO
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
|
||||
# plain latex in the generated Makefile. Set this option to YES to get a
|
||||
# higher quality PDF documentation.
|
||||
|
||||
USE_PDFLATEX = NO
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep
|
||||
# running if errors occur, instead of asking the user for help.
|
||||
# This option is also used when generating formulas in HTML.
|
||||
|
||||
LATEX_BATCHMODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
|
||||
# The RTF output is optimised for Word 97 and may not look very pretty with
|
||||
# other RTF readers or editors.
|
||||
|
||||
GENERATE_RTF = YES
|
||||
|
||||
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `rtf' will be used as the default path.
|
||||
|
||||
RTF_OUTPUT = rtf
|
||||
|
||||
# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
|
||||
# RTF documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_RTF = NO
|
||||
|
||||
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
|
||||
# will contain hyperlink fields. The RTF file will
|
||||
# contain links (just like the HTML output) instead of page references.
|
||||
# This makes the output suitable for online browsing using a WORD or other.
|
||||
# programs which support those fields.
|
||||
# Note: wordpad (write) and others do not support links.
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||
# config file, i.e. a series of assigments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
|
||||
# generate man pages
|
||||
|
||||
GENERATE_MAN = YES
|
||||
|
||||
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `man' will be used as the default path.
|
||||
|
||||
MAN_OUTPUT = man
|
||||
|
||||
# The MAN_EXTENSION tag determines the extension that is added to
|
||||
# the generated man pages (default is the subroutine's section .3)
|
||||
|
||||
MAN_EXTENSION = .3
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
|
||||
# evaluate all C-preprocessor directives found in the sources and include
|
||||
# files.
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
|
||||
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
|
||||
# names in the source code. If set to NO (the default) only conditional
|
||||
# compilation will be performed. Macro expansion can be done in a controlled
|
||||
# way by setting EXPAND_ONLY_PREDEF to YES.
|
||||
|
||||
MACRO_EXPANSION = NO
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
||||
# then the macro expansion is limited to the macros specified with the
|
||||
# PREDEFINED and EXPAND_AS_PREDEFINED tags.
|
||||
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
|
||||
# in the INCLUDE_PATH (see below) will be search if a #include is found.
|
||||
|
||||
SEARCH_INCLUDES = YES
|
||||
|
||||
# The INCLUDE_PATH tag can be used to specify one or more directories that
|
||||
# contain include files that are not input files but should be processed by
|
||||
# the preprocessor.
|
||||
|
||||
INCLUDE_PATH =
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
# directories. If left blank, the patterns specified with FILE_PATTERNS will
|
||||
# be used.
|
||||
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
|
||||
# The PREDEFINED tag can be used to specify one or more macro names that
|
||||
# are defined before the preprocessor is started (similar to the -D option of
|
||||
# gcc). The argument of the tag is a list of macros of the form: name
|
||||
# or name=definition (no spaces). If the definition and the = are
|
||||
# omitted =1 is assumed.
|
||||
|
||||
PREDEFINED =
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
|
||||
# this tag can be used to specify a list of macro names that should be expanded.
|
||||
# The macro definition that is found in the sources will be used.
|
||||
# Use the PREDEFINED tag if you want to use a different macro definition.
|
||||
|
||||
EXPAND_AS_DEFINED =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The TAGFILES tag can be used to specify one or more tagfiles.
|
||||
|
||||
TAGFILES =
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
||||
# a tag file that is based on the input files it reads.
|
||||
|
||||
GENERATE_TAGFILE =
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
|
||||
# in the class index. If set to NO only the inherited external classes
|
||||
# will be listed.
|
||||
|
||||
ALLEXTERNALS = NO
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of `which perl').
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
|
||||
# available from the path. This tool is part of Graphviz, a graph visualization
|
||||
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
||||
# have no effect if this option is set to NO (the default)
|
||||
|
||||
HAVE_DOT = NO
|
||||
|
||||
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect inheritance relations. Setting this tag to YES will force the
|
||||
# the CLASS_DIAGRAMS tag to NO.
|
||||
|
||||
CLASS_GRAPH = YES
|
||||
|
||||
# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect implementation dependencies (inheritance, containment, and
|
||||
# class references variables) of the class with other documented classes.
|
||||
|
||||
COLLABORATION_GRAPH = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to
|
||||
# YES then doxygen will generate a graph for each documented file showing
|
||||
# the direct and indirect include dependencies of the file with other
|
||||
# documented files.
|
||||
|
||||
INCLUDE_GRAPH = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to
|
||||
# YES then doxygen will generate a graph for each documented header file showing
|
||||
# the documented files that directly or indirectly include this file
|
||||
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
|
||||
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
|
||||
# will graphical hierarchy of all classes instead of a textual one.
|
||||
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
|
||||
# The tag DOT_PATH can be used to specify the path where the dot tool can be
|
||||
# found. If left blank, it is assumed the dot tool can be found on the path.
|
||||
|
||||
DOT_PATH =
|
||||
|
||||
# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
|
||||
# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
|
||||
# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
|
||||
# generate a legend page explaining the meaning of the various boxes and
|
||||
# arrows in the dot generated graphs.
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
|
||||
# remove the intermedate dot files that are used to generate
|
||||
# the various graphs.
|
||||
|
||||
DOT_CLEANUP = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The SEARCHENGINE tag specifies whether or not a search engine should be
|
||||
# used. If set to NO the values of all tags below this one will be ignored.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
|
||||
# The CGI_NAME tag should be the name of the CGI script that
|
||||
# starts the search engine (doxysearch) with the correct parameters.
|
||||
# A script with this name will be generated by doxygen.
|
||||
|
||||
CGI_NAME = search.cgi
|
||||
|
||||
# The CGI_URL tag should be the absolute URL to the directory where the
|
||||
# cgi binaries are located. See the documentation of your http daemon for
|
||||
# details.
|
||||
|
||||
CGI_URL =
|
||||
|
||||
# The DOC_URL tag should be the absolute URL to the directory where the
|
||||
# documentation is located. If left blank the absolute path to the
|
||||
# documentation, with file:// prepended to it, will be used.
|
||||
|
||||
DOC_URL =
|
||||
|
||||
# The DOC_ABSPATH tag should be the absolute path to the directory where the
|
||||
# documentation is located. If left blank the directory on the local machine
|
||||
# will be used.
|
||||
|
||||
DOC_ABSPATH =
|
||||
|
||||
# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
|
||||
# is installed.
|
||||
|
||||
BIN_ABSPATH = /usr/local/bin/
|
||||
|
||||
# The EXT_DOC_PATHS tag can be used to specify one or more paths to
|
||||
# documentation generated for other projects. This allows doxysearch to search
|
||||
# the documentation for these projects as well.
|
||||
|
||||
EXT_DOC_PATHS =
|
||||
108
DoxygenMain.cxx
Normal file
108
DoxygenMain.cxx
Normal file
@@ -0,0 +1,108 @@
|
||||
/* This is a dummy code file that only contains doxygen main page
|
||||
documentation. It has a .cxx extension so that emacs will happily
|
||||
autoindent correctly. */
|
||||
|
||||
/** \mainpage SimGear
|
||||
* Simulation, Visualization, and Game development libraries.
|
||||
|
||||
* \section intro Introduction
|
||||
*
|
||||
* SimGear is a collection of libraries which provide a variety of
|
||||
* functionality useful for building simulations, visualizations, and
|
||||
* even games. All the SimGear code is designed to be portable across
|
||||
* a wide variety of platforms and compilers. It has primarily been
|
||||
* developed in support of the FlightGear project, but as development
|
||||
* moves forward, we are generalizing the code to make more of it
|
||||
* useful for other types of applications.
|
||||
*
|
||||
* Some of the functionality provide includes
|
||||
*
|
||||
* - Compiler and platform abstractions for many tricky differences.
|
||||
* (compiler.h)
|
||||
*
|
||||
* - A whole earth tiling/indexing scheme. (SGBucket)
|
||||
*
|
||||
* - A console debugging output scheme that tracks severity and
|
||||
* category that can be completely compiled out for a final build release.
|
||||
* (logstream.hxx)
|
||||
*
|
||||
* - Code to manage "real" time (SGTime), time zones (SGTimeZone), and
|
||||
* millesecond time differences (SGTimeStamp).
|
||||
*
|
||||
* - Code to calculate accurate positions of sun, moon, stars, and
|
||||
* planets for a given time, date, season, earth location, etc.
|
||||
* (SGEphemeris)
|
||||
*
|
||||
* - Code to render a realistic sky dome, cloud layers, sun, moon,
|
||||
* stars, and planets all with realistic day/night/sunset/sunrise
|
||||
* effects. Includes things like correct moon phase, textured moon,
|
||||
* sun halo, etc. (SGSky is built on top of SGCloudLayer ...)
|
||||
*
|
||||
* - Simple serial (SGSerial), file (SGFile), socket (SGSocket), and
|
||||
* UDP socket (SGSocketUDP) I/O abstractions.
|
||||
*
|
||||
* - Code to calculate magnetic variation. (SGMagVar)
|
||||
*
|
||||
* - A variety of classes and functions for interpolation tables
|
||||
* (SGInterpTable), least squares computation (leastsqs.hxx), 3D
|
||||
* point/vectors (Point3D), 3D polar math and conversions (polar3d.hxx),
|
||||
* WGS-84 math and conversions (sg_geodesy.hxx), random number abstraction
|
||||
* (sg_random.h), STL conglomerates for common list types (sg_types.hxx),
|
||||
* and other vector and linear algebra routines (vector.hxx)
|
||||
*
|
||||
* - An abstraction to hide platform dependent path naming schemes. (SGPath)
|
||||
*
|
||||
* - A C++ streams wrapper to handle compress input/output streams.
|
||||
* (sg_gzifstream)
|
||||
*
|
||||
* - An optimized "property manager" which associates ascii property
|
||||
* names with their corresponding value. This can be a great way to build
|
||||
* loose linkages between modules, or build linkages/connections that can
|
||||
* be determined from config files or at runtime. (SGPropertyNode)
|
||||
* Also included is a set of functions to dump the property tree into a
|
||||
* standard xml file and subsequently read/parse a standard xml file and
|
||||
* rebuild the associated property tree. (props_io.hxx)
|
||||
*
|
||||
* - Scene management and drawing routines:
|
||||
* - material property management
|
||||
* - object management
|
||||
* - terrain tile management and paging
|
||||
* - sky dome rendering (with ephemeral objects)
|
||||
*
|
||||
* - Code to handle screen dumps (screen-dump.hxx) and ultra-hires
|
||||
* tile rendered screen dumps (tr.h)
|
||||
*
|
||||
* - A sound effects manager. (SGSoundMgr, SGSimpleSound, SGSound)
|
||||
*
|
||||
* - A threading abstraction. (SGThread)
|
||||
*
|
||||
* - A simple but highly functional XML parser that interfaces nicely
|
||||
* with the property manager. (easyxml.hxx)
|
||||
|
||||
* \section supports Supported Platforms
|
||||
* SimGear has been built on the following platforms:
|
||||
*
|
||||
* - Linux (x86)
|
||||
* - Windows (MSVC, Cygwin, Mingwin)
|
||||
* - SGI (native compilers)
|
||||
* - Mac OS X
|
||||
* - FreeBSD
|
||||
|
||||
* \section depends Dependencies
|
||||
*
|
||||
* SimGear depends on several other open source packages. These must
|
||||
* be installed before SimGear can be installed:
|
||||
*
|
||||
* - glut and opengl
|
||||
* - plib (http://plib.sf.net)
|
||||
* - metakit
|
||||
* - zlib
|
||||
* - libjpeg (optional)
|
||||
* - pthread (optional)
|
||||
|
||||
* \section license Licensing
|
||||
*
|
||||
* SimGear is licensed under the terms of the LGPL
|
||||
|
||||
*/
|
||||
|
||||
56
INSTALL
Normal file
56
INSTALL
Normal file
@@ -0,0 +1,56 @@
|
||||
How to build SimGear
|
||||
====================
|
||||
|
||||
SimGear uses the CMake build system to generate a platform-specific
|
||||
build environment. CMake reads the CMakeLists.txt files that you'll
|
||||
find throughout the source directories, checks for installed
|
||||
dependencies and then generates the appropriate build system.
|
||||
|
||||
If you don't already have CMake installed on your system you can grab
|
||||
it from http://www.cmake.org, use version 2.6.4 or later.
|
||||
|
||||
Under unices (i.e. Linux, Solaris, Free-BSD, HP-Ux, OSX) use the cmake
|
||||
or ccmake command-line utils. Preferably, create an out-of-source
|
||||
build directory and run cmake or ccmake from there. The advantage to
|
||||
this approach is that the temporary files created by CMake won't
|
||||
clutter the source directory, and also makes it possible to have
|
||||
multiple independent build targets by creating multiple build
|
||||
directories. In a directory alongside the SimGear source directory
|
||||
use:
|
||||
|
||||
mkdir sgbuild
|
||||
cd sgbuild
|
||||
cmake ../simgear -DCMAKE_BUILD_TYPE=Release
|
||||
make
|
||||
sudo make install
|
||||
|
||||
|
||||
Build Dependencies
|
||||
==================
|
||||
SimGear depends on a number of 3rd party libraries, the most notable
|
||||
being:
|
||||
|
||||
* OpenSceneGraph (OSG) - see README.OSG
|
||||
* zlib compression library - see README.zlib
|
||||
* Open Audio Library (OpenAL) - see README.OpenAL
|
||||
* Subversion Client Library (optional dependency)
|
||||
|
||||
|
||||
Further information
|
||||
===================
|
||||
* README.cmake
|
||||
for more detailed CMake instructions
|
||||
|
||||
* README.msvc
|
||||
in the FlightGear source package for more Windows-specific instructions
|
||||
|
||||
* FlightGear Wiki
|
||||
http://wiki.flightgear.org/Building_Flightgear
|
||||
|
||||
* FlightGear Forums
|
||||
For help on building see: http://www.flightgear.org/forums
|
||||
=> Support/Compiling
|
||||
|
||||
* FlightGear Mailing lists
|
||||
http://wiki.flightgear.org/index.php/Mailing_list
|
||||
|
||||
439
NEWS
Normal file
439
NEWS
Normal file
@@ -0,0 +1,439 @@
|
||||
Version 1.9.0
|
||||
* Thu Dec 18 15:12:15 CST 2008
|
||||
|
||||
|
||||
Version 1.8.6
|
||||
* Mon Dec 1 14:02:47 CST 2008
|
||||
|
||||
|
||||
Version 1.8.5
|
||||
* October 30, 2008 (source code snapshot release)
|
||||
|
||||
|
||||
New in 0.3.10
|
||||
* April 5, 2006
|
||||
|
||||
* Add a small accessor function to expose local timezone offset.
|
||||
* Improved exception handling and made output more helpful in various places.
|
||||
* Better pbuffer runtime detection.
|
||||
* Add directory creation capability to file/path library.
|
||||
* Added a basic reference counting class to improve robustness of
|
||||
memory management in places. Use this for all scenegraph
|
||||
references, sgmaterial references, sgmatmodel references, and
|
||||
sgsoundsample references.
|
||||
* Add support for point sprites.
|
||||
* Updates to rain cone rendering.
|
||||
* Add a new vector library and integrate that with improved coordinate
|
||||
system conversion code.
|
||||
* Mutex locking and cleanup improvements in the threading abstraction
|
||||
library.
|
||||
* Add MacOS RenderTexture support.
|
||||
* Add a Nasal based io libarary that is not activated by default.
|
||||
* Added a set of MS-VC8 project files.
|
||||
|
||||
* Various platform related bug fixes.
|
||||
* Various compiler related bug/warning fixes.
|
||||
* Clean up some things that triggered valgrind warnings.
|
||||
* Fix a Nasal cmp() bug.
|
||||
* Removed ancient version of zlib from distribution.
|
||||
|
||||
|
||||
New in 0.3.9
|
||||
* November 17, 2005
|
||||
|
||||
* Add support for OpenAL 1.1 (with a separate alut library.)
|
||||
* Add support for volumetric shadows. Aircraft can cast shadows on themselves
|
||||
as well as onto the ground (by Harald Johnsen.)
|
||||
* New 3d volumetric clouds by Harald Johnsen (along with several rounds of
|
||||
followup fixes and improvements.)
|
||||
* Remove Mark Harris's old 3d clouds because they were never properly
|
||||
integrated. And we now have new 3d clouds.
|
||||
* Add support for seasonal textures (with a set of winter textures added
|
||||
to FlightGear.)
|
||||
* Updated Nasal scripting system. Adds several new syntax convenience
|
||||
features, fixes parser bugs, fixes several internal bugs.
|
||||
* Our 3d cockpit jitter problem is fixed (woohoo!)
|
||||
* Add code to support rendering to a texture.
|
||||
* Allow "tip" popups to pop themselves down after the appropriate
|
||||
timeout, even if the sim time is paused.
|
||||
* Various low model level animation fixes and additions ... color,
|
||||
transparency, 'chrome' effects, randomized spin, etc.
|
||||
* Create our own portable stdint.h implementation.
|
||||
* Fixed several memory leaks.
|
||||
* removeChildren() added to the property system.
|
||||
* Fix many cases of 'const'.
|
||||
* Fixes for cygwin, solaris/sun, Mac OS X, MSVC, gcc-3.4.x.
|
||||
|
||||
|
||||
New in 0.3.8
|
||||
* January 18, 2005
|
||||
|
||||
* Configure script does a sanity check for the existence of openal.
|
||||
* Better pthreads detection for FreeBSD.
|
||||
* Abstract out the location of gl.h, glu.h, and glut.h so we can more
|
||||
easily support MacOS which puts these in an oddball location.
|
||||
* Added two new debug output types for instrumentation and systems.
|
||||
* Add a name parameter to the waypoint class for supporting a route
|
||||
manager in the flightgear gps module.
|
||||
* Make display list usage optional.
|
||||
* Event manager: specifying a zero delay will force event execution in
|
||||
the next frame rather than entering an infinite loop.
|
||||
* gcc-4.0 fix.
|
||||
* Fixes to property tree loading and saving.
|
||||
* Make volume inaudible at startup.
|
||||
* Solaris fixes.
|
||||
* For low density cloud coverage, blend the layer to nothing as we pass
|
||||
through instead of fully engulfing the aircraft in the cloud.
|
||||
* Add several new capabilities to the texture management code for building
|
||||
normal maps and doing some simple on-the-fly effects on textures.
|
||||
* Better error message for sound problems.
|
||||
* Add support for binding a thread to a specific CPU.
|
||||
|
||||
|
||||
New in 0.3.7
|
||||
* October 12, 2004
|
||||
|
||||
* Add support for parsing xml from an in memory buffer, not just a file.
|
||||
* Don't reduce visibility for a "clear" cloud layer.
|
||||
* Add support for audio orientation (direction and cone) for internal
|
||||
view and tower view.
|
||||
* Add support for drawing from display lists rather than in immediate mode.
|
||||
This provides a big performance improvement on many systems.
|
||||
|
||||
|
||||
New in 0.3.6
|
||||
* July 29, 2004
|
||||
|
||||
* Better MinGW support
|
||||
* A bit better handling of OpenAL under Cygwin
|
||||
* Switched audio system from plib's "sl/sm" to OpenAL.
|
||||
* Add support for scaling an object based on distance. The scaling
|
||||
factor is determined by a lookup table based on distance.
|
||||
* Add a "flash" animation type.
|
||||
* Fix cloud positioning/animation bugs.
|
||||
* Fix an off-by-one error in props_io.cxx
|
||||
* Clip audio gain (volume) to 1.0
|
||||
|
||||
|
||||
New in 0.3.5
|
||||
* March 26, 2004
|
||||
|
||||
* Added Andy's nasal interpreter for small built in scripting tasks.
|
||||
Nasal integrates nicely with FlightGear's property system.
|
||||
* Added new (much simpler) metar parsing code (removed older more
|
||||
complex code.)
|
||||
* Support VASI/PAPI lights correctly.
|
||||
* Fixes to cloud animation.
|
||||
* Updates to sky dome coloring as well as sun/moon coloring.
|
||||
* Vary environment lighting with visibility (subtlety.)
|
||||
* Support control of alpha test in model animation.
|
||||
* Complete rewrite of the event manager.
|
||||
* Updates to low level socket code to make it more flexible.
|
||||
* Win32 serial port communication fixes.
|
||||
* sg_geodesy rewritten to be more accurate and robust and symmetric.
|
||||
|
||||
|
||||
New in 0.3.4
|
||||
* October 22, 2003
|
||||
|
||||
* Removed Metakit, FlightGear no longer uses it.
|
||||
* Removed all glut dependencies from SimGear.
|
||||
* Moved FGEventMgr and FGSubsystemMgr over to SimGear.
|
||||
* Some more incremental work on 3D clouds.
|
||||
* Added some "fastmath" functions.
|
||||
* Some lighting tweaks and fixes (especially for taxiways.)
|
||||
* Added support for "blend" and "scale" and "texture" animations.
|
||||
* Added support for animating rotations around an arbitrary axis (so the
|
||||
aircraft designer isn't forced to figure out animations as a combination
|
||||
of rotations around X, Y, and X axes.
|
||||
* Updates to sky dome modeling and make cloud layers follow the curve
|
||||
of the earth (sort of.)
|
||||
* Updates to sky dome, cloud, and sunrise/sunset color and lighting
|
||||
effects to make them more realistic and lifelike.
|
||||
* Better support for detecting and using OpenGL extensions at run time.
|
||||
* Add support for win32-pthreads in MSVC.NET
|
||||
* Various MSVC fixes.
|
||||
* Various Solaris fixes.
|
||||
* Various cygwin/mingwin fixes.
|
||||
* Various Mac OS X fixes.
|
||||
* Various Irix fixes.
|
||||
|
||||
|
||||
New in 0.3.3
|
||||
* June 3, 2003
|
||||
|
||||
* Fix a compile problem for cygwin
|
||||
* Updated/tweaked doxygen documentation in several areas
|
||||
|
||||
|
||||
New in 0.3.2
|
||||
* June 2, 2003
|
||||
|
||||
* Moved quite a bit of low level model management and "state"
|
||||
management code from FlightGear into SimGear and did a substantial
|
||||
amount of restructuring and dependency clean up in the process.
|
||||
Created a "scene" subdirectory with sub-subdirectories for material
|
||||
management, basic model and model animation management, sky
|
||||
rendering, and low level loaders for the "TerraGear" tile object format.
|
||||
* Removed support of the flat shaded and non-textured material
|
||||
property variants. You can still do these things, but extra states
|
||||
are no longer set up automatically.
|
||||
* Removed 3d clouds from the default build ... these need a maintainer
|
||||
or better yet, a complete plib-based rewrite.
|
||||
* Moved the FlightGear sound effect manager code over to SimGear.
|
||||
* Updated the cloud layer surface to better follow the inverted bowl
|
||||
shape.
|
||||
* Much work on cloud/sky coloring, and also much work on
|
||||
sunset/sunrise coloring.
|
||||
* Fixed an obscure bug in cloud texture loading which caused each
|
||||
cloud texture to be loaded 5 times. Ouch!
|
||||
* Various class and function renaming to make them better fit into the
|
||||
standard SimGear naming scheme.
|
||||
* Added some additional convenience functions to the SGPath class.
|
||||
* Upgraded the distributed version of metakit.
|
||||
* FreeBSD fixes.
|
||||
* Irix fixes (better STL/ISO C++ header support.)
|
||||
* Mingwin fixes.
|
||||
* Better MacOS support
|
||||
* MSVC fixes.
|
||||
|
||||
|
||||
New in 0.3.1
|
||||
* December 4, 2002
|
||||
|
||||
* Fix a major packaging blunder with several missing files.
|
||||
|
||||
|
||||
New in 0.3.0
|
||||
* December 3, 2002
|
||||
|
||||
* removed interpreter subdir
|
||||
* NOMINAX fix for Cygwin/gcc-3.2
|
||||
* Added some prototype 3d clouds based on Mark Harris's demos.
|
||||
* Simplified the command manager interface
|
||||
* Allow an "include" attribute on root PropertyList element.
|
||||
|
||||
|
||||
New in 0.2.0
|
||||
* September 6, 2002
|
||||
|
||||
* Modernized the autoconf/make scripts, plus lots of tweaks and enhancements.
|
||||
* Removed efence support (in favor of valgrind.)
|
||||
|
||||
* Added a javascript interpreter.
|
||||
* SGSocket reimplemented on top of plib/net libs.
|
||||
* Added a new random number generation algorithm.
|
||||
* Total rewrite of the strutils package.
|
||||
|
||||
* Patch for the random number seed.
|
||||
* IA-64 w/ Intel compiler fixes.
|
||||
* MSVC/MINGW fixes.
|
||||
* Mac OS X fixes.
|
||||
* Irix fixes.
|
||||
* Code clean ups to remove warning messages.
|
||||
* Optimizations in sg_binobj to reduce the amount of memory copying
|
||||
needed when loading a binobj format file.
|
||||
* Fixed a couple places where variables could be used before they were
|
||||
initialized.
|
||||
* Various property manager fixes and improvements.
|
||||
* Fixes to cloud layer management code.
|
||||
* Made the sky dome more flexible to facilitate use in other applications.
|
||||
|
||||
|
||||
New in 0.0.18
|
||||
* April 20, 2002
|
||||
|
||||
* Created a src/libs subdirectory for several packages that need to be
|
||||
installed by the user but are used by many other packages and may already
|
||||
be installed. So we just bundle the source separately as a convenience
|
||||
if the user needs to build and install these.
|
||||
* Upgrade to zlib-1.1.4 (security fix)
|
||||
* Upgrade to metakit-2.4.2-32.tar.gz (latest upstream release)
|
||||
* Added support for point objects in the scenery file format.
|
||||
* Additions to the binary file format to make it *much* more flexible.
|
||||
For each major primitive type: points, triangles, fans, and strips, you
|
||||
can specify an index list of vertices, normals, colors, and texture
|
||||
coordinates. You can skip any of these you like to save on space.
|
||||
* Added support for new file features in the binary -> ascii scenery file
|
||||
decoder.
|
||||
* Various code clean ups.
|
||||
* Separate XML I/O operations into a separate header file.
|
||||
* Major property manager rewrite, then lots of followup cleaning and
|
||||
improvements.
|
||||
|
||||
|
||||
New in 0.0.17 (final)
|
||||
* February 16, 2002
|
||||
|
||||
* Explicitely reset the glBlendFunc() after drawing the moon for the
|
||||
Voodoo2 linux driver since it seems to have a bug in glPopAttrib().
|
||||
|
||||
|
||||
New in 0.0.17pre2
|
||||
* February 13, 2002
|
||||
|
||||
* Replaced some cout's with SG_LOG's
|
||||
|
||||
|
||||
New in 0.0.17pre1
|
||||
* February 12, 2002
|
||||
|
||||
* Removed metakit and zlib from build process. Tarballs are still included
|
||||
for those who's systems don't provide these packages.
|
||||
* MSVC fixes.
|
||||
* IRIX fixes.
|
||||
* Mingwin fixes.
|
||||
* Mac OS X fixes.
|
||||
* FreeBSD fixes.
|
||||
* Added support for Intel's C++ compiler under Linux.
|
||||
* Attempt to build in support for various non-compatible automake/autoconf
|
||||
versions.
|
||||
* Fix for a problem that could lead to a bogus build for people with voodoo
|
||||
cards.
|
||||
* Added Norman's jpegfactory code which can create jpeg format screen shots
|
||||
of a live running application.
|
||||
* implemented set/get_log_classes and set/get_log_priority.
|
||||
* Socket library improvements.
|
||||
* Added a C++ exception abstraction.
|
||||
* Property manager fixes and improvements including node path caching
|
||||
and debug tracing of property reads/writes.
|
||||
* Updates/fixes to xml handling.
|
||||
|
||||
|
||||
New in 0.0.16
|
||||
* July 12, 2001
|
||||
* Various changes to the property manager implementation to better support
|
||||
dumping out the desired portions of the property tree to file.
|
||||
* Don't compile the metakit demos by default (causes problems for Irix)'
|
||||
* Other various tweaks for Irix.
|
||||
* Added a virtual destructor to XMLVisitor to fix a warning message.
|
||||
* Check for valid hostname lookup in sg_socket.cxx
|
||||
* Add a function to return modified julian date without creating an
|
||||
entire SGTime class. This avoids an extraneous warning about not
|
||||
being able to find a timezone.
|
||||
* Created a mailing list for cvs commit messages.
|
||||
* Fixed a potential array under/over run bug in interpolator.cxx
|
||||
* Removed all references to SGValue from the property manager. Added
|
||||
support for an "archive" bit in the property manager to control
|
||||
which values get written out.
|
||||
* Added SGCommandState class so that commands can compile and save
|
||||
copies of their arguments for efficiency if they are called multiple
|
||||
times.
|
||||
* Added Brian Baul's "tr" tiled rendering low level support library.
|
||||
This along with some higher level code in flightgear allows us to do
|
||||
ultra-hires tiled screen dumps suitable for large format printers.
|
||||
(Norman Vine)
|
||||
|
||||
|
||||
New in 0.0.15
|
||||
* June 20, 2001
|
||||
* Various bug fixes, tweaks, and optimizations.
|
||||
* Added a command manager (analogous to the property manager)
|
||||
* Better Irix Mips support.
|
||||
* Various gcc-3.0 fixes.
|
||||
* Various MSVC fixes.
|
||||
* Added MSVC project files (automatically generated from the unix
|
||||
automake configuration files.)
|
||||
* Removed total size limitation on interpolation table module.
|
||||
* Various Cygwin fixes.
|
||||
* Added some convenience functions to point3d.
|
||||
* Various compiler warning fixes.
|
||||
* Added a thread wrapper class (currently only supports pthreads)
|
||||
* Added IO routines for a lowlevel, native simgear binary 3d file
|
||||
format optimized for TerraGear terrain.
|
||||
* Better endianness checking and support for the binary file
|
||||
read/write routines.
|
||||
* Added doxygen comments for all public interface code. Documentation
|
||||
can be accessed via the SimGear web page.
|
||||
* Many FG -> SG name space changes for better consistency throughout
|
||||
this package.
|
||||
* Added property aliases, repeated name tags, and a general xml
|
||||
inclusion facilities. Many other property manager clean ups
|
||||
following a complete rewrite.
|
||||
* Fixed some critical null pointer bugs in property manager.
|
||||
* Magnetic variation can now be fetched for any arbitrary location.
|
||||
|
||||
|
||||
New in 0.0.14
|
||||
* December 14, 2000
|
||||
* Added a module to manage waypoints and routes, calculate bearing and
|
||||
distance to next waypoint, lateral distance off route, etc.
|
||||
* Moved some of the basic time management code over from flightgear.
|
||||
* Bucket dimensions can be returned in meters
|
||||
* Added SOCK_STREAM (TCP) socket support to the networking code.
|
||||
* Updated random number generator interface so application can provide
|
||||
it's own seed value as well as use the default time seed.
|
||||
* Added a routine to calculate the distance between a point and a line segment.
|
||||
* Updates to the property manager and the property list loader/saver.
|
||||
* Added an explanation of the rational behind our terrain texture coordinate
|
||||
generation code.
|
||||
* Fixed sky dome so that the color at the horizon will always match
|
||||
the specified fog color.
|
||||
* Did a fair amount of fg -> sg name space updating (lots left to do.)
|
||||
* Added support for KAI C++ on linux.
|
||||
* MSVC tweaks.
|
||||
* MacOS tweaks.
|
||||
* FreeBSD tweaks.
|
||||
|
||||
|
||||
New in 0.0.13
|
||||
* September 14, 2000
|
||||
* Added support for reading and writing xml files (easyxml)
|
||||
* Then updates to property manager and xml code.
|
||||
* Update magnetic variation code.
|
||||
* Sky code now uses glPushAttrib and glPopAttrib so it plays better with
|
||||
other ssg based apps.
|
||||
* MacOS tweaks.
|
||||
* MSVC tweaks.
|
||||
|
||||
|
||||
New in 0.0.12
|
||||
* July 19, 2000
|
||||
* Converted project license from GPL to LGPL.
|
||||
* Moved low level IO (socket, file, serial) code over to SimGear.
|
||||
* Moved ephemeral code into simgear
|
||||
* Moved basic world time code into simgear
|
||||
* Added a property manager (registry)
|
||||
* Some documentation added.
|
||||
|
||||
|
||||
New in 0.0.11
|
||||
* July 3, 2000
|
||||
* Replaced gdbm with metakit
|
||||
* Added drop in sky (depends on plib)
|
||||
* Added spherical course and dist given two points calculations
|
||||
* MSVC5 fixes
|
||||
* Math/bucket/tiling tweaks from Norman Vine
|
||||
|
||||
|
||||
New in 0.0.7
|
||||
* March 29, 2000
|
||||
* Added support for RedHat package building contributed by Habibie
|
||||
<habibie@MailandNews.com>
|
||||
* Added gdbm to SimGear. Many systems will already have gdbm installed so
|
||||
it is only built if it doesn't already exist on the user's platform.
|
||||
gdbm is a set of database routines that use extendible hashing and works
|
||||
similar to the standard UNIX dbm routines. This guarantees the availability
|
||||
of gdbm to any application that uses SimGear.
|
||||
* Optimizations and bullet proofing of magnetic variation code by Norman
|
||||
Vine and Ed Williams
|
||||
|
||||
|
||||
New in 0.0.6
|
||||
* March 27, 2000
|
||||
* Added Nima World Magnetic Model 2000 contributed by Ed Williams
|
||||
* Fixes for MSVC++
|
||||
|
||||
|
||||
New in 0.0.5
|
||||
* March 17, 2000
|
||||
* Restructured directory layout to facilitate windows/mac IDE builds.
|
||||
|
||||
|
||||
New in 0.0.4
|
||||
* Removed mat3.h and friends (we now use plib's sg lib for these sorts of
|
||||
things.)
|
||||
|
||||
|
||||
New in 0.0.3
|
||||
* Release that coincides with FlightGear-0.7.2
|
||||
15
README
Normal file
15
README
Normal file
@@ -0,0 +1,15 @@
|
||||
SimGear - Simulator Construction Tools
|
||||
======================================
|
||||
http://www.flightgear.org
|
||||
|
||||
SimGear is a set of open-source libraries designed to be used as building
|
||||
blocks for quickly assembling 3d simulations, games, and visualization
|
||||
applications.
|
||||
|
||||
SimGear is developed by the FlightGear project and also provides the base
|
||||
for the FlightGear Flight Simulator.
|
||||
|
||||
Source code for SimGear is released under the GNU Library General Public
|
||||
License (LGPL) - see COPYING for license details.
|
||||
|
||||
See INSTALL file for help on building SimGear.
|
||||
26
README.OSG
Normal file
26
README.OSG
Normal file
@@ -0,0 +1,26 @@
|
||||
[This file is mirrored in both the FlightGear and SimGear packages.]
|
||||
|
||||
You *must* have OpenSceneGraph (OSG) installed to build this version of
|
||||
FlightGear.
|
||||
|
||||
Notice that this version of SimGear/FlightGear requires at least OSG 3.0.0.
|
||||
|
||||
You can get the latest version of OSG from:
|
||||
|
||||
http://www.openscenegraph.org/
|
||||
|
||||
Build notes:
|
||||
|
||||
Unzip the file OpenSceneGraph-x.x.zip and install using the following
|
||||
commands:
|
||||
|
||||
unzip OpenSceneGraph-x.x
|
||||
cd OpenSceneGraph
|
||||
ccmake .
|
||||
|
||||
[ While running ccmake: press 'c' to configure, press 'c' once more, and
|
||||
then press 'g' to generate and exit ]
|
||||
|
||||
make
|
||||
sudo make install
|
||||
|
||||
20
README.OpenAL
Normal file
20
README.OpenAL
Normal file
@@ -0,0 +1,20 @@
|
||||
[This file is mirrored in both the FlightGear and SimGear packages.]
|
||||
|
||||
You *must* have the development components of OpenAL installed on your system
|
||||
to build FlightGear!" You can get a copy here:
|
||||
|
||||
http://connect.creativelabs.com/openal/default.aspx
|
||||
|
||||
Build notes:
|
||||
|
||||
You can download a versioned release of the openal library from
|
||||
http://www.openal.org/downloads.html. Download the openal source,
|
||||
release 0.0.8 (dated February 11, 2006) and run:
|
||||
tar xjvf openal-soft-1.5.304.tar.bz2
|
||||
cd openal-soft-1.5.304/
|
||||
ccmake .
|
||||
|
||||
[ While running ccmake: press 'c' to configure, press 'c' once more, and
|
||||
then press 'g' to generate and exit ]
|
||||
|
||||
|
||||
161
README.cmake
Normal file
161
README.cmake
Normal file
@@ -0,0 +1,161 @@
|
||||
Getting started with CMake
|
||||
==========================
|
||||
|
||||
(These instructions apply to Unix-like systems, including Cygwin and Mac. To
|
||||
build using Visual Studio or some other IDE supported by CMake, most of the
|
||||
information below still applies. Otherwise see
|
||||
http://wiki.flightgear.org/Building_Flightgear for Windows specific build
|
||||
instructions.)
|
||||
|
||||
Always compile in a separate directory to the code. For example, if the
|
||||
code (eg, from Git) is at /home/curt/projects/simgear, you might create
|
||||
/home/curt/projects/sgbuild. Change into the new directory, and run
|
||||
|
||||
cmake ../simgear
|
||||
|
||||
To generate standard Unix Makefiles in sgbuild.
|
||||
|
||||
Probably you want to specify an install prefix:
|
||||
|
||||
cmake ../simgear -DCMAKE_INSTALL_PREFIX=/usr
|
||||
|
||||
Note the install prefix is automatically searched for required libraries
|
||||
and header files, so if you install OpenSceneGraph to the same prefix,
|
||||
most configuration options are unnecessary.
|
||||
|
||||
If for some reason you have a dependency (or several) at a different prefix,
|
||||
you can specify one or more via CMAKE_PREFIX_PATH:
|
||||
|
||||
cmake ../simgear -DCMAKE_PREFIX_PATH="/opt/local;/opt/fgfs"
|
||||
|
||||
(note the use of semi-colons to specify multiple prefix paths)
|
||||
|
||||
Standard prefixes are searched automatically (/usr, /usr/local, /opt/local)
|
||||
|
||||
Most dependencies also expose an environment variable to specify their
|
||||
installation directory explicitly eg OSG_DIR. Any of the methods
|
||||
described above will work, but specifying an INSTALL_PREFIX or PREFIX_PATH is
|
||||
usually simpler.
|
||||
|
||||
By default, we select a release build. To create a debug build, use
|
||||
|
||||
cmake ../simgear -DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
(or MinSizeRel, or RelWithDbg)
|
||||
|
||||
Debug builds will automatically use corresponding debug builds of required
|
||||
libraries, if they are available. For example you can install debug builds of
|
||||
OpenSceneGraph, and a debug SimGear build will use them.
|
||||
|
||||
(Debug builds of libraries have the 'd' suffix by default - Release builds
|
||||
have no additional suffix)
|
||||
|
||||
Note most IDE projects (eg Xcode and Visual Studio) support building all the
|
||||
build types from the same project, so you can omit the CMAKE_BUILD_TYPE option
|
||||
when running cmake, and simply pick the build configuration as normal in the
|
||||
IDE.
|
||||
|
||||
It's common to have several build directories with different build
|
||||
configurations, eg
|
||||
|
||||
/home/curt/projects/simgear (the git clone)
|
||||
/home/curt/projects/sgdebug
|
||||
/home/curt/projects/sgrelease
|
||||
/home/curt/projects/sg-with-svn-osg
|
||||
|
||||
To set an optional feature, do
|
||||
|
||||
cmake ../simgear -DFEATURE_NAME=ON
|
||||
|
||||
(or 'OFF' to disable )
|
||||
|
||||
To see the variables that can be configured / are currently defined, you can
|
||||
run one of the GUI front ends, or the following command:
|
||||
|
||||
cmake ../simgear -L
|
||||
|
||||
Add 'A' to see all the options (including advanced options), or 'H' to see
|
||||
the help for each option (similar to running configure --help under autoconf):
|
||||
|
||||
cmake ../simgear -LH
|
||||
|
||||
|
||||
Build Targets
|
||||
=============
|
||||
|
||||
For a Unix makefile build, 'make dist', 'make uninstall' and 'make test' are
|
||||
all available and should work as expected. 'make clean' is also as normal,
|
||||
but there is *no* 'make distclean' target. The equivalent is to completely
|
||||
remove your build directory, and start with a fresh one.
|
||||
|
||||
Adding new files to the build
|
||||
|
||||
Add source files to the SOURCES list, and headers to the HEADERS list. Note
|
||||
technically you only need to add source files, but omitting headers confuses
|
||||
project generation and distribution / packaging targets.
|
||||
|
||||
For target conditional files, you can append to the SOURCES or HEADERS lists
|
||||
inside an if() test, for example:
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND SOURCES extraFile1.cxx extraFile2.cxx)
|
||||
endif()
|
||||
|
||||
Setting include directories
|
||||
|
||||
In any CMakeList.txt, you can do the following:
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/some/path)
|
||||
|
||||
For example, this can be done in particular subdirectory, or at the project
|
||||
root, or an intermediate level.
|
||||
|
||||
Setting target specific compile flags, includes or defines
|
||||
|
||||
Use set_target_property(), for example
|
||||
|
||||
set_target_property(fgfs PROPERTIES
|
||||
COMPILE_DEFINITIONS FOO BAR=1)
|
||||
|
||||
You can set a property on an individual source file:
|
||||
|
||||
set_property(SOURCE myfile.cxx PROPERTY COMPILE_FLAGS "-Wno-unsigned-compare")
|
||||
|
||||
Detecting Features / Libraries
|
||||
|
||||
For most standard libraries (Gtk, wxWidget, Python, GDAL, Qt, libXml, Boost),
|
||||
cmake provides a standard helper. To see the available modules, run:
|
||||
|
||||
cmake --help-module-list
|
||||
|
||||
In the root CMakeLists file, use a statement like:
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
Each package helper sets various variables such aaa_FOUND, aaa_INCLUDE_DIR,
|
||||
and aaa_LIBRARY. Depending on the complexity of the package, these variables
|
||||
might have different names (eg, OPENSCENEGRAPH_LIBRARIES).
|
||||
|
||||
If there's no standard helper for a library you need, find a similar one, copy
|
||||
it to CMakeModules/FindABC.cmake, and modify the code to fit. Generally this
|
||||
is pretty straightforward. The built-in modules reside in the Cmake 'share'
|
||||
directory, eg /usr/share/cmake/modules on Unix systems.
|
||||
|
||||
Note libraries support by pkg-config can be handled directly, with no need
|
||||
to create a custom FindABC helper.
|
||||
|
||||
Adding a new executable target
|
||||
|
||||
add_executable(myexecutable ${SOURCES} ${HEADERS})
|
||||
target_link_libraries(myexecutable .... libraries ... )
|
||||
install(TARGETS myexecutable RUNTIME DESTINATION bin)
|
||||
|
||||
(If the executable should not be installed, omit the final line above)
|
||||
|
||||
If you add an additional line
|
||||
|
||||
add_test(testname ${EXECUTABLE_OUTPUT_PATH}/myexecutable)
|
||||
|
||||
Then running 'make test' will run your executable as a unit test. The
|
||||
executable should return either a success or failure result code.
|
||||
|
||||
8
README.zlib
Normal file
8
README.zlib
Normal file
@@ -0,0 +1,8 @@
|
||||
zlib is prerequisite for compiling SimGear and FlightGear. You can fetch
|
||||
the latest version of zlib from:
|
||||
|
||||
http://www.zlib.net
|
||||
|
||||
Most modern unix distributions (and cygwin) come with a version of zlib
|
||||
already installed or available to install as a package.
|
||||
|
||||
76
SimGear.spec.in
Normal file
76
SimGear.spec.in
Normal file
@@ -0,0 +1,76 @@
|
||||
%define ver @VERSION@
|
||||
%define rel 1
|
||||
%define prefix /usr
|
||||
|
||||
Summary: Simulator Construction Gear.
|
||||
Name: @PACKAGE@
|
||||
Version: %ver
|
||||
Release: %rel
|
||||
Copyright: LGPL
|
||||
Group: Libraries/Graphics
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
#URL:
|
||||
BuildRoot: /tmp/%{name}-%{version}-%{rel}-root
|
||||
Packager: Fill In As You Wish
|
||||
Docdir: %{prefix}/doc
|
||||
|
||||
%description
|
||||
This package contains a tools and libraries useful for constructing
|
||||
simulation and visualization applications such as FlightGear or TerraGear.
|
||||
|
||||
Authors:
|
||||
N/A
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{version}
|
||||
|
||||
|
||||
%build
|
||||
# Needed for snapshot releases.
|
||||
if [ ! -f configure ]; then
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix
|
||||
else
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix
|
||||
fi
|
||||
|
||||
if [ "$SMP" != "" ]; then
|
||||
JSMP = '"MAKE=make -k -j $SMP"'
|
||||
fi
|
||||
|
||||
make ${JSMP};
|
||||
|
||||
|
||||
%install
|
||||
[ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
make prefix=${RPM_BUILD_ROOT}%{prefix} install
|
||||
|
||||
#
|
||||
# Generating file lists and store them in file-lists
|
||||
# Starting with the directory listings
|
||||
#
|
||||
find ${RPM_BUILD_ROOT}%{prefix}/{bin,include,lib} -type d | sed "s#^${RPM_BUILD_ROOT}#\%attr (-\,root\,root) \%dir #" > file-lists
|
||||
%{?ETCDR:find ${RPM_BUILD_ROOT}%{!?SYSCF:%{prefix}}/etc -type d | sed "s#^${RPM_BUILD_ROOT}#\%attr (-\,root\,root) \%dir #" >> file-lists}
|
||||
|
||||
#
|
||||
# Then, the file listings
|
||||
#
|
||||
echo "%defattr (-, root, root)" >> file-lists
|
||||
%{?ETCDR:find ${RPM_BUILD_ROOT}%{!?SYSCF:%{prefix}}/etc/%{name}.conf -type f | sed -e "s#^${RPM_BUILD_ROOT}#%config #g" >> file-lists}
|
||||
find ${RPM_BUILD_ROOT}%{prefix} -type f | sed -e "s#^${RPM_BUILD_ROOT}##g" >> file-lists
|
||||
|
||||
|
||||
%clean
|
||||
(cd ..; rm -rf %{name}-%{version} ${RPM_BUILD_ROOT})
|
||||
|
||||
|
||||
%files -f file-lists
|
||||
%defattr (-, root, root)
|
||||
%doc AUTHORS
|
||||
%doc COPYING
|
||||
%doc ChangeLog
|
||||
%doc INSTALL
|
||||
%doc NEWS
|
||||
%doc README
|
||||
%doc %{name}.spec.in
|
||||
|
||||
205
Thanks
Normal file
205
Thanks
Normal file
@@ -0,0 +1,205 @@
|
||||
A very special thanks is due to the following people and groups.
|
||||
|
||||
Note: as hard as we've tried, it is impossible to perfectly maintain
|
||||
this file. If you are aware of someone who you think should be
|
||||
included here, PLEASE let me know. Projects like this are made
|
||||
possible only by the help and hard work of others. I want to properly
|
||||
credit everyone who has contributed to this project.
|
||||
|
||||
|
||||
Raul Alonzo <amil@las.es>
|
||||
Mr. Alonzo is the author of Ssystem and provided his kind permission
|
||||
for using the moon texture. I also used parts of his code as a template
|
||||
when adding the texture. Ssystem Homepage can be found at:
|
||||
http://www1.las.es/~amil/ssystem
|
||||
|
||||
|
||||
Paul Bleisch <pbleisch@acm.org>
|
||||
Paul redid the "debug" system so that it would be much more flexible,
|
||||
so it could be easily disabled for production system, and so that
|
||||
messages for certain subsystems could be selectively enabled.
|
||||
Also contributed a first stab at a config file/command line parsing
|
||||
system.
|
||||
|
||||
|
||||
Bernie Bright <bbright@c031.aone.net.au>
|
||||
Many C++ style, usage, and implementation improvements.
|
||||
STL portability, tons o' stuff. :-)
|
||||
Currently trying to get a BeOS port together but life keeps getting
|
||||
in the way!
|
||||
|
||||
|
||||
Gene Buckle <geneb@deltasoft.com>
|
||||
Gene has done a lot of work getting FG to compile with the MSVC++
|
||||
compiler. Also, he has pushed, proded, and bugged me endlessly to
|
||||
do my stuff right. (I mean that in a good way, because sometimes
|
||||
when the little nudge in the right direction isn't working, I need
|
||||
a good hard shove.) :-)
|
||||
|
||||
|
||||
John Check <j4strngs@rockfish.net>
|
||||
Cloud textures
|
||||
|
||||
|
||||
Jean-Francois Doue
|
||||
Vector 2D, 3D, 4D and Matrix 3D and 4D inlined C++ classes. (Based on
|
||||
Graphics Gems IV ed. Paul S. Heckbert)
|
||||
http://www.animats.com/simpleppp/ftp/public_html/topics/developers.html
|
||||
|
||||
|
||||
Melchior Franz
|
||||
METAR parser and fetcher. "material" animation (based on Jim Wilsons's
|
||||
"emission" animation). Debugging and extension of property listener
|
||||
features. Addition of removeChildren.
|
||||
|
||||
|
||||
Mathias Froehlich
|
||||
Reworked and cleaned up large parts of the infrastructure, of math
|
||||
files, animations and rendering in preparation of a transition to
|
||||
the OSG library. Added new handlers for shared and referenced objects.
|
||||
|
||||
|
||||
Bruce Finney <bfinney@gte.net>
|
||||
MSVC5 compatibility.
|
||||
|
||||
|
||||
Jean-loup Gailly and Mark Adler <zlib@gzip.org>
|
||||
Authors of the zlib library. Used for on-the-fly compression and
|
||||
decompression routines.
|
||||
http://www.cdrom.com/pub/infozip/zlib/
|
||||
|
||||
|
||||
Thomas Gellekum <tg@ihf.rwth-aachen.de>
|
||||
Changes and updates for compiling on FreeBSD
|
||||
|
||||
|
||||
Habibie <habibie@MailandNews.com>
|
||||
RedHat package building changes for SimGear.
|
||||
|
||||
|
||||
Bruce Jackson of NASA <e.b.jackson@larc.nasa.gov>
|
||||
Developed the LaRCsim code under funding by NASA which we use to provide
|
||||
the flight model. Bruce has patiently answered my many, many questions.
|
||||
http://dcb.larc.nasa.gov/www/DCBStaff/ebj/ebj.html
|
||||
|
||||
|
||||
Maik Justus
|
||||
Fixed an old bug in the SGPropertyNode class.
|
||||
|
||||
|
||||
Richard Kaszeta <bofh@me.umn.edu>
|
||||
Contributed screen buffer to ppm screen shot routine.
|
||||
Rich has also helped in the early development of the Flight Gear "altitude
|
||||
hold autopilot module" by teaching Curt Olson the basics of Control Theory
|
||||
and helping him code and debug early versions. Curt's "Boss" Bob Hain
|
||||
also contributed <bob@me.umn.edu>. Further details available at:
|
||||
http://www.menet.umn.edu/~curt/fgfs/Docs/Autopilot/AltitudeHold/AltitudeHold.html
|
||||
Rich's Homepage: http://www.menet.umn.edu/~kaszeta
|
||||
|
||||
|
||||
Tom Knienieder <tom@knienieder.com>
|
||||
Ported Steve's Audio library first to OpenBSD and IRIX and
|
||||
after that also to Win32
|
||||
|
||||
|
||||
David Megginson <david@megginson.com>
|
||||
SimGear property manager/registry
|
||||
|
||||
|
||||
Tim Moore
|
||||
Ported the (chrome) "shader" animation to OSG, and helped with porting
|
||||
the "material" animation.
|
||||
|
||||
|
||||
Curt Olson http://www.flightgear.org/~curt/
|
||||
Curt is responsible for overall project and source code management.
|
||||
He has his hands in many of the areas.
|
||||
|
||||
|
||||
Petter Reinholdtsen <pere@games.no>
|
||||
Incorporated the Gnu automake/autoconf system (with libtool).
|
||||
This should streamline and standardize the build process for all
|
||||
Unix-like platforms. It should have little effect on IDE type
|
||||
environments since these don't use the Unix make system.
|
||||
|
||||
|
||||
Paul Schlyter <pausch@saaf.se>
|
||||
Mr. Schlyter provided Durk Talsma with all the information
|
||||
he needed to write the astro code. Mr. S. is also willing
|
||||
to answer astro-related questions whenever one needs to.
|
||||
http://welcome.to/pausch
|
||||
|
||||
|
||||
Durk Talsma <d.talsma@chello.nl>
|
||||
Accurate Sun, Moon, and Planets.
|
||||
Sun changes color based on position in sky.
|
||||
Moon has correct phase and blends well into the sky.
|
||||
Planets are correctly positioned and have proper magnitude.
|
||||
Added time zone support in the SGTime class.
|
||||
Help with time functions, gui, and other misc stuff.
|
||||
http://people.a2000.nl/dtals
|
||||
|
||||
|
||||
Mark Vallevand <Mark.Vallevand@UNISYS.com>
|
||||
Contributed some METAR parsing code.
|
||||
Contributed some win32 screen printing routines.
|
||||
|
||||
|
||||
Gary R. Van Sickle <tiberius@braemarinc.com>
|
||||
Contributed some initial GameGLUT support and other fixes.
|
||||
Has done some interesting preliminary work on a binary file format
|
||||
http://www.woodsoup.org/projs/ORKiD/fgfs.htm
|
||||
|
||||
Has set up a 'Cygwin Tips' site that has been very helpful to many
|
||||
people in getting a Cygwin Unix-on-Windows build environment set up
|
||||
so they can build FG effectively.
|
||||
http://www.woodsoup.org/projs/ORKiD/cygwin.htm
|
||||
|
||||
|
||||
Norman Vine <nhv@yahoo.com>
|
||||
Provided more than uncountable URL's to the "FlightGear Community".
|
||||
Many performance optimizations throughout the code.
|
||||
Lots of windoze related contributions.
|
||||
Contributed wgs84 distance and course routines.
|
||||
Contributed a great circle route autopilot mode based on wgs84 routines.
|
||||
|
||||
|
||||
Ed Williams <Ed_Williams@compuserve.com>
|
||||
Contributed magnetic variation code (impliments Nima WMM 2000)
|
||||
We've also borrowed from Ed's wonderful aviation formulary at various
|
||||
times as well.
|
||||
http://www.best.com/~williams/index.html
|
||||
|
||||
|
||||
Jean-Claude Wippler <jcw@equi4.com>
|
||||
Author of MetaKit - a portable, embeddible database with a portable
|
||||
data file format. This software is not GPL'd but the author is kindly
|
||||
allowing us to bundle MetaKit with our code. MetaKit has a liberal
|
||||
X/MIT-style license. Please see the following URL for more info:
|
||||
http://www.equi4.com/metakit
|
||||
|
||||
|
||||
WoodSoup Project http://www.woodsoup.org
|
||||
Provided computing resources and services so that the Flight Gear
|
||||
project could have real home. This includes, web services,
|
||||
ftp services, shell accounts, email lists, dns services, etc.
|
||||
|
||||
|
||||
Robert Allan Zeh <raz@cmg.FCNBD.COM>
|
||||
Helped me tremendously in figuring out the Cygnus win32 compiler and
|
||||
how to link with .dll's. With out him the first runable win32
|
||||
version of FG would have been impossible.
|
||||
|
||||
|
||||
|
||||
NOTE:
|
||||
----
|
||||
|
||||
THIS DOCUMENT WAS INITIALLY WRITTEN BY
|
||||
Curt L. Olson <http://www.flightgear.org/~curt>
|
||||
|
||||
|
||||
05 Jul 2000 Removed non-SimGear entries (CLO)
|
||||
|
||||
08 Mar 2000 CONTENTS RESEARCHED AND UPDATED by
|
||||
Oliver Delise <delise@mail.isis.de>
|
||||
13
package/RedHat/README
Normal file
13
package/RedHat/README
Normal file
@@ -0,0 +1,13 @@
|
||||
Building a SimGear RPM package for Red Hat
|
||||
|
||||
Please see the "package/openSUSE" directory for an
|
||||
example how to build a SimGear RPM package with
|
||||
shared SimGear libraries.
|
||||
|
||||
You may need to adapt the names (exact spelling) of some
|
||||
of the package dependencies in the openSUSE RPM spec,
|
||||
since these may slightly differ for Red Hat.
|
||||
|
||||
(If you have a working and tested Red Hat RPM spec,
|
||||
you're welcome to contribute it to this project.)
|
||||
|
||||
23
package/openSUSE/README
Normal file
23
package/openSUSE/README
Normal file
@@ -0,0 +1,23 @@
|
||||
Building a SimGear RPM package for openSUSE
|
||||
|
||||
(Last tested with openSUSE 11.4+12.1)
|
||||
|
||||
This directory contains the files which, along with
|
||||
the source code tar files, can be used to build
|
||||
an RPM package targeted at an openSUSE Linux system.
|
||||
|
||||
To build SimGear from source do the following:
|
||||
|
||||
1. obtain simgear-2.8.0.tar.bz2 (adapt version if
|
||||
necessary) and copy it into ~/rpmbuild/SOURCES
|
||||
|
||||
2. look in the BuildRequires section of SimGear.spec
|
||||
and check that all the packages referred to are
|
||||
installed (note, some of these packages may be part
|
||||
of openSUSE's "games" repository).
|
||||
|
||||
3. run 'rpmbuild -ba simgear.spec' and find the RPM
|
||||
build result in ~/rpmbuild/RPMS
|
||||
|
||||
That's all!
|
||||
|
||||
63
package/openSUSE/SimGear.spec
Normal file
63
package/openSUSE/SimGear.spec
Normal file
@@ -0,0 +1,63 @@
|
||||
Summary: Simulator Construction Gear
|
||||
Name: SimGear
|
||||
Version: 2.8.0
|
||||
Release: 1
|
||||
License: LGPL
|
||||
URL: http://www.flightgear.org
|
||||
Group: Amusements/Games/3D/Simulation
|
||||
Source: http://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/Source/simgear-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
BuildRequires: gcc, gcc-c++, cmake
|
||||
BuildRequires: libopenal1-soft, openal-soft
|
||||
BuildRequires: libOpenSceneGraph-devel >= 3.0
|
||||
BuildRequires: zlib, zlib-devel
|
||||
BuildRequires: libjpeg62, libjpeg62-devel
|
||||
BuildRequires: boost-devel >= 1.37
|
||||
BuildRequires: subversion-devel, libapr1-devel
|
||||
Requires: OpenSceneGraph-plugins >= 3.0
|
||||
|
||||
%description
|
||||
This package contains a tools and libraries useful for constructing
|
||||
simulation and visualization applications such as FlightGear or TerraGear.
|
||||
|
||||
%package devel
|
||||
Group: Development/Libraries/Other
|
||||
Summary: Development header files for SimGear
|
||||
Requires: SimGear = %{version}
|
||||
|
||||
%description devel
|
||||
Development headers and libraries for building applications against SimGear.
|
||||
|
||||
%prep
|
||||
%setup -T -q -n simgear-%{version} -b 0
|
||||
|
||||
%build
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
export CXXFLAGS="$RPM_OPT_FLAGS"
|
||||
# build SHARED simgear libraries
|
||||
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSIMGEAR_SHARED:BOOL=ON -DENABLE_TESTS:BOOL=OFF -DJPEG_FACTORY:BOOL=ON
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} install
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr (-, root, root, -)
|
||||
%doc AUTHORS COPYING ChangeLog NEWS README
|
||||
%{_libdir}/libSimGear*.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_includedir}/simgear
|
||||
%{_includedir}/simgear/*
|
||||
%{_libdir}/libSimGear*.so
|
||||
|
||||
%changelog
|
||||
* Mon Jul 02 2012 thorstenb@flightgear.org
|
||||
- Initial version
|
||||
|
||||
2
simgear/.gitignore
vendored
Normal file
2
simgear/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
simgear_config.h
|
||||
version.h
|
||||
150
simgear/CMakeLists.txt
Normal file
150
simgear/CMakeLists.txt
Normal file
@@ -0,0 +1,150 @@
|
||||
|
||||
file(WRITE ${PROJECT_BINARY_DIR}/simgear/version.h "#define SIMGEAR_VERSION ${SIMGEAR_VERSION}")
|
||||
|
||||
foreach( mylibfolder
|
||||
bucket
|
||||
bvh
|
||||
debug
|
||||
ephemeris
|
||||
io
|
||||
magvar
|
||||
math
|
||||
misc
|
||||
nasal
|
||||
nasal/cppbind
|
||||
props
|
||||
serial
|
||||
structure
|
||||
threads
|
||||
timing
|
||||
xml
|
||||
package
|
||||
)
|
||||
|
||||
add_subdirectory(${mylibfolder})
|
||||
|
||||
endforeach( mylibfolder )
|
||||
|
||||
if(NOT SIMGEAR_HEADLESS)
|
||||
add_subdirectory(canvas)
|
||||
add_subdirectory(environment)
|
||||
add_subdirectory(screen)
|
||||
add_subdirectory(scene)
|
||||
add_subdirectory(sound)
|
||||
endif(NOT SIMGEAR_HEADLESS)
|
||||
|
||||
|
||||
if(ENABLE_RTI)
|
||||
add_subdirectory(hla)
|
||||
endif(ENABLE_RTI)
|
||||
|
||||
|
||||
set(HEADERS compiler.h constants.h sg_inlines.h ${PROJECT_BINARY_DIR}/simgear/version.h)
|
||||
install (FILES ${HEADERS} DESTINATION include/simgear/)
|
||||
|
||||
get_property(coreSources GLOBAL PROPERTY CORE_SOURCES)
|
||||
get_property(sceneSources GLOBAL PROPERTY SCENE_SOURCES)
|
||||
get_property(publicHeaders GLOBAL PROPERTY PUBLIC_HEADERS)
|
||||
|
||||
if(LIBSVN_FOUND)
|
||||
add_definitions(${APR_CFLAGS})
|
||||
include_directories(${LIBSVN_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(SIMGEAR_SHARED)
|
||||
message(STATUS "Library building mode: SHARED LIBRARIES")
|
||||
add_library(SimGearCore SHARED ${coreSources})
|
||||
|
||||
# set_property(TARGET SimGearCore PROPERTY FRAMEWORK 1)
|
||||
# message(STATUS "public header: ${publicHeaders}")
|
||||
# set_property(TARGET SimGearCore PROPERTY PUBLIC_HEADER "${publicHeaders}")
|
||||
set_property(TARGET SimGearCore PROPERTY LINKER_LANGUAGE CXX)
|
||||
|
||||
set_property(TARGET SimGearCore PROPERTY VERSION ${SIMGEAR_VERSION})
|
||||
set_property(TARGET SimGearCore PROPERTY SOVERSION ${SIMGEAR_SOVERSION})
|
||||
|
||||
target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY}
|
||||
${LibArchive_LIBRARIES}
|
||||
${EXPAT_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${CORE_SERVICES_LIBRARY})
|
||||
|
||||
if(LIBSVN_FOUND)
|
||||
target_link_libraries(SimGearCore ${LIBSVN_LIBRARIES})
|
||||
endif(LIBSVN_FOUND)
|
||||
|
||||
if(NOT SIMGEAR_HEADLESS)
|
||||
add_library(SimGearScene SHARED ${sceneSources})
|
||||
# set_property(TARGET SimGearScene PROPERTY FRAMEWORK 1)
|
||||
# set_property(TARGET SimGearScene PROPERTY PUBLIC_HEADER "${publicHeaders}")
|
||||
set_property(TARGET SimGearScene PROPERTY LINKER_LANGUAGE CXX)
|
||||
set_property(TARGET SimGearScene PROPERTY VERSION ${SIMGEAR_VERSION})
|
||||
set_property(TARGET SimGearScene PROPERTY SOVERSION ${SIMGEAR_SOVERSION})
|
||||
|
||||
target_link_libraries(SimGearScene
|
||||
SimGearCore
|
||||
${ZLIB_LIBRARY}
|
||||
${OPENSCENEGRAPH_LIBRARIES}
|
||||
${OPENAL_LIBRARY}
|
||||
${OPENGL_LIBRARY}
|
||||
${JPEG_LIBRARY})
|
||||
|
||||
install(TARGETS SimGearScene LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
||||
install(TARGETS SimGearCore LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
else()
|
||||
message(STATUS "Library building mode: STATIC LIBRARIES")
|
||||
|
||||
get_property(FG_GROUPS_CORE_SOURCES_C GLOBAL PROPERTY FG_GROUPS_CORE_SOURCES_C)
|
||||
string(REPLACE "@" ";" groups ${FG_GROUPS_CORE_SOURCES_C} )
|
||||
foreach(g ${groups})
|
||||
string(REPLACE "#" ";" g2 ${g})
|
||||
list(GET g2 0 name)
|
||||
list(REMOVE_AT g2 0)
|
||||
source_group("${name}\\Sources" FILES ${g2})
|
||||
endforeach()
|
||||
|
||||
get_property(FG_GROUPS_CORE_SOURCES_H GLOBAL PROPERTY FG_GROUPS_CORE_SOURCES_H)
|
||||
string(REPLACE "@" ";" groups ${FG_GROUPS_CORE_SOURCES_H} )
|
||||
foreach(g ${groups})
|
||||
string(REPLACE "#" ";" g2 ${g})
|
||||
list(GET g2 0 name)
|
||||
list(REMOVE_AT g2 0)
|
||||
source_group("${name}\\Headers" FILES ${g2})
|
||||
endforeach()
|
||||
|
||||
add_library(SimGearCore STATIC ${coreSources})
|
||||
install(TARGETS SimGearCore ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
if(NOT SIMGEAR_HEADLESS)
|
||||
get_property(FG_GROUPS_SCENE_SOURCES_C GLOBAL PROPERTY FG_GROUPS_SCENE_SOURCES_C)
|
||||
string(REPLACE "@" ";" groups ${FG_GROUPS_SCENE_SOURCES_C} )
|
||||
foreach(g ${groups})
|
||||
string(REPLACE "#" ";" g2 ${g})
|
||||
list(GET g2 0 name)
|
||||
list(REMOVE_AT g2 0)
|
||||
source_group("${name}\\Sources" FILES ${g2})
|
||||
endforeach()
|
||||
|
||||
get_property(FG_GROUPS_SCENE_SOURCES_H GLOBAL PROPERTY FG_GROUPS_SCENE_SOURCES_H)
|
||||
string(REPLACE "@" ";" groups ${FG_GROUPS_SCENE_SOURCES_H} )
|
||||
foreach(g ${groups})
|
||||
string(REPLACE "#" ";" g2 ${g})
|
||||
list(GET g2 0 name)
|
||||
list(REMOVE_AT g2 0)
|
||||
source_group("${name}\\Headers" FILES ${g2})
|
||||
endforeach()
|
||||
|
||||
add_library(SimGearScene STATIC ${sceneSources})
|
||||
install(TARGETS SimGearScene ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif(NOT SIMGEAR_HEADLESS)
|
||||
endif(SIMGEAR_SHARED)
|
||||
|
||||
if(ENABLE_RTI)
|
||||
# Ugly first aid to make hla compile agian
|
||||
set_property(SOURCE hla/RTI13InteractionClass.cxx hla/RTI13ObjectClass.cxx
|
||||
hla/RTI13ObjectInstance.cxx hla/RTI13Federate.cxx
|
||||
hla/RTI13FederateFactory.cxx
|
||||
APPEND PROPERTY COMPILE_FLAGS "-I${RTI_INCLUDE_DIR}")
|
||||
endif(ENABLE_RTI)
|
||||
7
simgear/bucket/CMakeLists.txt
Normal file
7
simgear/bucket/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
include (SimGearComponent)
|
||||
|
||||
set(HEADERS newbucket.hxx)
|
||||
set(SOURCES newbucket.cxx)
|
||||
|
||||
simgear_component(bucket bucket "${SOURCES}" "${HEADERS}")
|
||||
357
simgear/bucket/newbucket.cxx
Normal file
357
simgear/bucket/newbucket.cxx
Normal file
@@ -0,0 +1,357 @@
|
||||
/**************************************************************************
|
||||
* newbucket.hxx -- new bucket routines for better world modeling
|
||||
*
|
||||
* Written by Curtis L. Olson, started February 1999.
|
||||
*
|
||||
* Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt/
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $Id$
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <simgear_config.h>
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <simgear/misc/sg_path.hxx>
|
||||
|
||||
#include "newbucket.hxx"
|
||||
|
||||
|
||||
// default constructor
|
||||
SGBucket::SGBucket() {
|
||||
}
|
||||
|
||||
|
||||
// constructor for specified location
|
||||
SGBucket::SGBucket(const double dlon, const double dlat) {
|
||||
set_bucket(dlon, dlat);
|
||||
}
|
||||
|
||||
SGBucket::SGBucket(const SGGeod& geod) {
|
||||
set_bucket(geod);
|
||||
}
|
||||
|
||||
// create an impossible bucket if false
|
||||
SGBucket::SGBucket(const bool is_good) {
|
||||
set_bucket(0.0, 0.0);
|
||||
if ( !is_good ) {
|
||||
lon = -1000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Parse a unique scenery tile index and find the lon, lat, x, and y
|
||||
SGBucket::SGBucket(const long int bindex) {
|
||||
long int index = bindex;
|
||||
|
||||
lon = index >> 14;
|
||||
index -= lon << 14;
|
||||
lon -= 180;
|
||||
|
||||
lat = index >> 6;
|
||||
index -= lat << 6;
|
||||
lat -= 90;
|
||||
|
||||
y = index >> 3;
|
||||
index -= y << 3;
|
||||
|
||||
x = index;
|
||||
}
|
||||
|
||||
|
||||
// Set the bucket params for the specified lat and lon
|
||||
void SGBucket::set_bucket( double *lonlat ) {
|
||||
set_bucket( lonlat[0], lonlat[1] );
|
||||
}
|
||||
|
||||
|
||||
// Set the bucket params for the specified lat and lon
|
||||
void SGBucket::set_bucket( double dlon, double dlat ) {
|
||||
//
|
||||
// latitude first
|
||||
//
|
||||
double span = sg_bucket_span( dlat );
|
||||
double diff = dlon - (double)(int)dlon;
|
||||
|
||||
// cout << "diff = " << diff << " span = " << span << endl;
|
||||
|
||||
/* Calculate the greatest integral longitude less than
|
||||
* or equal to the given longitude (floor(dlon)),
|
||||
* but attribute coordinates near the east border
|
||||
* to the next tile.
|
||||
*/
|
||||
if ( (dlon >= 0) || (fabs(diff) < SG_EPSILON) ) {
|
||||
lon = (int)dlon;
|
||||
} else {
|
||||
lon = (int)dlon - 1;
|
||||
}
|
||||
|
||||
// find subdivision or super lon if needed
|
||||
if ( span < SG_EPSILON ) {
|
||||
/* sg_bucket_span() never returns 0.0
|
||||
* or anything near it, so this really
|
||||
* should not occur at any time.
|
||||
*/
|
||||
// polar cap
|
||||
lon = 0;
|
||||
x = 0;
|
||||
} else if ( span <= 1.0 ) {
|
||||
/* We have more than one tile per degree of
|
||||
* longitude, so we need an x offset.
|
||||
*/
|
||||
x = (int)((dlon - lon) / span);
|
||||
} else {
|
||||
/* We have one or more degrees per tile,
|
||||
* so we need to find the base longitude
|
||||
* of that tile.
|
||||
*
|
||||
* First we calculate the integral base longitude
|
||||
* (e.g. -85.5 => -86) and then find the greatest
|
||||
* multiple of span that is less than or equal to
|
||||
* that longitude.
|
||||
*
|
||||
* That way, the Greenwich Meridian is always
|
||||
* a tile border.
|
||||
*
|
||||
* This gets us into trouble with the polar caps,
|
||||
* which have width 360 and thus either span
|
||||
* the range from 0 to 360 or from -360 to 0
|
||||
* degrees, depending on whether lon is positive
|
||||
* or negative!
|
||||
*
|
||||
* We also get into trouble with the 8 degree tiles
|
||||
* north of 88N and south of 88S, because the west-
|
||||
* and east-most tiles in that range will cover 184W
|
||||
* to 176W and 176E to 184E respectively, with their
|
||||
* center at 180E/W!
|
||||
*/
|
||||
lon=(int)floor(floor((lon+SG_EPSILON)/span)*span);
|
||||
/* Correct the polar cap issue */
|
||||
if ( lon < -180 ) {
|
||||
lon = -180;
|
||||
}
|
||||
x = 0;
|
||||
}
|
||||
|
||||
//
|
||||
// then latitude
|
||||
//
|
||||
diff = dlat - (double)(int)dlat;
|
||||
|
||||
/* Again, a modified floor() function (see longitude) */
|
||||
if ( (dlat >= 0) || (fabs(diff) < SG_EPSILON) ) {
|
||||
lat = (int)dlat;
|
||||
} else {
|
||||
lat = (int)dlat - 1;
|
||||
}
|
||||
/* Latitude base and offset are easier, as
|
||||
* tiles always are 1/8 degree of latitude wide.
|
||||
*/
|
||||
y = (int)((dlat - lat) * 8);
|
||||
}
|
||||
|
||||
|
||||
void SGBucket::set_bucket(const SGGeod& geod)
|
||||
{
|
||||
set_bucket(geod.getLongitudeDeg(), geod.getLatitudeDeg());
|
||||
}
|
||||
|
||||
// Build the path name for this bucket
|
||||
std::string SGBucket::gen_base_path() const {
|
||||
// long int index;
|
||||
int top_lon, top_lat, main_lon, main_lat;
|
||||
char hem, pole;
|
||||
char raw_path[256];
|
||||
|
||||
top_lon = lon / 10;
|
||||
main_lon = lon;
|
||||
if ( (lon < 0) && (top_lon * 10 != lon) ) {
|
||||
top_lon -= 1;
|
||||
}
|
||||
top_lon *= 10;
|
||||
if ( top_lon >= 0 ) {
|
||||
hem = 'e';
|
||||
} else {
|
||||
hem = 'w';
|
||||
top_lon *= -1;
|
||||
}
|
||||
if ( main_lon < 0 ) {
|
||||
main_lon *= -1;
|
||||
}
|
||||
|
||||
top_lat = lat / 10;
|
||||
main_lat = lat;
|
||||
if ( (lat < 0) && (top_lat * 10 != lat) ) {
|
||||
top_lat -= 1;
|
||||
}
|
||||
top_lat *= 10;
|
||||
if ( top_lat >= 0 ) {
|
||||
pole = 'n';
|
||||
} else {
|
||||
pole = 's';
|
||||
top_lat *= -1;
|
||||
}
|
||||
if ( main_lat < 0 ) {
|
||||
main_lat *= -1;
|
||||
}
|
||||
|
||||
sprintf(raw_path, "%c%03d%c%02d/%c%03d%c%02d",
|
||||
hem, top_lon, pole, top_lat,
|
||||
hem, main_lon, pole, main_lat);
|
||||
|
||||
SGPath path( raw_path );
|
||||
|
||||
return path.str();
|
||||
}
|
||||
|
||||
|
||||
// return width of the tile in degrees
|
||||
double SGBucket::get_width() const {
|
||||
return sg_bucket_span( get_center_lat() );
|
||||
}
|
||||
|
||||
|
||||
// return height of the tile in degrees
|
||||
double SGBucket::get_height() const {
|
||||
return SG_BUCKET_SPAN;
|
||||
}
|
||||
|
||||
|
||||
// return width of the tile in meters
|
||||
double SGBucket::get_width_m() const {
|
||||
double clat = (int)get_center_lat();
|
||||
if ( clat > 0 ) {
|
||||
clat = (int)clat + 0.5;
|
||||
} else {
|
||||
clat = (int)clat - 0.5;
|
||||
}
|
||||
double clat_rad = clat * SGD_DEGREES_TO_RADIANS;
|
||||
double cos_lat = cos( clat_rad );
|
||||
double local_radius = cos_lat * SG_EQUATORIAL_RADIUS_M;
|
||||
double local_perimeter = local_radius * SGD_2PI;
|
||||
double degree_width = local_perimeter / 360.0;
|
||||
|
||||
return get_width() * degree_width;
|
||||
}
|
||||
|
||||
|
||||
// return height of the tile in meters
|
||||
double SGBucket::get_height_m() const {
|
||||
double perimeter = SG_EQUATORIAL_RADIUS_M * SGD_2PI;
|
||||
double degree_height = perimeter / 360.0;
|
||||
|
||||
return SG_BUCKET_SPAN * degree_height;
|
||||
}
|
||||
|
||||
|
||||
// find the bucket which is offset by the specified tile units in the
|
||||
// X & Y direction. We need the current lon and lat to resolve
|
||||
// ambiguities when going from a wider tile to a narrower one above or
|
||||
// below. This assumes that we are feeding in
|
||||
SGBucket sgBucketOffset( double dlon, double dlat, int dx, int dy ) {
|
||||
SGBucket result( dlon, dlat );
|
||||
double clat = result.get_center_lat() + dy * SG_BUCKET_SPAN;
|
||||
|
||||
// walk dy units in the lat direction
|
||||
result.set_bucket( dlon, clat );
|
||||
|
||||
// find the lon span for the new latitude
|
||||
double span = sg_bucket_span( clat );
|
||||
|
||||
// walk dx units in the lon direction
|
||||
double tmp = dlon + dx * span;
|
||||
while ( tmp < -180.0 ) {
|
||||
tmp += 360.0;
|
||||
}
|
||||
while ( tmp >= 180.0 ) {
|
||||
tmp -= 360.0;
|
||||
}
|
||||
result.set_bucket( tmp, clat );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// calculate the offset between two buckets
|
||||
void sgBucketDiff( const SGBucket& b1, const SGBucket& b2, int *dx, int *dy ) {
|
||||
|
||||
// Latitude difference
|
||||
double c1_lat = b1.get_center_lat();
|
||||
double c2_lat = b2.get_center_lat();
|
||||
double diff_lat = c2_lat - c1_lat;
|
||||
|
||||
#ifdef HAVE_RINT
|
||||
*dy = (int)rint( diff_lat / SG_BUCKET_SPAN );
|
||||
#else
|
||||
if ( diff_lat > 0 ) {
|
||||
*dy = (int)( diff_lat / SG_BUCKET_SPAN + 0.5 );
|
||||
} else {
|
||||
*dy = (int)( diff_lat / SG_BUCKET_SPAN - 0.5 );
|
||||
}
|
||||
#endif
|
||||
|
||||
// longitude difference
|
||||
double diff_lon=0.0;
|
||||
double span=0.0;
|
||||
|
||||
SGBucket tmp_bucket;
|
||||
// To handle crossing the bucket size boundary
|
||||
// we need to account for different size buckets.
|
||||
|
||||
if ( sg_bucket_span(c1_lat) <= sg_bucket_span(c2_lat) )
|
||||
{
|
||||
span = sg_bucket_span(c1_lat);
|
||||
} else {
|
||||
span = sg_bucket_span(c2_lat);
|
||||
}
|
||||
|
||||
diff_lon = b2.get_center_lon() - b1.get_center_lon();
|
||||
|
||||
if (diff_lon <0.0)
|
||||
{
|
||||
diff_lon -= b1.get_width()*0.5 + b2.get_width()*0.5 - span;
|
||||
}
|
||||
else
|
||||
{
|
||||
diff_lon += b1.get_width()*0.5 + b2.get_width()*0.5 - span;
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_RINT
|
||||
*dx = (int)rint( diff_lon / span );
|
||||
#else
|
||||
if ( diff_lon > 0 ) {
|
||||
*dx = (int)( diff_lon / span + 0.5 );
|
||||
} else {
|
||||
*dx = (int)( diff_lon / span - 0.5 );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void sgGetBuckets( const SGGeod& min, const SGGeod& max, std::vector<SGBucket>& list ) {
|
||||
double lon, lat, span;
|
||||
|
||||
for (lat = min.getLatitudeDeg(); lat <= max.getLatitudeDeg(); lat += SG_BUCKET_SPAN) {
|
||||
span = sg_bucket_span( lat );
|
||||
for (lon = min.getLongitudeDeg(); lon <= max.getLongitudeDeg(); lon += span) {
|
||||
list.push_back( SGBucket(lon , lat) );
|
||||
}
|
||||
}
|
||||
}
|
||||
365
simgear/bucket/newbucket.hxx
Normal file
365
simgear/bucket/newbucket.hxx
Normal file
@@ -0,0 +1,365 @@
|
||||
/**************************************************************************
|
||||
* newbucket.hxx -- new bucket routines for better world modeling
|
||||
*
|
||||
* Written by Curtis L. Olson, started February 1999.
|
||||
*
|
||||
* Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $Id$
|
||||
**************************************************************************/
|
||||
|
||||
/** \file newbucket.hxx
|
||||
* A class and associated utiltity functions to manage world scenery tiling.
|
||||
*
|
||||
* Tile borders are aligned along circles of latitude and longitude.
|
||||
* All tiles are 1/8 degree of latitude high and their width in degrees
|
||||
* longitude depends on their latitude, adjusted in such a way that
|
||||
* all tiles cover about the same amount of area of the earth surface.
|
||||
*/
|
||||
|
||||
#ifndef _NEWBUCKET_HXX
|
||||
#define _NEWBUCKET_HXX
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
#include <simgear/constants.h>
|
||||
#include <simgear/math/SGMath.hxx>
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdio> // sprintf()
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* standard size of a bucket in degrees (1/8 of a degree)
|
||||
*/
|
||||
#define SG_BUCKET_SPAN 0.125
|
||||
|
||||
/**
|
||||
* half of a standard SG_BUCKET_SPAN
|
||||
*/
|
||||
#define SG_HALF_BUCKET_SPAN ( 0.5 * SG_BUCKET_SPAN )
|
||||
|
||||
|
||||
// return the horizontal tile span factor based on latitude
|
||||
static double sg_bucket_span( double l ) {
|
||||
if ( l >= 89.0 ) {
|
||||
return 12.0;
|
||||
} else if ( l >= 86.0 ) {
|
||||
return 4.0;
|
||||
} else if ( l >= 83.0 ) {
|
||||
return 2.0;
|
||||
} else if ( l >= 76.0 ) {
|
||||
return 1.0;
|
||||
} else if ( l >= 62.0 ) {
|
||||
return 0.5;
|
||||
} else if ( l >= 22.0 ) {
|
||||
return 0.25;
|
||||
} else if ( l >= -22.0 ) {
|
||||
return 0.125;
|
||||
} else if ( l >= -62.0 ) {
|
||||
return 0.25;
|
||||
} else if ( l >= -76.0 ) {
|
||||
return 0.5;
|
||||
} else if ( l >= -83.0 ) {
|
||||
return 1.0;
|
||||
} else if ( l >= -86.0 ) {
|
||||
return 2.0;
|
||||
} else if ( l >= -89.0 ) {
|
||||
return 4.0;
|
||||
} else {
|
||||
return 12.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A class to manage world scenery tiling.
|
||||
* This class encapsulates the world tiling scheme. It provides ways
|
||||
* to calculate a unique tile index from a lat/lon, and it can provide
|
||||
* information such as the dimensions of a given tile.
|
||||
*/
|
||||
|
||||
class SGBucket {
|
||||
|
||||
private:
|
||||
short lon; // longitude index (-180 to 179)
|
||||
short lat; // latitude index (-90 to 89)
|
||||
char x; // x subdivision (0 to 7)
|
||||
char y; // y subdivision (0 to 7)
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
SGBucket();
|
||||
|
||||
/**
|
||||
* Construct a bucket given a specific location.
|
||||
* @param dlon longitude specified in degrees
|
||||
* @param dlat latitude specified in degrees
|
||||
*/
|
||||
SGBucket(const double dlon, const double dlat);
|
||||
|
||||
/**
|
||||
* Construct a bucket given a specific location.
|
||||
* @param dlon longitude specified in degrees
|
||||
* @param dlat latitude specified in degrees
|
||||
*/
|
||||
SGBucket(const SGGeod& geod);
|
||||
|
||||
/** Construct a bucket.
|
||||
* @param is_good if false, create an invalid bucket. This is
|
||||
* useful * if you are comparing cur_bucket to last_bucket and
|
||||
* you want to * make sure last_bucket starts out as something
|
||||
* impossible.
|
||||
*/
|
||||
SGBucket(const bool is_good);
|
||||
|
||||
/** Construct a bucket given a unique bucket index number.
|
||||
* @param bindex unique bucket index
|
||||
*/
|
||||
SGBucket(const long int bindex);
|
||||
|
||||
/**
|
||||
* Reset a bucket to represent a new lat and lon
|
||||
* @param dlon longitude specified in degrees
|
||||
* @param dlat latitude specified in degrees
|
||||
*/
|
||||
void set_bucket( double dlon, double dlat );
|
||||
|
||||
/**
|
||||
* Reset a bucket to represent a new lat and lon
|
||||
* @param lonlat an array of double[2] holding lon and lat
|
||||
* (specified) in degrees
|
||||
*/
|
||||
void set_bucket( double *lonlat );
|
||||
|
||||
/**
|
||||
* Reset a bucket to represent a new lat and lon
|
||||
* @param dlon longitude specified in degrees
|
||||
* @param dlat latitude specified in degrees
|
||||
*/
|
||||
void set_bucket(const SGGeod& geod);
|
||||
|
||||
/**
|
||||
* Create an impossible bucket.
|
||||
* This is useful if you are comparing cur_bucket to last_bucket
|
||||
* and you want to make sure last_bucket starts out as something
|
||||
* impossible.
|
||||
*/
|
||||
inline void make_bad() {
|
||||
set_bucket(0.0, 0.0);
|
||||
lon = -1000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the unique scenery tile index for this bucket
|
||||
*
|
||||
* The index is constructed as follows:
|
||||
*
|
||||
* 9 bits - to represent 360 degrees of longitude (-180 to 179)
|
||||
* 8 bits - to represent 180 degrees of latitude (-90 to 89)
|
||||
*
|
||||
* Each 1 degree by 1 degree tile is further broken down into an 8x8
|
||||
* grid. So we also need:
|
||||
*
|
||||
* 3 bits - to represent x (0 to 7)
|
||||
* 3 bits - to represent y (0 to 7)
|
||||
* @return tile index
|
||||
*/
|
||||
inline long int gen_index() const {
|
||||
return ((lon + 180) << 14) + ((lat + 90) << 6) + (y << 3) + x;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the unique scenery tile index for this bucket in ascii
|
||||
* string form.
|
||||
* @return tile index in string form
|
||||
*/
|
||||
inline std::string gen_index_str() const {
|
||||
char tmp[20];
|
||||
std::sprintf(tmp, "%ld",
|
||||
(((long)lon + 180) << 14) + ((lat + 90) << 6)
|
||||
+ (y << 3) + x);
|
||||
return (std::string)tmp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the base path name for this bucket.
|
||||
* @return base path in string form
|
||||
*/
|
||||
std::string gen_base_path() const;
|
||||
|
||||
/**
|
||||
* @return the center lon of a tile.
|
||||
*/
|
||||
inline double get_center_lon() const {
|
||||
double span = sg_bucket_span( lat + y / 8.0 + SG_HALF_BUCKET_SPAN );
|
||||
|
||||
if ( span >= 1.0 ) {
|
||||
return lon + get_width() / 2.0;
|
||||
} else {
|
||||
return lon + x * span + get_width() / 2.0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the center lat of a tile.
|
||||
*/
|
||||
inline double get_center_lat() const {
|
||||
return lat + y / 8.0 + SG_HALF_BUCKET_SPAN;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the width of the tile in degrees.
|
||||
*/
|
||||
double get_width() const;
|
||||
|
||||
/**
|
||||
* @return the height of the tile in degrees.
|
||||
*/
|
||||
double get_height() const;
|
||||
|
||||
/**
|
||||
* @return the width of the tile in meters.
|
||||
*/
|
||||
double get_width_m() const;
|
||||
|
||||
/**
|
||||
* @return the height of the tile in meters.
|
||||
*/
|
||||
double get_height_m() const;
|
||||
|
||||
/**
|
||||
* @return the center of the bucket in geodetic coordinates.
|
||||
*/
|
||||
SGGeod get_center() const
|
||||
{ return SGGeod::fromDeg(get_center_lon(), get_center_lat()); }
|
||||
|
||||
/**
|
||||
* @return the center of the bucket in geodetic coordinates.
|
||||
*/
|
||||
SGGeod get_corner(unsigned num) const
|
||||
{
|
||||
double lonFac = ((num + 1) & 2) ? 0.5 : -0.5;
|
||||
double latFac = ((num ) & 2) ? 0.5 : -0.5;
|
||||
return SGGeod::fromDeg(get_center_lon() + lonFac*get_width(),
|
||||
get_center_lat() + latFac*get_height());
|
||||
}
|
||||
|
||||
// Informational methods.
|
||||
|
||||
/**
|
||||
* @return the lon of the lower left corner of
|
||||
* the 1x1 chunk containing this tile.
|
||||
*/
|
||||
inline int get_chunk_lon() const { return lon; }
|
||||
|
||||
/**
|
||||
* @return the lat of the lower left corner of
|
||||
* the 1x1 chunk containing this tile.
|
||||
*/
|
||||
inline int get_chunk_lat() const { return lat; }
|
||||
|
||||
/**
|
||||
* @return the x coord within the 1x1 degree chunk this tile.
|
||||
*/
|
||||
inline int get_x() const { return x; }
|
||||
|
||||
/**
|
||||
* @return the y coord within the 1x1 degree chunk this tile.
|
||||
*/
|
||||
inline int get_y() const { return y; }
|
||||
|
||||
// friends
|
||||
|
||||
friend std::ostream& operator<< ( std::ostream&, const SGBucket& );
|
||||
friend bool operator== ( const SGBucket&, const SGBucket& );
|
||||
};
|
||||
|
||||
inline bool operator!= (const SGBucket& lhs, const SGBucket& rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \relates SGBucket
|
||||
* Return the bucket which is offset from the specified dlon, dlat by
|
||||
* the specified tile units in the X & Y direction.
|
||||
* @param dlon starting lon in degrees
|
||||
* @param dlat starting lat in degrees
|
||||
* @param x number of bucket units to offset in x (lon) direction
|
||||
* @param y number of bucket units to offset in y (lat) direction
|
||||
* @return offset bucket
|
||||
*/
|
||||
SGBucket sgBucketOffset( double dlon, double dlat, int x, int y );
|
||||
|
||||
|
||||
/**
|
||||
* \relates SGBucket
|
||||
* Calculate the offset between two buckets (in quantity of buckets).
|
||||
* @param b1 bucket 1
|
||||
* @param b2 bucket 2
|
||||
* @param dx offset distance (lon) in tile units
|
||||
* @param dy offset distance (lat) in tile units
|
||||
*/
|
||||
void sgBucketDiff( const SGBucket& b1, const SGBucket& b2, int *dx, int *dy );
|
||||
|
||||
|
||||
/**
|
||||
* \relates SGBucket
|
||||
* retrieve a list of buckets in the given bounding box
|
||||
* @param min min lon,lat of bounding box in degrees
|
||||
* @param max max lon,lat of bounding box in degrees
|
||||
* @param list standard vector of buckets within the bounding box
|
||||
*/
|
||||
void sgGetBuckets( const SGGeod& min, const SGGeod& max, std::vector<SGBucket>& list );
|
||||
|
||||
/**
|
||||
* Write the bucket lon, lat, x, and y to the output stream.
|
||||
* @param out output stream
|
||||
* @param b bucket
|
||||
*/
|
||||
inline std::ostream&
|
||||
operator<< ( std::ostream& out, const SGBucket& b )
|
||||
{
|
||||
return out << b.lon << ":" << (int)b.x << ", " << b.lat << ":" << (int)b.y;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Compare two bucket structures for equality.
|
||||
* @param b1 bucket 1
|
||||
* @param b2 bucket 2
|
||||
* @return comparison result
|
||||
*/
|
||||
inline bool
|
||||
operator== ( const SGBucket& b1, const SGBucket& b2 )
|
||||
{
|
||||
return ( b1.lon == b2.lon &&
|
||||
b1.lat == b2.lat &&
|
||||
b1.x == b2.x &&
|
||||
b1.y == b2.y );
|
||||
}
|
||||
|
||||
|
||||
#endif // _NEWBUCKET_HXX
|
||||
|
||||
|
||||
2
simgear/bvh/.gitignore
vendored
Normal file
2
simgear/bvh/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bvhtest
|
||||
|
||||
83
simgear/bvh/BVHBoundingBoxVisitor.hxx
Normal file
83
simgear/bvh/BVHBoundingBoxVisitor.hxx
Normal file
@@ -0,0 +1,83 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHBoundingBoxVisitor_hxx
|
||||
#define BVHBoundingBoxVisitor_hxx
|
||||
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHGroup.hxx"
|
||||
#include "BVHPageNode.hxx"
|
||||
#include "BVHTransform.hxx"
|
||||
#include "BVHMotionTransform.hxx"
|
||||
#include "BVHLineGeometry.hxx"
|
||||
|
||||
#include "BVHStaticData.hxx"
|
||||
|
||||
#include "BVHStaticNode.hxx"
|
||||
#include "BVHStaticTriangle.hxx"
|
||||
#include "BVHStaticBinary.hxx"
|
||||
#include "BVHStaticGeometry.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHBoundingBoxVisitor : public BVHVisitor {
|
||||
public:
|
||||
virtual ~BVHBoundingBoxVisitor() {}
|
||||
|
||||
void clear()
|
||||
{ _box.clear(); }
|
||||
|
||||
virtual void apply(BVHGroup& node)
|
||||
{ expandBy(node.getBoundingSphere()); }
|
||||
virtual void apply(BVHPageNode& node)
|
||||
{ expandBy(node.getBoundingSphere()); }
|
||||
virtual void apply(BVHTransform& node)
|
||||
{ expandBy(node.getBoundingSphere()); }
|
||||
virtual void apply(BVHMotionTransform& node)
|
||||
{ expandBy(node.getBoundingSphere()); }
|
||||
virtual void apply(BVHLineGeometry& node)
|
||||
{ expandBy(node.getBoundingSphere()); }
|
||||
virtual void apply(BVHStaticGeometry& node)
|
||||
{ expandBy(node.getBoundingSphere()); }
|
||||
|
||||
virtual void apply(const BVHStaticBinary& node, const BVHStaticData& data)
|
||||
{ expandBy(node.getBoundingBox()); }
|
||||
virtual void apply(const BVHStaticTriangle& node, const BVHStaticData& data)
|
||||
{ expandBy(node.computeBoundingBox(data)); }
|
||||
|
||||
const SGBoxf& getBox() const
|
||||
{ return _box; }
|
||||
|
||||
private:
|
||||
void expandBy(const SGSphered& sphere)
|
||||
{
|
||||
SGVec3f v0(sphere.getCenter() - sphere.getRadius()*SGVec3d(1, 1, 1));
|
||||
SGVec3f v1(sphere.getCenter() + sphere.getRadius()*SGVec3d(1, 1, 1));
|
||||
_box.expandBy(SGBoxf(v0, v1));
|
||||
}
|
||||
void expandBy(const SGBoxf& box)
|
||||
{ _box.expandBy(box); }
|
||||
|
||||
SGBoxf _box;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
92
simgear/bvh/BVHGroup.cxx
Normal file
92
simgear/bvh/BVHGroup.cxx
Normal file
@@ -0,0 +1,92 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <simgear_config.h>
|
||||
#endif
|
||||
|
||||
#include "BVHGroup.hxx"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHGroup::BVHGroup()
|
||||
{
|
||||
}
|
||||
|
||||
BVHGroup::~BVHGroup()
|
||||
{
|
||||
ChildList::iterator i;
|
||||
for (i = _children.begin(); i != _children.end(); ++i) {
|
||||
(*i)->removeParent(this);
|
||||
*i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BVHGroup::accept(BVHVisitor& visitor)
|
||||
{
|
||||
visitor.apply(*this);
|
||||
}
|
||||
|
||||
void
|
||||
BVHGroup::clear()
|
||||
{
|
||||
_children.clear();
|
||||
invalidateBound();
|
||||
}
|
||||
|
||||
void
|
||||
BVHGroup::addChild(BVHNode* child)
|
||||
{
|
||||
if (!child)
|
||||
return;
|
||||
ChildList::iterator i;
|
||||
i = std::find(_children.begin(), _children.end(), child);
|
||||
if (i != _children.end())
|
||||
return;
|
||||
invalidateBound();
|
||||
child->addParent(this);
|
||||
_children.push_back(child);
|
||||
}
|
||||
|
||||
void
|
||||
BVHGroup::removeChild(BVHNode* child)
|
||||
{
|
||||
if (!child)
|
||||
return;
|
||||
ChildList::iterator i;
|
||||
i = std::find(_children.begin(), _children.end(), child);
|
||||
if (i == _children.end())
|
||||
return;
|
||||
invalidateBound();
|
||||
child->removeParent(this);
|
||||
_children.erase(i);
|
||||
}
|
||||
|
||||
SGSphered
|
||||
BVHGroup::computeBoundingSphere() const
|
||||
{
|
||||
SGSphered sphere;
|
||||
ChildList::const_iterator i;
|
||||
for (i = _children.begin(); i != _children.end(); ++i)
|
||||
sphere.expandBy((*i)->getBoundingSphere());
|
||||
return sphere;
|
||||
}
|
||||
|
||||
}
|
||||
61
simgear/bvh/BVHGroup.hxx
Normal file
61
simgear/bvh/BVHGroup.hxx
Normal file
@@ -0,0 +1,61 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHGroup_hxx
|
||||
#define BVHGroup_hxx
|
||||
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHVisitor.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHGroup : public BVHNode {
|
||||
public:
|
||||
BVHGroup();
|
||||
virtual ~BVHGroup();
|
||||
|
||||
virtual void accept(BVHVisitor& visitor);
|
||||
|
||||
void traverse(BVHVisitor& visitor)
|
||||
{
|
||||
ChildList::const_iterator i;
|
||||
for (i = _children.begin(); i != _children.end(); ++i)
|
||||
(*i)->accept(visitor);
|
||||
}
|
||||
|
||||
void clear();
|
||||
void addChild(BVHNode* child);
|
||||
void removeChild(BVHNode* child);
|
||||
|
||||
unsigned getNumChildren() const
|
||||
{ return _children.size(); }
|
||||
const BVHNode* getChild(unsigned i) const
|
||||
{ if (_children.size() <= i) return 0; return _children[i]; }
|
||||
BVHNode* getChild(unsigned i)
|
||||
{ if (_children.size() <= i) return 0; return _children[i]; }
|
||||
|
||||
virtual SGSphered computeBoundingSphere() const;
|
||||
|
||||
private:
|
||||
typedef std::vector<SGSharedPtr<BVHNode> > ChildList;
|
||||
ChildList _children;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
49
simgear/bvh/BVHLineGeometry.cxx
Normal file
49
simgear/bvh/BVHLineGeometry.cxx
Normal file
@@ -0,0 +1,49 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHLineGeometry.hxx"
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHLineGeometry::BVHLineGeometry(const SGLineSegmentf& lineSegment, Type type) :
|
||||
_lineSegment(lineSegment),
|
||||
_type(type)
|
||||
{
|
||||
}
|
||||
|
||||
BVHLineGeometry::~BVHLineGeometry()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BVHLineGeometry::accept(BVHVisitor& visitor)
|
||||
{
|
||||
visitor.apply(*this);
|
||||
}
|
||||
|
||||
SGSphered
|
||||
BVHLineGeometry::computeBoundingSphere() const
|
||||
{
|
||||
SGSphered sphere;
|
||||
sphere.expandBy(SGVec3d(_lineSegment.getStart()));
|
||||
sphere.expandBy(SGVec3d(_lineSegment.getEnd()));
|
||||
return sphere;
|
||||
}
|
||||
|
||||
}
|
||||
53
simgear/bvh/BVHLineGeometry.hxx
Normal file
53
simgear/bvh/BVHLineGeometry.hxx
Normal file
@@ -0,0 +1,53 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHLineGeometry_hxx
|
||||
#define BVHLineGeometry_hxx
|
||||
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
#include "BVHNode.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHLineGeometry : public BVHNode {
|
||||
public:
|
||||
enum Type {
|
||||
CarrierCatapult,
|
||||
CarrierWire
|
||||
};
|
||||
|
||||
BVHLineGeometry(const SGLineSegmentf& lineSegment, Type type);
|
||||
virtual ~BVHLineGeometry();
|
||||
|
||||
virtual void accept(BVHVisitor& visitor);
|
||||
|
||||
const SGLineSegmentf& getLineSegment() const
|
||||
{ return _lineSegment; }
|
||||
|
||||
Type getType() const
|
||||
{ return _type; }
|
||||
|
||||
virtual SGSphered computeBoundingSphere() const;
|
||||
|
||||
private:
|
||||
SGLineSegmentf _lineSegment;
|
||||
Type _type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
166
simgear/bvh/BVHLineSegmentVisitor.cxx
Normal file
166
simgear/bvh/BVHLineSegmentVisitor.cxx
Normal file
@@ -0,0 +1,166 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <simgear_config.h>
|
||||
#endif
|
||||
|
||||
#include "BVHLineSegmentVisitor.hxx"
|
||||
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHGroup.hxx"
|
||||
#include "BVHPageNode.hxx"
|
||||
#include "BVHTransform.hxx"
|
||||
#include "BVHMotionTransform.hxx"
|
||||
#include "BVHLineGeometry.hxx"
|
||||
#include "BVHStaticGeometry.hxx"
|
||||
|
||||
#include "BVHStaticData.hxx"
|
||||
|
||||
#include "BVHStaticNode.hxx"
|
||||
#include "BVHStaticTriangle.hxx"
|
||||
#include "BVHStaticBinary.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
void
|
||||
BVHLineSegmentVisitor::apply(BVHGroup& group)
|
||||
{
|
||||
if (!intersects(_lineSegment, group.getBoundingSphere()))
|
||||
return;
|
||||
group.traverse(*this);
|
||||
}
|
||||
|
||||
void
|
||||
BVHLineSegmentVisitor::apply(BVHPageNode& pageNode)
|
||||
{
|
||||
if (!intersects(_lineSegment, pageNode.getBoundingSphere()))
|
||||
return;
|
||||
pageNode.traverse(*this);
|
||||
}
|
||||
|
||||
void
|
||||
BVHLineSegmentVisitor::apply(BVHTransform& transform)
|
||||
{
|
||||
if (!intersects(_lineSegment, transform.getBoundingSphere()))
|
||||
return;
|
||||
|
||||
bool haveHit = _haveHit;
|
||||
_haveHit = false;
|
||||
|
||||
// Push the line segment
|
||||
SGLineSegmentd lineSegment = getLineSegment();
|
||||
_lineSegment = transform.lineSegmentToLocal(lineSegment);
|
||||
|
||||
transform.traverse(*this);
|
||||
|
||||
if (_haveHit) {
|
||||
_linearVelocity = transform.vecToWorld(_linearVelocity);
|
||||
_angularVelocity = transform.vecToWorld(_angularVelocity);
|
||||
SGVec3d point(transform.ptToWorld(_lineSegment.getEnd()));
|
||||
_lineSegment.set(lineSegment.getStart(), point);
|
||||
_normal = transform.vecToWorld(_normal);
|
||||
} else {
|
||||
_lineSegment = lineSegment;
|
||||
_haveHit = haveHit;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BVHLineSegmentVisitor::apply(BVHMotionTransform& transform)
|
||||
{
|
||||
if (!intersects(_lineSegment, transform.getBoundingSphere()))
|
||||
return;
|
||||
|
||||
bool haveHit = _haveHit;
|
||||
_haveHit = false;
|
||||
|
||||
// Push the line segment
|
||||
SGLineSegmentd lineSegment = getLineSegment();
|
||||
SGMatrixd toLocal = transform.getToLocalTransform(_time);
|
||||
_lineSegment = lineSegment.transform(toLocal);
|
||||
|
||||
transform.traverse(*this);
|
||||
|
||||
if (_haveHit) {
|
||||
SGMatrixd toWorld = transform.getToWorldTransform(_time);
|
||||
SGVec3d localStart = _lineSegment.getStart();
|
||||
_linearVelocity += transform.getLinearVelocityAt(localStart);
|
||||
_angularVelocity += transform.getAngularVelocity();
|
||||
_linearVelocity = toWorld.xformVec(_linearVelocity);
|
||||
_angularVelocity = toWorld.xformVec(_angularVelocity);
|
||||
SGVec3d localEnd = _lineSegment.getEnd();
|
||||
_lineSegment.set(lineSegment.getStart(), toWorld.xformPt(localEnd));
|
||||
_normal = toWorld.xformVec(_normal);
|
||||
if (!_id)
|
||||
_id = transform.getId();
|
||||
} else {
|
||||
_lineSegment = lineSegment;
|
||||
_haveHit = haveHit;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BVHLineSegmentVisitor::apply(BVHLineGeometry&)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BVHLineSegmentVisitor::apply(BVHStaticGeometry& node)
|
||||
{
|
||||
if (!intersects(_lineSegment, node.getBoundingSphere()))
|
||||
return;
|
||||
node.traverse(*this);
|
||||
}
|
||||
|
||||
void
|
||||
BVHLineSegmentVisitor::apply(const BVHStaticBinary& node,
|
||||
const BVHStaticData& data)
|
||||
{
|
||||
if (!intersects(SGLineSegmentf(_lineSegment), node.getBoundingBox()))
|
||||
return;
|
||||
|
||||
// The first box to enter is the one the startpoint is in.
|
||||
// this increases the probability, that on exit of that box we do not
|
||||
// even need to walk the other one, since the line segment is
|
||||
// then already short enough to not intersect the other one anymore.
|
||||
node.traverse(*this, data, _lineSegment.getStart());
|
||||
}
|
||||
|
||||
void
|
||||
BVHLineSegmentVisitor::apply(const BVHStaticTriangle& triangle,
|
||||
const BVHStaticData& data)
|
||||
{
|
||||
SGTrianglef tri = triangle.getTriangle(data);
|
||||
SGVec3f point;
|
||||
if (!intersects(point, tri, SGLineSegmentf(_lineSegment), 1e-4f))
|
||||
return;
|
||||
setLineSegmentEnd(SGVec3d(point));
|
||||
_normal = SGVec3d(tri.getNormal());
|
||||
_linearVelocity = SGVec3d::zeros();
|
||||
_angularVelocity = SGVec3d::zeros();
|
||||
_material = data.getMaterial(triangle.getMaterialIndex());
|
||||
_id = 0;
|
||||
_haveHit = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
100
simgear/bvh/BVHLineSegmentVisitor.hxx
Normal file
100
simgear/bvh/BVHLineSegmentVisitor.hxx
Normal file
@@ -0,0 +1,100 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHLineSegmentVisitor_hxx
|
||||
#define BVHLineSegmentVisitor_hxx
|
||||
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
#include "BVHNode.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHMaterial;
|
||||
|
||||
class BVHLineSegmentVisitor : public BVHVisitor {
|
||||
public:
|
||||
BVHLineSegmentVisitor(const SGLineSegmentd& lineSegment,
|
||||
const double& t = 0) :
|
||||
_lineSegment(lineSegment),
|
||||
_time(t),
|
||||
_material(0),
|
||||
_id(0),
|
||||
_haveHit(false)
|
||||
{ }
|
||||
virtual ~BVHLineSegmentVisitor()
|
||||
{ }
|
||||
|
||||
bool empty() const
|
||||
{ return !_haveHit; }
|
||||
|
||||
const SGLineSegmentd& getLineSegment() const
|
||||
{ return _lineSegment; }
|
||||
|
||||
SGVec3d getPoint() const
|
||||
{ return _lineSegment.getEnd(); }
|
||||
const SGVec3d& getNormal() const
|
||||
{ return _normal; }
|
||||
const SGVec3d& getLinearVelocity() const
|
||||
{ return _linearVelocity; }
|
||||
const SGVec3d& getAngularVelocity() const
|
||||
{ return _angularVelocity; }
|
||||
const BVHMaterial* getMaterial() const
|
||||
{ return _material; }
|
||||
BVHNode::Id getId() const
|
||||
{ return _id; }
|
||||
|
||||
virtual void apply(BVHGroup& group);
|
||||
virtual void apply(BVHPageNode& node);
|
||||
virtual void apply(BVHTransform& transform);
|
||||
virtual void apply(BVHMotionTransform& transform);
|
||||
virtual void apply(BVHLineGeometry&);
|
||||
virtual void apply(BVHStaticGeometry& node);
|
||||
|
||||
virtual void apply(const BVHStaticBinary&, const BVHStaticData&);
|
||||
virtual void apply(const BVHStaticTriangle&, const BVHStaticData&);
|
||||
|
||||
protected:
|
||||
void setLineSegmentEnd(const SGVec3d& end)
|
||||
{
|
||||
// Ok, you need to make sure that the new end is in the previous
|
||||
// direction and that the line segment is not enlarged by that call.
|
||||
#ifndef _NDEBUG
|
||||
// FIXME insert code to check this...
|
||||
#endif
|
||||
_lineSegment.set(_lineSegment.getStart(), end);
|
||||
}
|
||||
|
||||
private:
|
||||
SGLineSegmentd _lineSegment;
|
||||
double _time;
|
||||
|
||||
// belongs in a derived class
|
||||
SGVec3d _normal;
|
||||
SGVec3d _linearVelocity;
|
||||
SGVec3d _angularVelocity;
|
||||
const BVHMaterial* _material;
|
||||
BVHNode::Id _id;
|
||||
|
||||
bool _haveHit;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
35
simgear/bvh/BVHMaterial.cxx
Normal file
35
simgear/bvh/BVHMaterial.cxx
Normal file
@@ -0,0 +1,35 @@
|
||||
// Copyright (C) 2008 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHMaterial.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHMaterial::BVHMaterial() :
|
||||
_solid(true),
|
||||
_friction_factor(1),
|
||||
_rolling_friction(0.02),
|
||||
_bumpiness(0),
|
||||
_load_resistance(1e30)
|
||||
{
|
||||
}
|
||||
|
||||
BVHMaterial::~BVHMaterial()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
75
simgear/bvh/BVHMaterial.hxx
Normal file
75
simgear/bvh/BVHMaterial.hxx
Normal file
@@ -0,0 +1,75 @@
|
||||
// Copyright (C) 2008 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHMaterial_hxx
|
||||
#define BVHMaterial_hxx
|
||||
|
||||
#include <simgear/structure/SGReferenced.hxx>
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHMaterial : public SGReferenced {
|
||||
public:
|
||||
BVHMaterial();
|
||||
virtual ~BVHMaterial();
|
||||
|
||||
/**
|
||||
* Return if the surface material is solid, if it is not solid, a fluid
|
||||
* can be assumed, that is usually water.
|
||||
*/
|
||||
bool get_solid () const { return _solid; }
|
||||
|
||||
/**
|
||||
* Get the friction factor for that material
|
||||
*/
|
||||
double get_friction_factor () const { return _friction_factor; }
|
||||
|
||||
/**
|
||||
* Get the rolling friction for that material
|
||||
*/
|
||||
double get_rolling_friction () const { return _rolling_friction; }
|
||||
|
||||
/**
|
||||
* Get the bumpines for that material
|
||||
*/
|
||||
double get_bumpiness () const { return _bumpiness; }
|
||||
|
||||
/**
|
||||
* Get the load resistance
|
||||
*/
|
||||
double get_load_resistance () const { return _load_resistance; }
|
||||
|
||||
protected:
|
||||
// True if the material is solid, false if it is a fluid
|
||||
bool _solid;
|
||||
|
||||
// the friction factor of that surface material
|
||||
double _friction_factor;
|
||||
|
||||
// the rolling friction of that surface material
|
||||
double _rolling_friction;
|
||||
|
||||
// the bumpiness of that surface material
|
||||
double _bumpiness;
|
||||
|
||||
// the load resistance of that surface material
|
||||
double _load_resistance;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
120
simgear/bvh/BVHMotionTransform.cxx
Normal file
120
simgear/bvh/BVHMotionTransform.cxx
Normal file
@@ -0,0 +1,120 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <simgear_config.h>
|
||||
#endif
|
||||
|
||||
#include "BVHMotionTransform.hxx"
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHGroup.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHMotionTransform::BVHMotionTransform() :
|
||||
_toWorldReference(SGMatrixd::unit()),
|
||||
_toLocalReference(SGMatrixd::unit()),
|
||||
_toWorldAmplification(1),
|
||||
_toLocalAmplification(1),
|
||||
_linearVelocity(0, 0, 0),
|
||||
_angularVelocity(0, 0, 0),
|
||||
_referenceTime(0),
|
||||
_startTime(0),
|
||||
_endTime(0),
|
||||
_id(0)
|
||||
{
|
||||
}
|
||||
|
||||
BVHMotionTransform::~BVHMotionTransform()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BVHMotionTransform::accept(BVHVisitor& visitor)
|
||||
{
|
||||
visitor.apply(*this);
|
||||
}
|
||||
|
||||
void
|
||||
BVHMotionTransform::setTransform(const BVHMotionTransform& transform)
|
||||
{
|
||||
_toWorldReference = transform._toWorldReference;
|
||||
_toLocalReference = transform._toLocalReference;
|
||||
_toWorldAmplification = transform._toWorldAmplification;
|
||||
_toLocalAmplification = transform._toLocalAmplification;
|
||||
_linearVelocity = transform._linearVelocity;
|
||||
_angularVelocity = transform._angularVelocity;
|
||||
_referenceTime = transform._referenceTime;
|
||||
_startTime = transform._startTime;
|
||||
_endTime = transform._endTime;
|
||||
_id = transform._id;
|
||||
invalidateParentBound();
|
||||
}
|
||||
|
||||
void
|
||||
BVHMotionTransform::setToWorldTransform(const SGMatrixd& transform)
|
||||
{
|
||||
_toWorldReference = transform;
|
||||
invert(_toLocalReference, transform);
|
||||
updateAmplificationFactors();
|
||||
invalidateParentBound();
|
||||
}
|
||||
|
||||
void
|
||||
BVHMotionTransform::setToLocalTransform(const SGMatrixd& transform)
|
||||
{
|
||||
_toLocalReference = transform;
|
||||
invert(_toWorldReference, transform);
|
||||
updateAmplificationFactors();
|
||||
invalidateParentBound();
|
||||
}
|
||||
|
||||
SGSphered
|
||||
BVHMotionTransform::computeBoundingSphere() const
|
||||
{
|
||||
SGSphered sphere(BVHGroup::computeBoundingSphere());
|
||||
if (sphere.empty())
|
||||
return sphere;
|
||||
SGMatrixd toWorldStart = getToWorldTransform(_startTime);
|
||||
SGVec3d centerStart = toWorldStart.xformPt(sphere.getCenter());
|
||||
SGMatrixd toWorldEnd = getToWorldTransform(_endTime);
|
||||
SGVec3d centerEnd = toWorldEnd.xformPt(sphere.getCenter());
|
||||
double rad = 0.5*length(centerStart - centerEnd) + sphere.getRadius();
|
||||
rad *= _toWorldAmplification;
|
||||
return SGSphered(0.5*(centerStart + centerEnd), rad);
|
||||
}
|
||||
|
||||
void
|
||||
BVHMotionTransform::updateAmplificationFactors()
|
||||
{
|
||||
// Hmm, this is just a hint, true?
|
||||
// But anyway, almost all transforms in a scenegraph will
|
||||
// have them equal to 1 ...
|
||||
double r = norm(_toWorldReference.xformVec(SGVec3d(1, 0, 0)));
|
||||
r = SGMiscd::max(r, norm(_toWorldReference.xformVec(SGVec3d(0, 1, 0))));
|
||||
r = SGMiscd::max(r, norm(_toWorldReference.xformVec(SGVec3d(0, 0, 1))));
|
||||
_toWorldAmplification = r;
|
||||
|
||||
r = norm(_toLocalReference.xformVec(SGVec3d(1, 0, 0)));
|
||||
r = SGMiscd::max(r, norm(_toLocalReference.xformVec(SGVec3d(0, 1, 0))));
|
||||
r = SGMiscd::max(r, norm(_toLocalReference.xformVec(SGVec3d(0, 0, 1))));
|
||||
_toLocalAmplification = r;
|
||||
}
|
||||
|
||||
}
|
||||
126
simgear/bvh/BVHMotionTransform.hxx
Normal file
126
simgear/bvh/BVHMotionTransform.hxx
Normal file
@@ -0,0 +1,126 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHMotionTransform_hxx
|
||||
#define BVHMotionTransform_hxx
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHGroup.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHMotionTransform : public BVHGroup {
|
||||
public:
|
||||
BVHMotionTransform();
|
||||
virtual ~BVHMotionTransform();
|
||||
|
||||
virtual void accept(BVHVisitor& visitor);
|
||||
|
||||
void setTransform(const BVHMotionTransform& transform);
|
||||
void setToWorldTransform(const SGMatrixd& transform);
|
||||
void setToLocalTransform(const SGMatrixd& transform);
|
||||
|
||||
void setLinearVelocity(const SGVec3d& linearVelocity)
|
||||
{ _linearVelocity = linearVelocity; }
|
||||
const SGVec3d& getLinearVelocity() const
|
||||
{ return _linearVelocity; }
|
||||
|
||||
void setAngularVelocity(const SGVec3d& angularVelocity)
|
||||
{ _angularVelocity = angularVelocity; }
|
||||
const SGVec3d& getAngularVelocity() const
|
||||
{ return _angularVelocity; }
|
||||
|
||||
void setReferenceTime(const double& referenceTime)
|
||||
{ _referenceTime = referenceTime; }
|
||||
const double& getReferenceTime() const
|
||||
{ return _referenceTime; }
|
||||
|
||||
void setStartTime(const double& startTime)
|
||||
{ _startTime = startTime; }
|
||||
const double& getStartTime() const
|
||||
{ return _startTime; }
|
||||
|
||||
void setEndTime(const double& endTime)
|
||||
{ _endTime = endTime; }
|
||||
const double& getEndTime() const
|
||||
{ return _endTime; }
|
||||
|
||||
SGMatrixd getToWorldTransform(const double& t) const
|
||||
{
|
||||
if (t == _referenceTime)
|
||||
return _toWorldReference;
|
||||
double dt = t - _referenceTime;
|
||||
SGMatrixd matrix(_toWorldReference);
|
||||
matrix.postMultRotate(SGQuatd::fromAngleAxis(dt*_angularVelocity));
|
||||
matrix.postMultTranslate(dt*_linearVelocity);
|
||||
return matrix;
|
||||
}
|
||||
SGMatrixd getToLocalTransform(const double& t) const
|
||||
{
|
||||
if (t == _referenceTime)
|
||||
return _toLocalReference;
|
||||
double dt = _referenceTime - t;
|
||||
SGMatrixd matrix(_toLocalReference);
|
||||
matrix.preMultRotate(SGQuatd::fromAngleAxis(dt*_angularVelocity));
|
||||
matrix.preMultTranslate(dt*_linearVelocity);
|
||||
return matrix;
|
||||
}
|
||||
|
||||
const SGMatrixd& getToWorldReferenceTransform() const
|
||||
{ return _toWorldReference; }
|
||||
const SGMatrixd& getToLocalReferenceTransform() const
|
||||
{ return _toLocalReference; }
|
||||
|
||||
SGVec3d getLinearVelocityAt(const SGVec3d& reference) const
|
||||
{ return _linearVelocity + cross(_angularVelocity, reference); }
|
||||
|
||||
SGSphered sphereToLocal(const SGSphered& sphere, const double& t) const
|
||||
{
|
||||
SGMatrixd matrix = getToLocalTransform(t);
|
||||
SGVec3d center = matrix.xformPt(sphere.getCenter());
|
||||
double radius = _toLocalAmplification*sphere.getRadius();
|
||||
return SGSphered(center, radius);
|
||||
}
|
||||
|
||||
void setId(Id id)
|
||||
{ _id = id; }
|
||||
Id getId() const
|
||||
{ return _id; }
|
||||
|
||||
private:
|
||||
virtual SGSphered computeBoundingSphere() const;
|
||||
void updateAmplificationFactors();
|
||||
|
||||
SGMatrixd _toWorldReference;
|
||||
SGMatrixd _toLocalReference;
|
||||
double _toWorldAmplification;
|
||||
double _toLocalAmplification;
|
||||
|
||||
SGVec3d _linearVelocity;
|
||||
SGVec3d _angularVelocity;
|
||||
|
||||
double _referenceTime;
|
||||
double _startTime;
|
||||
double _endTime;
|
||||
|
||||
Id _id;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
173
simgear/bvh/BVHNearestPointVisitor.hxx
Normal file
173
simgear/bvh/BVHNearestPointVisitor.hxx
Normal file
@@ -0,0 +1,173 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHNearestPointVisitor_hxx
|
||||
#define BVHNearestPointVisitor_hxx
|
||||
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHGroup.hxx"
|
||||
#include "BVHPageNode.hxx"
|
||||
#include "BVHTransform.hxx"
|
||||
#include "BVHLineGeometry.hxx"
|
||||
#include "BVHStaticGeometry.hxx"
|
||||
|
||||
#include "BVHStaticData.hxx"
|
||||
|
||||
#include "BVHStaticNode.hxx"
|
||||
#include "BVHStaticTriangle.hxx"
|
||||
#include "BVHStaticBinary.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHNearestPointVisitor : public BVHVisitor {
|
||||
public:
|
||||
BVHNearestPointVisitor(const SGSphered& sphere, const double& t) :
|
||||
_sphere(sphere),
|
||||
_time(t),
|
||||
_material(0),
|
||||
_id(0),
|
||||
_havePoint(false)
|
||||
{ }
|
||||
|
||||
virtual void apply(BVHGroup& leaf)
|
||||
{
|
||||
if (!intersects(_sphere, leaf.getBoundingSphere()))
|
||||
return;
|
||||
leaf.traverse(*this);
|
||||
}
|
||||
virtual void apply(BVHPageNode& leaf)
|
||||
{
|
||||
if (!intersects(_sphere, leaf.getBoundingSphere()))
|
||||
return;
|
||||
leaf.traverse(*this);
|
||||
}
|
||||
virtual void apply(BVHTransform& transform)
|
||||
{
|
||||
if (!intersects(_sphere, transform.getBoundingSphere()))
|
||||
return;
|
||||
|
||||
SGSphered sphere = _sphere;
|
||||
_sphere = transform.sphereToLocal(sphere);
|
||||
bool havePoint = _havePoint;
|
||||
_havePoint = false;
|
||||
|
||||
transform.traverse(*this);
|
||||
|
||||
if (_havePoint) {
|
||||
_point = transform.ptToWorld(_point);
|
||||
_linearVelocity = transform.vecToWorld(_linearVelocity);
|
||||
_angularVelocity = transform.vecToWorld(_angularVelocity);
|
||||
}
|
||||
_havePoint |= havePoint;
|
||||
_sphere.setCenter(sphere.getCenter());
|
||||
}
|
||||
virtual void apply(BVHMotionTransform& transform)
|
||||
{
|
||||
if (!intersects(_sphere, transform.getBoundingSphere()))
|
||||
return;
|
||||
|
||||
SGSphered sphere = _sphere;
|
||||
_sphere = transform.sphereToLocal(sphere, _time);
|
||||
bool havePoint = _havePoint;
|
||||
_havePoint = false;
|
||||
|
||||
transform.traverse(*this);
|
||||
|
||||
if (_havePoint) {
|
||||
SGMatrixd toWorld = transform.getToWorldTransform(_time);
|
||||
SGVec3d localCenter = _sphere.getCenter();
|
||||
_linearVelocity += transform.getLinearVelocityAt(localCenter);
|
||||
_angularVelocity += transform.getAngularVelocity();
|
||||
_linearVelocity = toWorld.xformVec(_linearVelocity);
|
||||
_angularVelocity = toWorld.xformVec(_angularVelocity);
|
||||
_point = toWorld.xformPt(_point);
|
||||
if (!_id)
|
||||
_id = transform.getId();
|
||||
}
|
||||
_havePoint |= havePoint;
|
||||
_sphere.setCenter(sphere.getCenter());
|
||||
}
|
||||
virtual void apply(BVHLineGeometry& node)
|
||||
{ }
|
||||
virtual void apply(BVHStaticGeometry& node)
|
||||
{
|
||||
if (!intersects(_sphere, node.getBoundingSphere()))
|
||||
return;
|
||||
node.traverse(*this);
|
||||
}
|
||||
|
||||
virtual void apply(const BVHStaticBinary& node, const BVHStaticData& data)
|
||||
{
|
||||
if (!intersects(_sphere, node.getBoundingBox()))
|
||||
return;
|
||||
node.traverse(*this, data, _sphere.getCenter());
|
||||
}
|
||||
virtual void apply(const BVHStaticTriangle& node, const BVHStaticData& data)
|
||||
{
|
||||
SGVec3f center(_sphere.getCenter());
|
||||
SGVec3d closest(closestPoint(node.getTriangle(data), center));
|
||||
if (!intersects(_sphere, closest))
|
||||
return;
|
||||
_point = closest;
|
||||
_linearVelocity = SGVec3d::zeros();
|
||||
_angularVelocity = SGVec3d::zeros();
|
||||
_material = data.getMaterial(node.getMaterialIndex());
|
||||
// The trick is to decrease the radius of the search sphere.
|
||||
_sphere.setRadius(length(closest - _sphere.getCenter()));
|
||||
_havePoint = true;
|
||||
_id = 0;
|
||||
}
|
||||
|
||||
void setSphere(const SGSphered& sphere)
|
||||
{ _sphere = sphere; }
|
||||
const SGSphered& getSphere() const
|
||||
{ return _sphere; }
|
||||
|
||||
const SGVec3d& getPoint() const
|
||||
{ return _point; }
|
||||
const SGVec3d& getLinearVelocity() const
|
||||
{ return _linearVelocity; }
|
||||
const SGVec3d& getAngularVelocity() const
|
||||
{ return _angularVelocity; }
|
||||
const BVHMaterial* getMaterial() const
|
||||
{ return _material; }
|
||||
BVHNode::Id getId() const
|
||||
{ return _id; }
|
||||
|
||||
bool empty() const
|
||||
{ return !_havePoint; }
|
||||
|
||||
private:
|
||||
SGSphered _sphere;
|
||||
double _time;
|
||||
|
||||
SGVec3d _point;
|
||||
SGVec3d _linearVelocity;
|
||||
SGVec3d _angularVelocity;
|
||||
const BVHMaterial* _material;
|
||||
BVHNode::Id _id;
|
||||
|
||||
bool _havePoint;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
80
simgear/bvh/BVHNode.cxx
Normal file
80
simgear/bvh/BVHNode.cxx
Normal file
@@ -0,0 +1,80 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHNode.hxx"
|
||||
|
||||
#include <algorithm>
|
||||
#include <simgear/structure/SGAtomic.hxx>
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHNode::BVHNode() :
|
||||
_dirtyBoundingSphere(true)
|
||||
{
|
||||
}
|
||||
|
||||
BVHNode::~BVHNode()
|
||||
{
|
||||
}
|
||||
|
||||
BVHNode::Id
|
||||
BVHNode::getNewId()
|
||||
{
|
||||
static SGAtomic id(0);
|
||||
return ++id;
|
||||
}
|
||||
|
||||
void
|
||||
BVHNode::addParent(BVHNode* parent)
|
||||
{
|
||||
// should not happen, but be paranoid ...
|
||||
ParentList::iterator i;
|
||||
i = std::find(_parents.begin(), _parents.end(), parent);
|
||||
if (i != _parents.end())
|
||||
return;
|
||||
// add to the parents list ...
|
||||
_parents.push_back(parent);
|
||||
}
|
||||
|
||||
void
|
||||
BVHNode::removeParent(BVHNode* parent)
|
||||
{
|
||||
ParentList::iterator i;
|
||||
i = std::find(_parents.begin(), _parents.end(), parent);
|
||||
if (i == _parents.end())
|
||||
return;
|
||||
_parents.erase(i);
|
||||
}
|
||||
|
||||
void
|
||||
BVHNode::invalidateParentBound()
|
||||
{
|
||||
for (ParentList::iterator i = _parents.begin(); i != _parents.end(); ++i)
|
||||
(*i)->invalidateBound();
|
||||
}
|
||||
|
||||
void
|
||||
BVHNode::invalidateBound()
|
||||
{
|
||||
if (_dirtyBoundingSphere)
|
||||
return;
|
||||
invalidateParentBound();
|
||||
_dirtyBoundingSphere = true;
|
||||
}
|
||||
|
||||
}
|
||||
76
simgear/bvh/BVHNode.hxx
Normal file
76
simgear/bvh/BVHNode.hxx
Normal file
@@ -0,0 +1,76 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHNode_hxx
|
||||
#define BVHNode_hxx
|
||||
|
||||
#include <vector>
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
#include <simgear/structure/SGReferenced.hxx>
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHGroup;
|
||||
class BVHVisitor;
|
||||
class BVHPageNode;
|
||||
|
||||
// Base for the tree nodes
|
||||
class BVHNode : public SGReferenced {
|
||||
public:
|
||||
BVHNode();
|
||||
virtual ~BVHNode();
|
||||
|
||||
// visitors ...
|
||||
virtual void accept(BVHVisitor& visitor) = 0;
|
||||
|
||||
const SGSphered& getBoundingSphere() const
|
||||
{
|
||||
if (_dirtyBoundingSphere) {
|
||||
_boundingSphere = computeBoundingSphere();
|
||||
_dirtyBoundingSphere = false;
|
||||
}
|
||||
return _boundingSphere;
|
||||
}
|
||||
virtual SGSphered computeBoundingSphere() const = 0;
|
||||
|
||||
/// A unique id for some kind of BVHNodes.
|
||||
/// Currently only motions transforms.
|
||||
typedef unsigned Id;
|
||||
|
||||
// Factory to get a new id
|
||||
static Id getNewId();
|
||||
|
||||
protected:
|
||||
friend class BVHGroup;
|
||||
friend class BVHPageNode;
|
||||
void addParent(BVHNode* parent);
|
||||
void removeParent(BVHNode* parent);
|
||||
|
||||
void invalidateParentBound();
|
||||
virtual void invalidateBound();
|
||||
|
||||
private:
|
||||
mutable bool _dirtyBoundingSphere;
|
||||
mutable SGSphered _boundingSphere;
|
||||
|
||||
typedef std::vector<BVHNode*> ParentList;
|
||||
ParentList _parents;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
40
simgear/bvh/BVHPageNode.cxx
Normal file
40
simgear/bvh/BVHPageNode.cxx
Normal file
@@ -0,0 +1,40 @@
|
||||
// Copyright (C) 2008 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHPageNode.hxx"
|
||||
|
||||
#include "BVHPager.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHPageNode::BVHPageNode() :
|
||||
_useStamp(0),
|
||||
_requested(false)
|
||||
{
|
||||
}
|
||||
|
||||
BVHPageNode::~BVHPageNode()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BVHPageNode::accept(BVHVisitor& visitor)
|
||||
{
|
||||
visitor.apply(*this);
|
||||
}
|
||||
|
||||
}
|
||||
66
simgear/bvh/BVHPageNode.hxx
Normal file
66
simgear/bvh/BVHPageNode.hxx
Normal file
@@ -0,0 +1,66 @@
|
||||
// Copyright (C) 2008 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHPageNode_hxx
|
||||
#define BVHPageNode_hxx
|
||||
|
||||
#include <list>
|
||||
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
|
||||
#include "BVHGroup.hxx"
|
||||
#include "BVHVisitor.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHPager;
|
||||
class BVHPageRequest;
|
||||
|
||||
class BVHPageNode : public BVHGroup {
|
||||
public:
|
||||
BVHPageNode();
|
||||
virtual ~BVHPageNode();
|
||||
|
||||
virtual void accept(BVHVisitor& visitor);
|
||||
|
||||
/// Return the usage stamp of the last access
|
||||
unsigned getUseStamp() const
|
||||
{ return _useStamp; }
|
||||
|
||||
virtual SGSphered computeBoundingSphere() const = 0;
|
||||
|
||||
virtual BVHPageRequest* newRequest() = 0;
|
||||
|
||||
protected:
|
||||
virtual void invalidateBound() = 0;
|
||||
|
||||
bool getRequested() const
|
||||
{ return _requested; }
|
||||
void setRequested(bool requested)
|
||||
{ _requested = requested; }
|
||||
|
||||
private:
|
||||
friend class BVHPager;
|
||||
|
||||
std::list<SGSharedPtr<BVHPageNode> >::iterator _iterator;
|
||||
unsigned _useStamp;
|
||||
bool _requested;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
26
simgear/bvh/BVHPageRequest.cxx
Normal file
26
simgear/bvh/BVHPageRequest.cxx
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright (C) 2008 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHPageRequest.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHPageRequest::~BVHPageRequest()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
42
simgear/bvh/BVHPageRequest.hxx
Normal file
42
simgear/bvh/BVHPageRequest.hxx
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (C) 2008 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHPageRequest_hxx
|
||||
#define BVHPageRequest_hxx
|
||||
|
||||
#include <simgear/structure/SGReferenced.hxx>
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHPageNode;
|
||||
|
||||
class BVHPageRequest : public SGReferenced {
|
||||
public:
|
||||
virtual ~BVHPageRequest();
|
||||
|
||||
/// Happens in the pager thread, do not modify the calling bvh tree
|
||||
virtual void load() = 0;
|
||||
/// Happens in the bvh main thread where the bvh is actually used.
|
||||
/// So inside here it is safe to modify the paged node
|
||||
virtual void insert() = 0;
|
||||
/// The page node this request is for
|
||||
virtual BVHPageNode* getPageNode() = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
236
simgear/bvh/BVHPager.cxx
Normal file
236
simgear/bvh/BVHPager.cxx
Normal file
@@ -0,0 +1,236 @@
|
||||
// Copyright (C) 2008 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHPager.hxx"
|
||||
|
||||
#include <list>
|
||||
|
||||
#include <simgear/threads/SGThread.hxx>
|
||||
#include <simgear/threads/SGGuard.hxx>
|
||||
|
||||
#include "BVHPageNode.hxx"
|
||||
#include "BVHPageRequest.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
struct BVHPager::_PrivateData : protected SGThread {
|
||||
typedef SGSharedPtr<BVHPageRequest> _Request;
|
||||
typedef std::list<_Request> _RequestList;
|
||||
typedef std::list<SGSharedPtr<BVHPageNode> > _PageNodeList;
|
||||
|
||||
struct _LockedQueue {
|
||||
void _push(const _Request& request)
|
||||
{
|
||||
SGGuard<SGMutex> scopeLock(_mutex);
|
||||
_requestList.push_back(request);
|
||||
}
|
||||
_Request _pop()
|
||||
{
|
||||
SGGuard<SGMutex> scopeLock(_mutex);
|
||||
if (_requestList.empty())
|
||||
return _Request();
|
||||
_Request request;
|
||||
request.swap(_requestList.front());
|
||||
_requestList.pop_front();
|
||||
return request;
|
||||
}
|
||||
private:
|
||||
SGMutex _mutex;
|
||||
_RequestList _requestList;
|
||||
};
|
||||
|
||||
struct _WorkQueue {
|
||||
void _stop()
|
||||
{
|
||||
_push(_Request());
|
||||
}
|
||||
void _push(const _Request& request)
|
||||
{
|
||||
SGGuard<SGMutex> scopeLock(_mutex);
|
||||
bool needSignal = _requestList.empty();
|
||||
_requestList.push_back(request);
|
||||
if (needSignal)
|
||||
_waitCondition.signal();
|
||||
}
|
||||
_Request _pop()
|
||||
{
|
||||
SGGuard<SGMutex> scopeLock(_mutex);
|
||||
while (_requestList.empty())
|
||||
_waitCondition.wait(_mutex);
|
||||
_Request request;
|
||||
request.swap(_requestList.front());
|
||||
_requestList.pop_front();
|
||||
return request;
|
||||
}
|
||||
private:
|
||||
SGMutex _mutex;
|
||||
SGWaitCondition _waitCondition;
|
||||
_RequestList _requestList;
|
||||
};
|
||||
|
||||
_PrivateData() :
|
||||
_started(false),
|
||||
_useStamp(0)
|
||||
{
|
||||
}
|
||||
virtual ~_PrivateData()
|
||||
{
|
||||
_stop();
|
||||
}
|
||||
|
||||
virtual void run()
|
||||
{
|
||||
for (;;) {
|
||||
_Request request = _pendingRequests._pop();
|
||||
// This means stop working
|
||||
if (!request.valid())
|
||||
return;
|
||||
request->load();
|
||||
_processedRequests._push(request);
|
||||
}
|
||||
}
|
||||
|
||||
bool _start()
|
||||
{
|
||||
if (_started)
|
||||
return true;
|
||||
if (!start())
|
||||
return false;
|
||||
_started = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void _stop()
|
||||
{
|
||||
if (!_started)
|
||||
return;
|
||||
// send a stop request ...
|
||||
_pendingRequests._stop();
|
||||
// ... and wait for the thread to finish
|
||||
join();
|
||||
_started = false;
|
||||
}
|
||||
|
||||
void _use(BVHPageNode& pageNode)
|
||||
{
|
||||
if (pageNode._requested) {
|
||||
// move it forward in the lru list
|
||||
_pageNodeList.splice(_pageNodeList.end(), _pageNodeList,
|
||||
pageNode._iterator);
|
||||
} else {
|
||||
_Request request = pageNode.newRequest();
|
||||
if (!request.valid())
|
||||
return;
|
||||
|
||||
pageNode._iterator = _pageNodeList.insert(_pageNodeList.end(),
|
||||
&pageNode);
|
||||
pageNode._requested = true;
|
||||
|
||||
if (_started) {
|
||||
_pendingRequests._push(request);
|
||||
} else {
|
||||
request->load();
|
||||
request->insert();
|
||||
}
|
||||
}
|
||||
pageNode._useStamp = _useStamp;
|
||||
}
|
||||
|
||||
void _update(unsigned expiry)
|
||||
{
|
||||
// Insert all processed requests
|
||||
for (;;) {
|
||||
SGSharedPtr<BVHPageRequest> request;
|
||||
request = _processedRequests._pop();
|
||||
if (!request.valid())
|
||||
break;
|
||||
request->insert();
|
||||
}
|
||||
|
||||
// ... and throw away stuff that is not used for a long time
|
||||
unsigned useStamp = _useStamp - expiry;
|
||||
_PageNodeList::iterator i = _pageNodeList.begin();
|
||||
while (i != _pageNodeList.end()) {
|
||||
// Ok, this means if the highest bit in the below difference
|
||||
// is set which is aequivalent to having a negative difference
|
||||
// but being wraparound save.
|
||||
unsigned diff = (*i)->_useStamp - useStamp;
|
||||
// test the sign bit of the difference
|
||||
if (!(diff & (~((~0u) >> 1))))
|
||||
break;
|
||||
(*i)->clear();
|
||||
(*i)->_requested = false;
|
||||
i = _pageNodeList.erase(i);
|
||||
}
|
||||
}
|
||||
|
||||
bool _started;
|
||||
unsigned _useStamp;
|
||||
_WorkQueue _pendingRequests;
|
||||
_LockedQueue _processedRequests;
|
||||
// Store the rcu list of loaded nodes so that they can expire
|
||||
_PageNodeList _pageNodeList;
|
||||
};
|
||||
|
||||
BVHPager::BVHPager() :
|
||||
_privateData(new _PrivateData)
|
||||
{
|
||||
}
|
||||
|
||||
BVHPager::~BVHPager()
|
||||
{
|
||||
delete _privateData;
|
||||
_privateData = 0;
|
||||
}
|
||||
|
||||
bool
|
||||
BVHPager::start()
|
||||
{
|
||||
return _privateData->_start();
|
||||
}
|
||||
|
||||
void
|
||||
BVHPager::stop()
|
||||
{
|
||||
_privateData->_stop();
|
||||
}
|
||||
|
||||
void
|
||||
BVHPager::use(BVHPageNode& pageNode)
|
||||
{
|
||||
_privateData->_use(pageNode);
|
||||
}
|
||||
|
||||
void
|
||||
BVHPager::update(unsigned expiry)
|
||||
{
|
||||
_privateData->_update(expiry);
|
||||
}
|
||||
|
||||
void
|
||||
BVHPager::setUseStamp(unsigned stamp)
|
||||
{
|
||||
_privateData->_useStamp = stamp;
|
||||
}
|
||||
|
||||
unsigned
|
||||
BVHPager::getUseStamp() const
|
||||
{
|
||||
return _privateData->_useStamp;
|
||||
}
|
||||
|
||||
}
|
||||
60
simgear/bvh/BVHPager.hxx
Normal file
60
simgear/bvh/BVHPager.hxx
Normal file
@@ -0,0 +1,60 @@
|
||||
// Copyright (C) 2008 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHPager_hxx
|
||||
#define BVHPager_hxx
|
||||
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHPageNode;
|
||||
class BVHPageRequest;
|
||||
|
||||
class BVHPager {
|
||||
public:
|
||||
BVHPager();
|
||||
~BVHPager();
|
||||
|
||||
/// Starts the pager thread
|
||||
bool start();
|
||||
|
||||
/// Stops the pager thread
|
||||
void stop();
|
||||
|
||||
/// Use this page node, if loaded make it as used, if not loaded schedule
|
||||
void use(BVHPageNode& pageNode);
|
||||
|
||||
/// Call this from the main thread to incorporate the processed page
|
||||
/// requests into the bounding volume tree
|
||||
void update(unsigned expiry);
|
||||
|
||||
/// The usage stamp to mark usage of BVHPageNodes
|
||||
void setUseStamp(unsigned stamp);
|
||||
unsigned getUseStamp() const;
|
||||
|
||||
private:
|
||||
BVHPager(const BVHPager&);
|
||||
BVHPager& operator=(const BVHPager&);
|
||||
|
||||
struct _PrivateData;
|
||||
_PrivateData* _privateData;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
45
simgear/bvh/BVHStaticBinary.cxx
Normal file
45
simgear/bvh/BVHStaticBinary.cxx
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHStaticBinary.hxx"
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHStaticBinary::BVHStaticBinary(unsigned splitAxis,
|
||||
const BVHStaticNode* leftChild,
|
||||
const BVHStaticNode* rightChild,
|
||||
const SGBoxf& boundingBox) :
|
||||
_splitAxis(splitAxis),
|
||||
_leftChild(leftChild),
|
||||
_rightChild(rightChild),
|
||||
_boundingBox(boundingBox)
|
||||
{
|
||||
}
|
||||
|
||||
BVHStaticBinary::~BVHStaticBinary()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BVHStaticBinary::accept(BVHVisitor& visitor, const BVHStaticData& data) const
|
||||
{
|
||||
visitor.apply(*this, data);
|
||||
}
|
||||
|
||||
}
|
||||
78
simgear/bvh/BVHStaticBinary.hxx
Normal file
78
simgear/bvh/BVHStaticBinary.hxx
Normal file
@@ -0,0 +1,78 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHStaticBinary_hxx
|
||||
#define BVHStaticBinary_hxx
|
||||
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
#include "BVHStaticNode.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHStaticBinary : public BVHStaticNode {
|
||||
public:
|
||||
BVHStaticBinary(unsigned splitAxis, const BVHStaticNode* leftChild,
|
||||
const BVHStaticNode* rightChild, const SGBoxf& box);
|
||||
virtual ~BVHStaticBinary();
|
||||
virtual void accept(BVHVisitor& visitor, const BVHStaticData& data) const;
|
||||
|
||||
void traverse(BVHVisitor& visitor, const BVHStaticData& data) const
|
||||
{
|
||||
_leftChild->accept(visitor, data);
|
||||
_rightChild->accept(visitor, data);
|
||||
}
|
||||
|
||||
// Traverse call that first enters the child node that is potentially closer
|
||||
// to the given point than the other.
|
||||
template<typename T>
|
||||
void traverse(BVHVisitor& visitor, const BVHStaticData& data,
|
||||
const SGVec3<T>& pt) const
|
||||
{
|
||||
float center = 0.5f*(_boundingBox.getMin()[_splitAxis]
|
||||
+ _boundingBox.getMax()[_splitAxis]);
|
||||
if (pt[_splitAxis] < center) {
|
||||
_leftChild->accept(visitor, data);
|
||||
_rightChild->accept(visitor, data);
|
||||
} else {
|
||||
_rightChild->accept(visitor, data);
|
||||
_leftChild->accept(visitor, data);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned getSplitAxis() const
|
||||
{ return _splitAxis; }
|
||||
|
||||
const BVHStaticNode* getLeftChild() const
|
||||
{ return _leftChild; }
|
||||
const BVHStaticNode* getRightChild() const
|
||||
{ return _rightChild; }
|
||||
|
||||
const SGBoxf& getBoundingBox() const
|
||||
{ return _boundingBox; }
|
||||
|
||||
private:
|
||||
// Note the order of the members, this is to avoid padding
|
||||
unsigned _splitAxis;
|
||||
SGSharedPtr<const BVHStaticNode> _leftChild;
|
||||
SGSharedPtr<const BVHStaticNode> _rightChild;
|
||||
SGBoxf _boundingBox;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
57
simgear/bvh/BVHStaticData.hxx
Normal file
57
simgear/bvh/BVHStaticData.hxx
Normal file
@@ -0,0 +1,57 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHStaticData_hxx
|
||||
#define BVHStaticData_hxx
|
||||
|
||||
#include <vector>
|
||||
#include <simgear/structure/SGReferenced.hxx>
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
#include "BVHMaterial.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHStaticData : public SGReferenced {
|
||||
public:
|
||||
virtual ~BVHStaticData() {}
|
||||
|
||||
unsigned addVertex(const SGVec3f& vertex)
|
||||
{ _vertices.push_back(vertex); return _vertices.size() - 1; }
|
||||
const SGVec3f& getVertex(unsigned i) const
|
||||
{ return _vertices[i]; }
|
||||
|
||||
|
||||
unsigned addMaterial(const BVHMaterial* material)
|
||||
{ _materials.push_back(material); return _materials.size() - 1; }
|
||||
const BVHMaterial* getMaterial(unsigned i) const
|
||||
{ if (_materials.size() <= i) return 0; return _materials[i]; }
|
||||
|
||||
void trim()
|
||||
{
|
||||
std::vector<SGVec3f>(_vertices).swap(_vertices);
|
||||
std::vector<SGSharedPtr<const BVHMaterial> >(_materials).swap(_materials);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<SGVec3f> _vertices;
|
||||
std::vector<SGSharedPtr<const BVHMaterial> > _materials;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
51
simgear/bvh/BVHStaticGeometry.cxx
Normal file
51
simgear/bvh/BVHStaticGeometry.cxx
Normal file
@@ -0,0 +1,51 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHStaticGeometry.hxx"
|
||||
|
||||
#include "BVHBoundingBoxVisitor.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHStaticGeometry::BVHStaticGeometry(const BVHStaticNode* staticNode,
|
||||
const BVHStaticData* staticData) :
|
||||
_staticNode(staticNode),
|
||||
_staticData(staticData)
|
||||
{
|
||||
}
|
||||
|
||||
BVHStaticGeometry::~BVHStaticGeometry()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BVHStaticGeometry::accept(BVHVisitor& visitor)
|
||||
{
|
||||
visitor.apply(*this);
|
||||
}
|
||||
|
||||
SGSphered
|
||||
BVHStaticGeometry::computeBoundingSphere() const
|
||||
{
|
||||
BVHBoundingBoxVisitor bbv;
|
||||
_staticNode->accept(bbv, *_staticData);
|
||||
SGSphered sphere;
|
||||
sphere.expandBy(SGBoxd(bbv.getBox()));
|
||||
return sphere;
|
||||
}
|
||||
|
||||
}
|
||||
56
simgear/bvh/BVHStaticGeometry.hxx
Normal file
56
simgear/bvh/BVHStaticGeometry.hxx
Normal file
@@ -0,0 +1,56 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHStaticGeometry_hxx
|
||||
#define BVHStaticGeometry_hxx
|
||||
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHStaticData.hxx"
|
||||
#include "BVHStaticNode.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHStaticGeometry : public BVHNode {
|
||||
public:
|
||||
BVHStaticGeometry(const BVHStaticNode* staticNode,
|
||||
const BVHStaticData* staticData);
|
||||
virtual ~BVHStaticGeometry();
|
||||
|
||||
virtual void accept(BVHVisitor& visitor);
|
||||
|
||||
void traverse(BVHVisitor& visitor) const
|
||||
{ _staticNode->accept(visitor, *_staticData); }
|
||||
|
||||
const BVHStaticData* getStaticData() const
|
||||
{ return _staticData; }
|
||||
const BVHStaticNode* getStaticNode() const
|
||||
{ return _staticNode; }
|
||||
|
||||
virtual SGSphered computeBoundingSphere() const;
|
||||
|
||||
private:
|
||||
SGSharedPtr<const BVHStaticNode> _staticNode;
|
||||
SGSharedPtr<const BVHStaticData> _staticData;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
228
simgear/bvh/BVHStaticGeometryBuilder.hxx
Normal file
228
simgear/bvh/BVHStaticGeometryBuilder.hxx
Normal file
@@ -0,0 +1,228 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHStaticGeometryBuilder_hxx
|
||||
#define BVHStaticGeometryBuilder_hxx
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#include <simgear/structure/SGReferenced.hxx>
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHGroup.hxx"
|
||||
#include "BVHTransform.hxx"
|
||||
|
||||
#include "BVHStaticData.hxx"
|
||||
|
||||
#include "BVHStaticNode.hxx"
|
||||
#include "BVHStaticLeaf.hxx"
|
||||
#include "BVHStaticTriangle.hxx"
|
||||
#include "BVHStaticBinary.hxx"
|
||||
#include "BVHStaticGeometry.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHStaticGeometryBuilder : public SGReferenced {
|
||||
public:
|
||||
BVHStaticGeometryBuilder() :
|
||||
_staticData(new BVHStaticData),
|
||||
_currentMaterial(0),
|
||||
_currentMaterialIndex(~0u)
|
||||
{ }
|
||||
virtual ~BVHStaticGeometryBuilder()
|
||||
{ }
|
||||
|
||||
struct LeafRef {
|
||||
LeafRef(const BVHStaticLeaf* leaf, const BVHStaticData& data) :
|
||||
_leaf(leaf),
|
||||
_box(_leaf->computeBoundingBox(data)),
|
||||
_center(_leaf->computeCenter(data))
|
||||
{ }
|
||||
SGSharedPtr<const BVHStaticLeaf> _leaf;
|
||||
SGBoxf _box;
|
||||
SGVec3f _center;
|
||||
};
|
||||
typedef std::list<LeafRef> LeafRefList;
|
||||
|
||||
struct LeafRefLess : public std::binary_function<LeafRef, LeafRef, bool> {
|
||||
LeafRefLess(unsigned sortAxis) : _sortAxis(sortAxis) {}
|
||||
bool operator()(const LeafRef& x, const LeafRef& y)
|
||||
{ return x._center[_sortAxis] < y._center[_sortAxis]; }
|
||||
unsigned _sortAxis;
|
||||
};
|
||||
|
||||
SGSharedPtr<BVHStaticData> _staticData;
|
||||
LeafRefList _leafRefList;
|
||||
|
||||
typedef std::map<SGVec3f, unsigned> VertexMap;
|
||||
VertexMap _vertexMap;
|
||||
|
||||
typedef std::set<SGVec3<unsigned> > TriangleSet;
|
||||
TriangleSet _triangleSet;
|
||||
|
||||
void setCurrentMaterial(const BVHMaterial* material)
|
||||
{
|
||||
_currentMaterial = material;
|
||||
_currentMaterialIndex = addMaterial(material);
|
||||
}
|
||||
const BVHMaterial* getCurrentMaterial() const
|
||||
{
|
||||
return _currentMaterial;
|
||||
}
|
||||
unsigned addMaterial(const BVHMaterial* material)
|
||||
{
|
||||
MaterialMap::const_iterator i = _materialMap.find(material);
|
||||
if (i != _materialMap.end())
|
||||
return i->second;
|
||||
unsigned index = _staticData->addMaterial(material);
|
||||
_materialMap[material] = index;
|
||||
return index;
|
||||
}
|
||||
|
||||
typedef std::map<const BVHMaterial*, unsigned> MaterialMap;
|
||||
MaterialMap _materialMap;
|
||||
const BVHMaterial* _currentMaterial;
|
||||
unsigned _currentMaterialIndex;
|
||||
|
||||
void addTriangle(const SGVec3f& v1, const SGVec3f& v2, const SGVec3f& v3)
|
||||
{
|
||||
unsigned indices[3] = { addVertex(v1), addVertex(v2), addVertex(v3) };
|
||||
std::sort(indices, indices + 3);
|
||||
SGVec3<unsigned> indexKey(indices);
|
||||
if (_triangleSet.find(indexKey) != _triangleSet.end())
|
||||
return;
|
||||
_triangleSet.insert(indexKey);
|
||||
BVHStaticTriangle* staticTriangle;
|
||||
staticTriangle = new BVHStaticTriangle(_currentMaterialIndex, indices);
|
||||
_leafRefList.push_back(LeafRef(staticTriangle, *_staticData));
|
||||
}
|
||||
unsigned addVertex(const SGVec3f& v)
|
||||
{
|
||||
VertexMap::const_iterator i = _vertexMap.find(v);
|
||||
if (i != _vertexMap.end())
|
||||
return i->second;
|
||||
unsigned index = _staticData->addVertex(v);
|
||||
_vertexMap[v] = index;
|
||||
return index;
|
||||
}
|
||||
|
||||
BVHStaticGeometry* buildTree()
|
||||
{
|
||||
const BVHStaticNode* tree = buildTreeRecursive(_leafRefList);
|
||||
if (!tree)
|
||||
return 0;
|
||||
_staticData->trim();
|
||||
return new BVHStaticGeometry(tree, _staticData);
|
||||
}
|
||||
|
||||
private:
|
||||
static void
|
||||
centerSplitLeafs(unsigned splitAxis, const double& splitValue,
|
||||
LeafRefList& leafs, LeafRefList split[2])
|
||||
{
|
||||
while (!leafs.empty()) {
|
||||
if (leafs.front()._center[splitAxis] < splitValue) {
|
||||
split[0].splice(split[0].begin(), leafs, leafs.begin());
|
||||
} else {
|
||||
split[1].splice(split[1].begin(), leafs, leafs.begin());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
equalSplitLeafs(unsigned splitAxis, LeafRefList& leafs,
|
||||
LeafRefList split[2])
|
||||
{
|
||||
leafs.sort(LeafRefLess(splitAxis));
|
||||
while (true) {
|
||||
if (leafs.empty())
|
||||
break;
|
||||
split[0].splice(split[0].begin(), leafs, leafs.begin());
|
||||
|
||||
if (leafs.empty())
|
||||
break;
|
||||
split[1].splice(split[1].begin(), leafs, --leafs.end());
|
||||
}
|
||||
}
|
||||
|
||||
static const BVHStaticNode* buildTreeRecursive(LeafRefList& leafs)
|
||||
{
|
||||
// recursion termination
|
||||
if (leafs.empty())
|
||||
return 0;
|
||||
// FIXME size is O(n)!!!
|
||||
// if (leafs.size() == 1)
|
||||
if (++leafs.begin() == leafs.end())
|
||||
return leafs.front()._leaf;
|
||||
|
||||
SGBoxf box;
|
||||
for (LeafRefList::const_iterator i = leafs.begin();
|
||||
i != leafs.end(); ++i)
|
||||
box.expandBy(i->_box);
|
||||
|
||||
// // FIXME ...
|
||||
// if (length(box.getSize()) < 1)
|
||||
// return new BVHBox(box);
|
||||
|
||||
if (box.empty())
|
||||
return 0;
|
||||
|
||||
unsigned splitAxis = box.getBroadestAxis();
|
||||
LeafRefList splitLeafs[2];
|
||||
double splitValue = box.getCenter()[splitAxis];
|
||||
centerSplitLeafs(splitAxis, splitValue, leafs, splitLeafs);
|
||||
|
||||
if (splitLeafs[0].empty() || splitLeafs[1].empty()) {
|
||||
for (unsigned i = 0; i < 3 ; ++i) {
|
||||
if (i == splitAxis)
|
||||
continue;
|
||||
|
||||
leafs.swap(splitLeafs[0]);
|
||||
leafs.splice(leafs.begin(), splitLeafs[1]);
|
||||
splitValue = box.getCenter()[i];
|
||||
centerSplitLeafs(i, splitValue, leafs, splitLeafs);
|
||||
|
||||
if (!splitLeafs[0].empty() && !splitLeafs[1].empty()) {
|
||||
splitAxis = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (splitLeafs[0].empty() || splitLeafs[1].empty()) {
|
||||
leafs.swap(splitLeafs[0]);
|
||||
leafs.splice(leafs.begin(), splitLeafs[1]);
|
||||
equalSplitLeafs(splitAxis, leafs, splitLeafs);
|
||||
}
|
||||
|
||||
const BVHStaticNode* child0 = buildTreeRecursive(splitLeafs[0]);
|
||||
const BVHStaticNode* child1 = buildTreeRecursive(splitLeafs[1]);
|
||||
if (!child0)
|
||||
return child1;
|
||||
if (!child1)
|
||||
return child0;
|
||||
|
||||
return new BVHStaticBinary(splitAxis, child0, child1, box);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
27
simgear/bvh/BVHStaticLeaf.cxx
Normal file
27
simgear/bvh/BVHStaticLeaf.cxx
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHStaticLeaf.hxx"
|
||||
#include "BVHVisitor.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHStaticLeaf::~BVHStaticLeaf()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
38
simgear/bvh/BVHStaticLeaf.hxx
Normal file
38
simgear/bvh/BVHStaticLeaf.hxx
Normal file
@@ -0,0 +1,38 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHStaticLeaf_hxx
|
||||
#define BVHStaticLeaf_hxx
|
||||
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
#include "BVHStaticNode.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHStaticLeaf : public BVHStaticNode {
|
||||
public:
|
||||
virtual ~BVHStaticLeaf();
|
||||
|
||||
virtual void accept(BVHVisitor& visitor, const BVHStaticData& data) const = 0;
|
||||
|
||||
virtual SGBoxf computeBoundingBox(const BVHStaticData&) const = 0;
|
||||
virtual SGVec3f computeCenter(const BVHStaticData&) const = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
26
simgear/bvh/BVHStaticNode.cxx
Normal file
26
simgear/bvh/BVHStaticNode.cxx
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHStaticNode.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHStaticNode::~BVHStaticNode()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
37
simgear/bvh/BVHStaticNode.hxx
Normal file
37
simgear/bvh/BVHStaticNode.hxx
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHStaticNode_hxx
|
||||
#define BVHStaticNode_hxx
|
||||
|
||||
#include <simgear/structure/SGReferenced.hxx>
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHStaticData;
|
||||
class BVHVisitor;
|
||||
|
||||
class BVHStaticNode : public SGReferenced {
|
||||
public:
|
||||
virtual ~BVHStaticNode();
|
||||
|
||||
virtual void accept(BVHVisitor&, const BVHStaticData&) const = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
58
simgear/bvh/BVHStaticTriangle.cxx
Normal file
58
simgear/bvh/BVHStaticTriangle.cxx
Normal file
@@ -0,0 +1,58 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHStaticTriangle.hxx"
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHStaticTriangle::BVHStaticTriangle(unsigned material,
|
||||
const unsigned indices[3]) :
|
||||
_material(material)
|
||||
{
|
||||
for (unsigned i = 0; i < 3; ++i)
|
||||
_indices[i] = indices[i];
|
||||
}
|
||||
|
||||
BVHStaticTriangle::~BVHStaticTriangle()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BVHStaticTriangle::accept(BVHVisitor& visitor, const BVHStaticData& data) const
|
||||
{
|
||||
visitor.apply(*this, data);
|
||||
}
|
||||
|
||||
SGBoxf
|
||||
BVHStaticTriangle::computeBoundingBox(const BVHStaticData& data) const
|
||||
{
|
||||
SGBoxf box;
|
||||
box.expandBy(data.getVertex(_indices[0]));
|
||||
box.expandBy(data.getVertex(_indices[1]));
|
||||
box.expandBy(data.getVertex(_indices[2]));
|
||||
return box;
|
||||
}
|
||||
|
||||
SGVec3f
|
||||
BVHStaticTriangle::computeCenter(const BVHStaticData& data) const
|
||||
{
|
||||
return getTriangle(data).getCenter();
|
||||
}
|
||||
|
||||
}
|
||||
54
simgear/bvh/BVHStaticTriangle.hxx
Normal file
54
simgear/bvh/BVHStaticTriangle.hxx
Normal file
@@ -0,0 +1,54 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHStaticTriangle_hxx
|
||||
#define BVHStaticTriangle_hxx
|
||||
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
#include "BVHStaticData.hxx"
|
||||
#include "BVHStaticLeaf.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHStaticTriangle : public BVHStaticLeaf {
|
||||
public:
|
||||
BVHStaticTriangle(unsigned material, const unsigned indices[3]);
|
||||
virtual ~BVHStaticTriangle();
|
||||
|
||||
virtual void accept(BVHVisitor& visitor, const BVHStaticData& data) const;
|
||||
|
||||
virtual SGBoxf computeBoundingBox(const BVHStaticData& data) const;
|
||||
virtual SGVec3f computeCenter(const BVHStaticData& data) const;
|
||||
|
||||
SGTrianglef getTriangle(const BVHStaticData& data) const
|
||||
{
|
||||
return SGTrianglef(data.getVertex(_indices[0]),
|
||||
data.getVertex(_indices[1]),
|
||||
data.getVertex(_indices[2]));
|
||||
}
|
||||
|
||||
unsigned getMaterialIndex() const
|
||||
{ return _material; }
|
||||
|
||||
private:
|
||||
unsigned _indices[3];
|
||||
unsigned _material;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
265
simgear/bvh/BVHSubTreeCollector.cxx
Normal file
265
simgear/bvh/BVHSubTreeCollector.cxx
Normal file
@@ -0,0 +1,265 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include "BVHSubTreeCollector.hxx"
|
||||
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
#include <cassert>
|
||||
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHGroup.hxx"
|
||||
#include "BVHTransform.hxx"
|
||||
|
||||
#include "BVHStaticData.hxx"
|
||||
|
||||
#include "BVHStaticNode.hxx"
|
||||
#include "BVHStaticTriangle.hxx"
|
||||
#include "BVHStaticBinary.hxx"
|
||||
#include "BVHStaticGeometry.hxx"
|
||||
#include "BVHBoundingBoxVisitor.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHSubTreeCollector::BVHSubTreeCollector(const SGSphered& sphere) :
|
||||
_sphere(sphere)
|
||||
{
|
||||
}
|
||||
|
||||
BVHSubTreeCollector::~BVHSubTreeCollector()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BVHSubTreeCollector::apply(BVHGroup& group)
|
||||
{
|
||||
if (!intersects(_sphere, group.getBoundingSphere()))
|
||||
return;
|
||||
|
||||
// The _nodeList content is somehow the 'return value' of the subtree.
|
||||
// Set it to zero to see if we have something to collect down there.
|
||||
NodeList parentNodeList;
|
||||
pushNodeList(parentNodeList);
|
||||
|
||||
group.traverse(*this);
|
||||
|
||||
popNodeList(parentNodeList);
|
||||
}
|
||||
|
||||
void
|
||||
BVHSubTreeCollector::apply(BVHPageNode& group)
|
||||
{
|
||||
if (!intersects(_sphere, group.getBoundingSphere()))
|
||||
return;
|
||||
|
||||
// The _nodeList content is somehow the 'return value' of the subtree.
|
||||
// Set it to zero to see if we have something to collect down there.
|
||||
NodeList parentNodeList;
|
||||
pushNodeList(parentNodeList);
|
||||
|
||||
group.traverse(*this);
|
||||
|
||||
popNodeList(parentNodeList);
|
||||
}
|
||||
|
||||
void
|
||||
BVHSubTreeCollector::apply(BVHTransform& transform)
|
||||
{
|
||||
if (!intersects(_sphere, transform.getBoundingSphere()))
|
||||
return;
|
||||
|
||||
SGSphered sphere = _sphere;
|
||||
_sphere = transform.sphereToLocal(sphere);
|
||||
|
||||
NodeList parentNodeList;
|
||||
pushNodeList(parentNodeList);
|
||||
|
||||
transform.traverse(*this);
|
||||
|
||||
if (haveChildren()) {
|
||||
BVHTransform* currentBvTransform = new BVHTransform;
|
||||
currentBvTransform->setTransform(transform);
|
||||
popNodeList(parentNodeList, currentBvTransform);
|
||||
} else {
|
||||
popNodeList(parentNodeList);
|
||||
}
|
||||
|
||||
_sphere = sphere;
|
||||
}
|
||||
|
||||
void
|
||||
BVHSubTreeCollector::apply(BVHMotionTransform& transform)
|
||||
{
|
||||
if (!intersects(_sphere, transform.getBoundingSphere()))
|
||||
return;
|
||||
|
||||
SGSphered sphere = _sphere;
|
||||
_sphere = transform.sphereToLocal(sphere, transform.getStartTime());
|
||||
_sphere.expandBy(transform.sphereToLocal(sphere, transform.getEndTime()));
|
||||
|
||||
NodeList parentNodeList;
|
||||
pushNodeList(parentNodeList);
|
||||
|
||||
transform.traverse(*this);
|
||||
|
||||
if (haveChildren()) {
|
||||
BVHMotionTransform* currentBvTransform = new BVHMotionTransform;
|
||||
currentBvTransform->setTransform(transform);
|
||||
popNodeList(parentNodeList, currentBvTransform);
|
||||
} else {
|
||||
popNodeList(parentNodeList);
|
||||
}
|
||||
|
||||
_sphere = sphere;
|
||||
}
|
||||
|
||||
void
|
||||
BVHSubTreeCollector::apply(BVHLineGeometry& lineSegment)
|
||||
{
|
||||
if (!intersects(_sphere, lineSegment.getBoundingSphere()))
|
||||
return;
|
||||
addNode(&lineSegment);
|
||||
}
|
||||
|
||||
void
|
||||
BVHSubTreeCollector::apply(BVHStaticGeometry& node)
|
||||
{
|
||||
if (!intersects(_sphere, node.getBoundingSphere()))
|
||||
return;
|
||||
|
||||
assert(!_staticNode);
|
||||
node.traverse(*this);
|
||||
if (!_staticNode)
|
||||
return;
|
||||
|
||||
BVHStaticGeometry* staticTree;
|
||||
staticTree = new BVHStaticGeometry(_staticNode, node.getStaticData());
|
||||
addNode(staticTree);
|
||||
_staticNode = 0;
|
||||
}
|
||||
|
||||
void
|
||||
BVHSubTreeCollector::apply(const BVHStaticBinary& node,
|
||||
const BVHStaticData& data)
|
||||
{
|
||||
assert(!_staticNode);
|
||||
|
||||
if (!intersects(_sphere, node.getBoundingBox()))
|
||||
return;
|
||||
|
||||
SGVec3d corner(node.getBoundingBox().getFarestCorner(_sphere.getCenter()));
|
||||
if (intersects(_sphere, corner)) {
|
||||
// If the box is totally contained in the sphere, just take it all
|
||||
_staticNode = &node;
|
||||
|
||||
} else {
|
||||
// We have still a chance to seperate something out, try it.
|
||||
|
||||
node.getLeftChild()->accept(*this, data);
|
||||
SGSharedPtr<const BVHStaticNode> leftStaticNode = _staticNode;
|
||||
_staticNode = 0;
|
||||
node.getRightChild()->accept(*this, data);
|
||||
SGSharedPtr<const BVHStaticNode> rightStaticNode = _staticNode;
|
||||
_staticNode = 0;
|
||||
|
||||
if (leftStaticNode) {
|
||||
if (rightStaticNode) {
|
||||
BVHBoundingBoxVisitor bbv;
|
||||
leftStaticNode->accept(bbv, data);
|
||||
rightStaticNode->accept(bbv, data);
|
||||
_staticNode
|
||||
= new BVHStaticBinary(node.getSplitAxis(), leftStaticNode,
|
||||
rightStaticNode, bbv.getBox());
|
||||
} else {
|
||||
_staticNode = leftStaticNode;
|
||||
}
|
||||
} else {
|
||||
if (rightStaticNode) {
|
||||
_staticNode = rightStaticNode;
|
||||
} else {
|
||||
// Nothing to report to parents ...
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BVHSubTreeCollector::apply(const BVHStaticTriangle& node,
|
||||
const BVHStaticData& data)
|
||||
{
|
||||
if (!intersects(_sphere, node.getTriangle(data)))
|
||||
return;
|
||||
_staticNode = &node;
|
||||
}
|
||||
|
||||
void
|
||||
BVHSubTreeCollector::addNode(BVHNode* node)
|
||||
{
|
||||
if (!node)
|
||||
return;
|
||||
if (!_nodeList.capacity())
|
||||
_nodeList.reserve(64);
|
||||
_nodeList.push_back(node);
|
||||
}
|
||||
|
||||
void
|
||||
BVHSubTreeCollector::popNodeList(NodeList& parentNodeList, BVHGroup* transform)
|
||||
{
|
||||
// Only do something if we really have children
|
||||
if (!_nodeList.empty()) {
|
||||
NodeList::const_iterator i;
|
||||
for (i = _nodeList.begin(); i != _nodeList.end(); ++i)
|
||||
transform->addChild(*i);
|
||||
parentNodeList.push_back(transform);
|
||||
}
|
||||
_nodeList.swap(parentNodeList);
|
||||
}
|
||||
|
||||
void
|
||||
BVHSubTreeCollector::popNodeList(NodeList& parentNodeList)
|
||||
{
|
||||
// Only do something if we really have children
|
||||
if (!_nodeList.empty()) {
|
||||
if (_nodeList.size() == 1) {
|
||||
parentNodeList.push_back(_nodeList.front());
|
||||
} else {
|
||||
BVHGroup* group = new BVHGroup;
|
||||
NodeList::const_iterator i;
|
||||
for (i = _nodeList.begin(); i != _nodeList.end(); ++i)
|
||||
group->addChild(*i);
|
||||
parentNodeList.push_back(group);
|
||||
}
|
||||
}
|
||||
_nodeList.swap(parentNodeList);
|
||||
}
|
||||
|
||||
SGSharedPtr<BVHNode>
|
||||
BVHSubTreeCollector::getNode() const
|
||||
{
|
||||
if (_nodeList.empty())
|
||||
return 0;
|
||||
|
||||
if (_nodeList.size() == 1)
|
||||
return _nodeList.front();
|
||||
|
||||
BVHGroup* group = new BVHGroup;
|
||||
NodeList::const_iterator i;
|
||||
for (i = _nodeList.begin(); i != _nodeList.end(); ++i)
|
||||
group->addChild(*i);
|
||||
return group;
|
||||
}
|
||||
|
||||
}
|
||||
82
simgear/bvh/BVHSubTreeCollector.hxx
Normal file
82
simgear/bvh/BVHSubTreeCollector.hxx
Normal file
@@ -0,0 +1,82 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHSubTreeCollector_hxx
|
||||
#define BVHSubTreeCollector_hxx
|
||||
|
||||
#include <simgear/math/SGGeometry.hxx>
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHGroup.hxx"
|
||||
#include "BVHStaticNode.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
/// Visitor to subcollect parts of an existing bounding volume tree.
|
||||
/// Given a sphere, it takes those sub parts of the tree that intersect the
|
||||
/// sphere. Transform nodes of any kind are preserved to be able to ask for
|
||||
/// intersections a different times. The subcollected tree is kept as small as
|
||||
/// possible as it does avoid having groups with single childs.
|
||||
/// Also the BVHStaticGeometry parts are seached for subtrees that are outside
|
||||
/// the sphere.
|
||||
|
||||
class BVHSubTreeCollector : public BVHVisitor {
|
||||
public:
|
||||
typedef std::vector<SGSharedPtr<BVHNode> > NodeList;
|
||||
|
||||
BVHSubTreeCollector(const SGSphered& sphere = SGSphered());
|
||||
virtual ~BVHSubTreeCollector();
|
||||
|
||||
virtual void apply(BVHGroup&);
|
||||
virtual void apply(BVHPageNode&);
|
||||
virtual void apply(BVHTransform&);
|
||||
virtual void apply(BVHMotionTransform&);
|
||||
virtual void apply(BVHLineGeometry&);
|
||||
virtual void apply(BVHStaticGeometry&);
|
||||
|
||||
virtual void apply(const BVHStaticBinary&, const BVHStaticData&);
|
||||
virtual void apply(const BVHStaticTriangle&, const BVHStaticData&);
|
||||
|
||||
void setSphere(const SGSphered& sphere)
|
||||
{ _sphere = sphere; }
|
||||
const SGSphered& getSphere() const
|
||||
{ return _sphere; }
|
||||
|
||||
bool haveChildren() const
|
||||
{ return !_nodeList.empty(); }
|
||||
|
||||
void addNode(BVHNode* node);
|
||||
|
||||
void pushNodeList(NodeList& parentNodeList)
|
||||
{ _nodeList.swap(parentNodeList); }
|
||||
void popNodeList(NodeList& parentNodeList, BVHGroup* transform);
|
||||
void popNodeList(NodeList& parentNodeList);
|
||||
|
||||
SGSharedPtr<BVHNode> getNode() const;
|
||||
|
||||
protected:
|
||||
NodeList _nodeList;
|
||||
SGSharedPtr<const BVHStaticNode> _staticNode;
|
||||
|
||||
private:
|
||||
SGSphered _sphere;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
99
simgear/bvh/BVHTransform.cxx
Normal file
99
simgear/bvh/BVHTransform.cxx
Normal file
@@ -0,0 +1,99 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <simgear_config.h>
|
||||
#endif
|
||||
|
||||
#include "BVHTransform.hxx"
|
||||
|
||||
#include "BVHVisitor.hxx"
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHGroup.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
BVHTransform::BVHTransform() :
|
||||
_toWorld(SGMatrixd::unit()),
|
||||
_toLocal(SGMatrixd::unit()),
|
||||
_toWorldAmplification(1),
|
||||
_toLocalAmplification(1)
|
||||
{
|
||||
}
|
||||
|
||||
BVHTransform::~BVHTransform()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BVHTransform::accept(BVHVisitor& visitor)
|
||||
{
|
||||
visitor.apply(*this);
|
||||
}
|
||||
|
||||
void
|
||||
BVHTransform::setTransform(const BVHTransform& transform)
|
||||
{
|
||||
_toWorld = transform._toWorld;
|
||||
_toLocal = transform._toLocal;
|
||||
_toWorldAmplification = transform._toWorldAmplification;
|
||||
_toLocalAmplification = transform._toLocalAmplification;
|
||||
invalidateParentBound();
|
||||
}
|
||||
|
||||
void
|
||||
BVHTransform::setToWorldTransform(const SGMatrixd& transform)
|
||||
{
|
||||
_toWorld = transform;
|
||||
invert(_toLocal, transform);
|
||||
updateAmplificationFactors();
|
||||
invalidateParentBound();
|
||||
}
|
||||
|
||||
void
|
||||
BVHTransform::setToLocalTransform(const SGMatrixd& transform)
|
||||
{
|
||||
_toLocal = transform;
|
||||
invert(_toWorld, transform);
|
||||
updateAmplificationFactors();
|
||||
invalidateParentBound();
|
||||
}
|
||||
|
||||
SGSphered
|
||||
BVHTransform::computeBoundingSphere() const
|
||||
{
|
||||
return sphereToWorld(BVHGroup::computeBoundingSphere());
|
||||
}
|
||||
|
||||
void
|
||||
BVHTransform::updateAmplificationFactors()
|
||||
{
|
||||
// Hmm, this is just a hint, true?
|
||||
// But anyway, almost all transforms in a scenegraph will
|
||||
// have them equal to 1 ...
|
||||
double r = norm(vecToWorld(SGVec3d(1, 0, 0)));
|
||||
r = std::max(r, norm(vecToWorld(SGVec3d(0, 1, 0))));
|
||||
r = std::max(r, norm(vecToWorld(SGVec3d(0, 0, 1))));
|
||||
_toWorldAmplification = r;
|
||||
|
||||
r = norm(vecToLocal(SGVec3d(1, 0, 0)));
|
||||
r = std::max(r, norm(vecToLocal(SGVec3d(0, 1, 0))));
|
||||
r = std::max(r, norm(vecToLocal(SGVec3d(0, 0, 1))));
|
||||
_toLocalAmplification = r;
|
||||
}
|
||||
|
||||
}
|
||||
82
simgear/bvh/BVHTransform.hxx
Normal file
82
simgear/bvh/BVHTransform.hxx
Normal file
@@ -0,0 +1,82 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHTransform_hxx
|
||||
#define BVHTransform_hxx
|
||||
|
||||
#include "BVHGroup.hxx"
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHTransform : public BVHGroup {
|
||||
public:
|
||||
BVHTransform();
|
||||
virtual ~BVHTransform();
|
||||
|
||||
virtual void accept(BVHVisitor& visitor);
|
||||
|
||||
void setTransform(const BVHTransform& transform);
|
||||
|
||||
void setToWorldTransform(const SGMatrixd& transform);
|
||||
const SGMatrixd& getToWorldTransform() const
|
||||
{ return _toWorld; }
|
||||
|
||||
void setToLocalTransform(const SGMatrixd& transform);
|
||||
const SGMatrixd& getToLocalTransform() const
|
||||
{ return _toLocal; }
|
||||
|
||||
SGVec3d ptToWorld(const SGVec3d& point) const
|
||||
{ return _toWorld.xformPt(point); }
|
||||
SGVec3d ptToLocal(const SGVec3d& point) const
|
||||
{ return _toLocal.xformPt(point); }
|
||||
|
||||
SGVec3d vecToWorld(const SGVec3d& vec) const
|
||||
{ return _toWorld.xformVec(vec); }
|
||||
SGVec3d vecToLocal(const SGVec3d& vec) const
|
||||
{ return _toLocal.xformVec(vec); }
|
||||
|
||||
SGLineSegmentd lineSegmentToWorld(const SGLineSegmentd& lineSeg) const
|
||||
{ return lineSeg.transform(_toWorld); }
|
||||
SGLineSegmentd lineSegmentToLocal(const SGLineSegmentd& lineSeg) const
|
||||
{ return lineSeg.transform(_toLocal); }
|
||||
|
||||
SGSphered sphereToWorld(const SGSphered& sphere) const
|
||||
{
|
||||
SGVec3d center = ptToWorld(sphere.getCenter());
|
||||
double radius = _toWorldAmplification*sphere.getRadius();
|
||||
return SGSphered(center, radius);
|
||||
}
|
||||
SGSphered sphereToLocal(const SGSphered& sphere) const
|
||||
{
|
||||
SGVec3d center = ptToLocal(sphere.getCenter());
|
||||
double radius = _toLocalAmplification*sphere.getRadius();
|
||||
return SGSphered(center, radius);
|
||||
}
|
||||
|
||||
private:
|
||||
virtual SGSphered computeBoundingSphere() const;
|
||||
void updateAmplificationFactors();
|
||||
|
||||
SGMatrixd _toWorld;
|
||||
SGMatrixd _toLocal;
|
||||
double _toWorldAmplification;
|
||||
double _toLocalAmplification;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
58
simgear/bvh/BVHVisitor.hxx
Normal file
58
simgear/bvh/BVHVisitor.hxx
Normal file
@@ -0,0 +1,58 @@
|
||||
// Copyright (C) 2008 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#ifndef BVHVisitor_hxx
|
||||
#define BVHVisitor_hxx
|
||||
|
||||
namespace simgear {
|
||||
|
||||
class BVHStaticData;
|
||||
|
||||
class BVHGroup;
|
||||
class BVHPageNode;
|
||||
class BVHTransform;
|
||||
class BVHMotionTransform;
|
||||
class BVHStaticGeometry;
|
||||
class BVHLineGeometry;
|
||||
|
||||
class BVHStaticBinary;
|
||||
class BVHStaticTriangle;
|
||||
|
||||
class BVHVisitor {
|
||||
public:
|
||||
// The magnitudes of pure virtuals is because of the fact that this chaining
|
||||
// just takes needless runtime. This declaration should force the user of
|
||||
// this classes to implement a common functionality that should be called
|
||||
// from each apropriate apply method directly.
|
||||
virtual ~BVHVisitor() {}
|
||||
|
||||
// High level nodes to handle
|
||||
virtual void apply(BVHGroup&) = 0;
|
||||
virtual void apply(BVHPageNode&) = 0;
|
||||
virtual void apply(BVHTransform&) = 0;
|
||||
virtual void apply(BVHMotionTransform&) = 0;
|
||||
virtual void apply(BVHLineGeometry&) = 0;
|
||||
virtual void apply(BVHStaticGeometry&) = 0;
|
||||
|
||||
// Static tree nodes to handle
|
||||
virtual void apply(const BVHStaticBinary&, const BVHStaticData&) = 0;
|
||||
virtual void apply(const BVHStaticTriangle&, const BVHStaticData&) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
52
simgear/bvh/CMakeLists.txt
Normal file
52
simgear/bvh/CMakeLists.txt
Normal file
@@ -0,0 +1,52 @@
|
||||
include (SimGearComponent)
|
||||
|
||||
set(HEADERS
|
||||
BVHBoundingBoxVisitor.hxx
|
||||
BVHGroup.hxx
|
||||
BVHLineGeometry.hxx
|
||||
BVHLineSegmentVisitor.hxx
|
||||
BVHMotionTransform.hxx
|
||||
BVHNearestPointVisitor.hxx
|
||||
BVHNode.hxx
|
||||
BVHPageNode.hxx
|
||||
BVHPageRequest.hxx
|
||||
BVHPager.hxx
|
||||
BVHStaticBinary.hxx
|
||||
BVHStaticData.hxx
|
||||
BVHStaticGeometry.hxx
|
||||
BVHStaticGeometryBuilder.hxx
|
||||
BVHStaticLeaf.hxx
|
||||
BVHStaticNode.hxx
|
||||
BVHStaticTriangle.hxx
|
||||
BVHSubTreeCollector.hxx
|
||||
BVHMaterial.hxx
|
||||
BVHTransform.hxx
|
||||
BVHVisitor.hxx
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
BVHGroup.cxx
|
||||
BVHLineGeometry.cxx
|
||||
BVHLineSegmentVisitor.cxx
|
||||
BVHMotionTransform.cxx
|
||||
BVHNode.cxx
|
||||
BVHPageNode.cxx
|
||||
BVHPageRequest.cxx
|
||||
BVHPager.cxx
|
||||
BVHStaticBinary.cxx
|
||||
BVHStaticGeometry.cxx
|
||||
BVHStaticLeaf.cxx
|
||||
BVHStaticNode.cxx
|
||||
BVHStaticTriangle.cxx
|
||||
BVHSubTreeCollector.cxx
|
||||
BVHMaterial.cxx
|
||||
BVHTransform.cxx
|
||||
)
|
||||
|
||||
simgear_component(bvh bvh "${SOURCES}" "${HEADERS}")
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
add_executable(bvhtest bvhtest.cxx)
|
||||
target_link_libraries(bvhtest SimGearCore)
|
||||
add_test(bvhtest ${EXECUTABLE_OUTPUT_PATH}/bvhtest)
|
||||
endif(ENABLE_TESTS)
|
||||
142
simgear/bvh/bvhtest.cxx
Normal file
142
simgear/bvh/bvhtest.cxx
Normal file
@@ -0,0 +1,142 @@
|
||||
// Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
|
||||
#include "BVHNode.hxx"
|
||||
#include "BVHGroup.hxx"
|
||||
#include "BVHTransform.hxx"
|
||||
|
||||
#include "BVHStaticData.hxx"
|
||||
|
||||
#include "BVHStaticNode.hxx"
|
||||
#include "BVHStaticLeaf.hxx"
|
||||
#include "BVHStaticTriangle.hxx"
|
||||
#include "BVHStaticBinary.hxx"
|
||||
#include "BVHStaticGeometry.hxx"
|
||||
|
||||
#include "BVHBoundingBoxVisitor.hxx"
|
||||
#include "BVHSubTreeCollector.hxx"
|
||||
#include "BVHLineSegmentVisitor.hxx"
|
||||
#include "BVHNearestPointVisitor.hxx"
|
||||
|
||||
using namespace simgear;
|
||||
|
||||
BVHNode*
|
||||
buildSingleTriangle(const SGVec3f& v1, const SGVec3f& v2, const SGVec3f& v3)
|
||||
{
|
||||
BVHStaticData* staticData = new BVHStaticData;
|
||||
unsigned indices[3] = {
|
||||
staticData->addVertex(v1),
|
||||
staticData->addVertex(v2),
|
||||
staticData->addVertex(v3)
|
||||
};
|
||||
BVHStaticTriangle* staticTriangle = new BVHStaticTriangle(~0u, indices);
|
||||
return new BVHStaticGeometry(staticTriangle, staticData);
|
||||
}
|
||||
|
||||
bool
|
||||
testLineIntersections()
|
||||
{
|
||||
SGVec3f v1(-1, -1, 0);
|
||||
SGVec3f v2(1, -1, 0);
|
||||
SGVec3f v3(-1, 1, 0);
|
||||
SGSharedPtr<BVHNode> node = buildSingleTriangle(v1, v2, v3);
|
||||
|
||||
SGLineSegmentd lineSegment(SGVec3d(0, 0, -1), SGVec3d(0, 0, 1));
|
||||
{
|
||||
BVHLineSegmentVisitor lineSegmentVisitor(lineSegment);
|
||||
node->accept(lineSegmentVisitor);
|
||||
if (lineSegmentVisitor.empty())
|
||||
return false;
|
||||
if (!equivalent(lineSegmentVisitor.getPoint(), SGVec3d(0, 0, 0)))
|
||||
return false;
|
||||
}
|
||||
|
||||
SGVec3d position(1000, 1000, 1000);
|
||||
SGMatrixd matrix(position);
|
||||
SGSharedPtr<BVHTransform> transform1 = new BVHTransform;
|
||||
transform1->setToWorldTransform(matrix);
|
||||
transform1->addChild(node);
|
||||
|
||||
SGSharedPtr<BVHTransform> transform2 = new BVHTransform;
|
||||
transform2->setToLocalTransform(matrix);
|
||||
transform2->addChild(transform1);
|
||||
|
||||
{
|
||||
BVHLineSegmentVisitor lineSegmentVisitor(lineSegment);
|
||||
transform2->accept(lineSegmentVisitor);
|
||||
if (lineSegmentVisitor.empty())
|
||||
return false;
|
||||
if (!equivalent(lineSegmentVisitor.getPoint(), SGVec3d(0, 0, 0)))
|
||||
return false;
|
||||
}
|
||||
|
||||
SGSharedPtr<BVHMotionTransform> transform3 = new BVHMotionTransform;
|
||||
transform3->setLinearVelocity(SGVec3d(0, 0, 1));
|
||||
transform3->setAngularVelocity(SGVec3d(1, 0, 0));
|
||||
transform3->addChild(node);
|
||||
|
||||
{
|
||||
BVHLineSegmentVisitor lineSegmentVisitor(lineSegment, 0);
|
||||
transform3->accept(lineSegmentVisitor);
|
||||
if (lineSegmentVisitor.empty())
|
||||
return false;
|
||||
if (!equivalent(lineSegmentVisitor.getPoint(), SGVec3d(0, 0, 0)))
|
||||
return false;
|
||||
if (!equivalent(lineSegmentVisitor.getLinearVelocity(),
|
||||
SGVec3d(0, 1, 1)))
|
||||
return false;
|
||||
if (!equivalent(lineSegmentVisitor.getAngularVelocity(),
|
||||
SGVec3d(1, 0, 0)))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
testNearestPoint()
|
||||
{
|
||||
SGVec3f v1(-1, -1, 0);
|
||||
SGVec3f v2(1, -1, 0);
|
||||
SGVec3f v3(-1, 1, 0);
|
||||
SGSharedPtr<BVHNode> node = buildSingleTriangle(v1, v2, v3);
|
||||
|
||||
SGSphered sphere(SGVec3d(0, 0, -1), 2);
|
||||
{
|
||||
BVHNearestPointVisitor nearestPointVisitor(sphere, 0);
|
||||
node->accept(nearestPointVisitor);
|
||||
if (nearestPointVisitor.empty())
|
||||
return false;
|
||||
if (!equivalent(nearestPointVisitor.getPoint(), SGVec3d(0, 0, 0)))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
if (!testLineIntersections())
|
||||
return EXIT_FAILURE;
|
||||
if (!testNearestPoint())
|
||||
return EXIT_FAILURE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
36
simgear/canvas/CMakeLists.txt
Normal file
36
simgear/canvas/CMakeLists.txt
Normal file
@@ -0,0 +1,36 @@
|
||||
include (SimGearComponent)
|
||||
|
||||
set(HEADERS
|
||||
canvas_fwd.hxx
|
||||
Canvas.hxx
|
||||
CanvasEvent.hxx
|
||||
CanvasEventListener.hxx
|
||||
CanvasEventManager.hxx
|
||||
CanvasEventTypes.hxx
|
||||
CanvasEventVisitor.hxx
|
||||
CanvasMgr.hxx
|
||||
CanvasObjectPlacement.hxx
|
||||
CanvasPlacement.hxx
|
||||
CanvasSystemAdapter.hxx
|
||||
MouseEvent.hxx
|
||||
ODGauge.hxx
|
||||
VGInitOperation.hxx
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
Canvas.cxx
|
||||
CanvasEvent.cxx
|
||||
CanvasEventListener.cxx
|
||||
CanvasEventManager.cxx
|
||||
CanvasEventVisitor.cxx
|
||||
CanvasMgr.cxx
|
||||
CanvasObjectPlacement.cxx
|
||||
CanvasPlacement.cxx
|
||||
ODGauge.cxx
|
||||
VGInitOperation.cxx
|
||||
)
|
||||
|
||||
add_subdirectory(ShivaVG/src)
|
||||
add_subdirectory(elements)
|
||||
|
||||
simgear_scene_component(canvas canvas "${SOURCES}" "${HEADERS}")
|
||||
637
simgear/canvas/Canvas.cxx
Normal file
637
simgear/canvas/Canvas.cxx
Normal file
@@ -0,0 +1,637 @@
|
||||
// The canvas for rendering with the 2d API
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#include "Canvas.hxx"
|
||||
#include "CanvasEventManager.hxx"
|
||||
#include "CanvasEventVisitor.hxx"
|
||||
#include <simgear/canvas/MouseEvent.hxx>
|
||||
#include <simgear/canvas/CanvasPlacement.hxx>
|
||||
#include <simgear/scene/util/parse_color.hxx>
|
||||
#include <simgear/scene/util/RenderConstants.hxx>
|
||||
|
||||
#include <osg/Camera>
|
||||
#include <osg/Geode>
|
||||
#include <osgText/Text>
|
||||
#include <osgViewer/Viewer>
|
||||
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Canvas::CullCallback::CullCallback(const CanvasWeakPtr& canvas):
|
||||
_canvas( canvas )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::CullCallback::operator()( osg::Node* node,
|
||||
osg::NodeVisitor* nv )
|
||||
{
|
||||
if( (nv->getTraversalMask() & simgear::MODEL_BIT) && !_canvas.expired() )
|
||||
_canvas.lock()->enableRendering();
|
||||
|
||||
traverse(node, nv);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Canvas::Canvas(SGPropertyNode* node):
|
||||
PropertyBasedElement(node),
|
||||
_canvas_mgr(0),
|
||||
_event_manager(new EventManager),
|
||||
_size_x(-1),
|
||||
_size_y(-1),
|
||||
_view_width(-1),
|
||||
_view_height(-1),
|
||||
_status(node, "status"),
|
||||
_status_msg(node, "status-msg"),
|
||||
_sampling_dirty(false),
|
||||
_render_dirty(true),
|
||||
_visible(true),
|
||||
_render_always(false)
|
||||
{
|
||||
_status = 0;
|
||||
setStatusFlags(MISSING_SIZE_X | MISSING_SIZE_Y);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::onDestroy()
|
||||
{
|
||||
if( _root_group )
|
||||
{
|
||||
_root_group->clearEventListener();
|
||||
_root_group->onDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::setSystemAdapter(const SystemAdapterPtr& system_adapter)
|
||||
{
|
||||
_system_adapter = system_adapter;
|
||||
_texture.setSystemAdapter(system_adapter);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
SystemAdapterPtr Canvas::getSystemAdapter() const
|
||||
{
|
||||
return _system_adapter;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::setCanvasMgr(CanvasMgr* canvas_mgr)
|
||||
{
|
||||
_canvas_mgr = canvas_mgr;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
CanvasMgr* Canvas::getCanvasMgr() const
|
||||
{
|
||||
return _canvas_mgr;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool Canvas::isInit() const
|
||||
{
|
||||
return _texture.serviceable();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::addParentCanvas(const CanvasWeakPtr& canvas)
|
||||
{
|
||||
if( canvas.expired() )
|
||||
{
|
||||
SG_LOG
|
||||
(
|
||||
SG_GENERAL,
|
||||
SG_WARN,
|
||||
"Canvas::addParentCanvas(" << _node->getPath(true) << "): "
|
||||
"got an expired parent!"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
_parent_canvases.insert(canvas);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::addChildCanvas(const CanvasWeakPtr& canvas)
|
||||
{
|
||||
if( canvas.expired() )
|
||||
{
|
||||
SG_LOG
|
||||
(
|
||||
SG_GENERAL,
|
||||
SG_WARN,
|
||||
"Canvas::addChildCanvas(" << _node->getPath(true) << "): "
|
||||
" got an expired child!"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
_child_canvases.insert(canvas);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::removeParentCanvas(const CanvasWeakPtr& canvas)
|
||||
{
|
||||
_parent_canvases.erase(canvas);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::removeChildCanvas(const CanvasWeakPtr& canvas)
|
||||
{
|
||||
_child_canvases.erase(canvas);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
GroupPtr Canvas::createGroup(const std::string& name)
|
||||
{
|
||||
return _root_group->createChild<Group>(name);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
GroupPtr Canvas::getGroup(const std::string& name)
|
||||
{
|
||||
return _root_group->getChild<Group>(name);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
GroupPtr Canvas::getOrCreateGroup(const std::string& name)
|
||||
{
|
||||
return _root_group->getOrCreateChild<Group>(name);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
GroupPtr Canvas::getRootGroup()
|
||||
{
|
||||
return _root_group;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::enableRendering(bool force)
|
||||
{
|
||||
_visible = true;
|
||||
if( force )
|
||||
_render_dirty = true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::update(double delta_time_sec)
|
||||
{
|
||||
if( (!_texture.serviceable() && _status != STATUS_DIRTY)
|
||||
|| (_status & CREATE_FAILED) )
|
||||
return;
|
||||
|
||||
if( _status == STATUS_DIRTY )
|
||||
{
|
||||
_texture.setSize(_size_x, _size_y);
|
||||
|
||||
if( !_texture.serviceable() )
|
||||
{
|
||||
_texture.useImageCoords(true);
|
||||
_texture.useStencil(true);
|
||||
_texture.allocRT(/*_camera_callback*/);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Resizing causes a new texture to be created so we need to reapply all
|
||||
// existing placements
|
||||
reloadPlacements();
|
||||
}
|
||||
|
||||
osg::Camera* camera = _texture.getCamera();
|
||||
|
||||
osg::Vec4 clear_color(0.0f, 0.0f, 0.0f , 1.0f);
|
||||
parseColor(_node->getStringValue("background"), clear_color);
|
||||
camera->setClearColor(clear_color);
|
||||
|
||||
camera->addChild(_root_group->getMatrixTransform());
|
||||
|
||||
// Ensure objects are drawn in order of traversal
|
||||
camera->getOrCreateStateSet()->setBinName("TraversalOrderBin");
|
||||
|
||||
if( _texture.serviceable() )
|
||||
{
|
||||
setStatusFlags(STATUS_OK);
|
||||
setStatusFlags(STATUS_DIRTY, false);
|
||||
_render_dirty = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
setStatusFlags(CREATE_FAILED);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if( _visible || _render_always )
|
||||
{
|
||||
BOOST_FOREACH(CanvasWeakPtr canvas, _child_canvases)
|
||||
{
|
||||
// TODO should we check if the image the child canvas is displayed
|
||||
// within is really visible?
|
||||
if( !canvas.expired() )
|
||||
canvas.lock()->_visible = true;
|
||||
}
|
||||
|
||||
if( _render_dirty )
|
||||
{
|
||||
// Also mark all canvases this canvas is displayed within as dirty
|
||||
BOOST_FOREACH(CanvasWeakPtr canvas, _parent_canvases)
|
||||
{
|
||||
if( !canvas.expired() )
|
||||
canvas.lock()->_render_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
_texture.setRender(_render_dirty);
|
||||
|
||||
_render_dirty = false;
|
||||
_visible = false;
|
||||
}
|
||||
else
|
||||
_texture.setRender(false);
|
||||
|
||||
_root_group->update(delta_time_sec);
|
||||
|
||||
if( _sampling_dirty )
|
||||
{
|
||||
_texture.setSampling(
|
||||
_node->getBoolValue("mipmapping"),
|
||||
_node->getIntValue("coverage-samples"),
|
||||
_node->getIntValue("color-samples")
|
||||
);
|
||||
_sampling_dirty = false;
|
||||
_render_dirty = true;
|
||||
}
|
||||
|
||||
while( !_dirty_placements.empty() )
|
||||
{
|
||||
SGPropertyNode *node = _dirty_placements.back();
|
||||
_dirty_placements.pop_back();
|
||||
|
||||
if( node->getIndex() >= static_cast<int>(_placements.size()) )
|
||||
// New placement
|
||||
_placements.resize(node->getIndex() + 1);
|
||||
else
|
||||
// Remove possibly existing placements
|
||||
_placements[ node->getIndex() ].clear();
|
||||
|
||||
// Get new placements
|
||||
PlacementFactoryMap::const_iterator placement_factory =
|
||||
_placement_factories.find( node->getStringValue("type", "object") );
|
||||
if( placement_factory != _placement_factories.end() )
|
||||
{
|
||||
Placements& placements = _placements[ node->getIndex() ] =
|
||||
placement_factory->second
|
||||
(
|
||||
node,
|
||||
boost::static_pointer_cast<Canvas>(_self.lock())
|
||||
);
|
||||
node->setStringValue
|
||||
(
|
||||
"status-msg",
|
||||
placements.empty() ? "No match" : "Ok"
|
||||
);
|
||||
}
|
||||
else
|
||||
node->setStringValue("status-msg", "Unknown placement type");
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
naRef Canvas::addEventListener(const nasal::CallContext& ctx)
|
||||
{
|
||||
if( !_root_group.get() )
|
||||
naRuntimeError(ctx.c, "Canvas: No root group!");
|
||||
|
||||
return _root_group->addEventListener(ctx);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::setSizeX(int sx)
|
||||
{
|
||||
if( _size_x == sx )
|
||||
return;
|
||||
_size_x = sx;
|
||||
setStatusFlags(STATUS_DIRTY);
|
||||
|
||||
if( _size_x <= 0 )
|
||||
setStatusFlags(MISSING_SIZE_X);
|
||||
else
|
||||
setStatusFlags(MISSING_SIZE_X, false);
|
||||
|
||||
// reset flag to allow creation with new size
|
||||
setStatusFlags(CREATE_FAILED, false);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::setSizeY(int sy)
|
||||
{
|
||||
if( _size_y == sy )
|
||||
return;
|
||||
_size_y = sy;
|
||||
setStatusFlags(STATUS_DIRTY);
|
||||
|
||||
if( _size_y <= 0 )
|
||||
setStatusFlags(MISSING_SIZE_Y);
|
||||
else
|
||||
setStatusFlags(MISSING_SIZE_Y, false);
|
||||
|
||||
// reset flag to allow creation with new size
|
||||
setStatusFlags(CREATE_FAILED, false);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int Canvas::getSizeX() const
|
||||
{
|
||||
return _size_x;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int Canvas::getSizeY() const
|
||||
{
|
||||
return _size_y;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::setViewWidth(int w)
|
||||
{
|
||||
if( _view_width == w )
|
||||
return;
|
||||
_view_width = w;
|
||||
|
||||
_texture.setViewSize(_view_width, _view_height);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::setViewHeight(int h)
|
||||
{
|
||||
if( _view_height == h )
|
||||
return;
|
||||
_view_height = h;
|
||||
|
||||
_texture.setViewSize(_view_width, _view_height);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int Canvas::getViewWidth() const
|
||||
{
|
||||
return _texture.getViewSize().x();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int Canvas::getViewHeight() const
|
||||
{
|
||||
return _texture.getViewSize().y();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
SGRect<int> Canvas::getViewport() const
|
||||
{
|
||||
return SGRect<int>(0, 0, getViewWidth(), getViewHeight());
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool Canvas::handleMouseEvent(const MouseEventPtr& event)
|
||||
{
|
||||
if( !_root_group.get() )
|
||||
return false;
|
||||
|
||||
EventVisitor visitor( EventVisitor::TRAVERSE_DOWN,
|
||||
event->getClientPos(),
|
||||
event->getDelta() );
|
||||
if( !_root_group->accept(visitor) )
|
||||
return false;
|
||||
|
||||
return _event_manager->handleEvent(event, visitor.getPropagationPath());
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::childAdded( SGPropertyNode * parent,
|
||||
SGPropertyNode * child )
|
||||
{
|
||||
if( parent != _node )
|
||||
return;
|
||||
|
||||
if( child->getNameString() == "placement" )
|
||||
_dirty_placements.push_back(child);
|
||||
else if( _root_group.get() )
|
||||
static_cast<Element*>(_root_group.get())->childAdded(parent, child);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::childRemoved( SGPropertyNode * parent,
|
||||
SGPropertyNode * child )
|
||||
{
|
||||
_render_dirty = true;
|
||||
|
||||
if( parent != _node )
|
||||
return;
|
||||
|
||||
if( child->getNameString() == "placement" )
|
||||
_placements[ child->getIndex() ].clear();
|
||||
else if( _root_group.get() )
|
||||
static_cast<Element*>(_root_group.get())->childRemoved(parent, child);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::valueChanged(SGPropertyNode* node)
|
||||
{
|
||||
if( boost::starts_with(node->getNameString(), "status")
|
||||
|| node->getParent()->getNameString() == "bounding-box" )
|
||||
return;
|
||||
_render_dirty = true;
|
||||
|
||||
bool handled = true;
|
||||
if( node->getParent()->getParent() == _node
|
||||
&& node->getParent()->getNameString() == "placement" )
|
||||
{
|
||||
size_t index = node->getIndex();
|
||||
if( index < _placements.size() )
|
||||
{
|
||||
Placements& placements = _placements[index];
|
||||
if( !placements.empty() )
|
||||
{
|
||||
bool placement_dirty = false;
|
||||
BOOST_FOREACH(PlacementPtr& placement, placements)
|
||||
{
|
||||
// check if change can be directly handled by placement
|
||||
if( placement->getProps() == node->getParent()
|
||||
&& !placement->childChanged(node) )
|
||||
placement_dirty = true;
|
||||
}
|
||||
|
||||
if( !placement_dirty )
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// prevent double updates...
|
||||
for( size_t i = 0; i < _dirty_placements.size(); ++i )
|
||||
{
|
||||
if( node->getParent() == _dirty_placements[i] )
|
||||
return;
|
||||
}
|
||||
|
||||
_dirty_placements.push_back(node->getParent());
|
||||
}
|
||||
else if( node->getParent() == _node )
|
||||
{
|
||||
if( node->getNameString() == "background" )
|
||||
{
|
||||
osg::Vec4 color;
|
||||
if( _texture.getCamera() && parseColor(node->getStringValue(), color) )
|
||||
{
|
||||
_texture.getCamera()->setClearColor(color);
|
||||
_render_dirty = true;
|
||||
}
|
||||
}
|
||||
else if( node->getNameString() == "mipmapping"
|
||||
|| node->getNameString() == "coverage-samples"
|
||||
|| node->getNameString() == "color-samples" )
|
||||
{
|
||||
_sampling_dirty = true;
|
||||
}
|
||||
else if( node->getNameString() == "additive-blend" )
|
||||
{
|
||||
_texture.useAdditiveBlend( node->getBoolValue() );
|
||||
}
|
||||
else if( node->getNameString() == "render-always" )
|
||||
{
|
||||
_render_always = node->getBoolValue();
|
||||
}
|
||||
else if( node->getNameString() == "size" )
|
||||
{
|
||||
if( node->getIndex() == 0 )
|
||||
setSizeX( node->getIntValue() );
|
||||
else if( node->getIndex() == 1 )
|
||||
setSizeY( node->getIntValue() );
|
||||
}
|
||||
else if( node->getNameString() == "view" )
|
||||
{
|
||||
if( node->getIndex() == 0 )
|
||||
setViewWidth( node->getIntValue() );
|
||||
else if( node->getIndex() == 1 )
|
||||
setViewHeight( node->getIntValue() );
|
||||
}
|
||||
else if( node->getNameString() == "freeze" )
|
||||
_texture.setRender( node->getBoolValue() );
|
||||
else
|
||||
handled = false;
|
||||
}
|
||||
else
|
||||
handled = false;
|
||||
|
||||
if( !handled && _root_group.get() )
|
||||
_root_group->valueChanged(node);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
osg::Texture2D* Canvas::getTexture() const
|
||||
{
|
||||
return _texture.getTexture();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Canvas::CullCallbackPtr Canvas::getCullCallback() const
|
||||
{
|
||||
return _cull_callback;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::reloadPlacements(const std::string& type)
|
||||
{
|
||||
for(size_t i = 0; i < _placements.size(); ++i)
|
||||
{
|
||||
if( _placements[i].empty() )
|
||||
continue;
|
||||
|
||||
SGPropertyNode* child = _placements[i].front()->getProps();
|
||||
if( type.empty()
|
||||
// reload if type matches or no type specified
|
||||
|| child->getStringValue("type", type.c_str()) == type )
|
||||
{
|
||||
_dirty_placements.push_back(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::addPlacementFactory( const std::string& type,
|
||||
PlacementFactory factory )
|
||||
{
|
||||
if( _placement_factories.find(type) != _placement_factories.end() )
|
||||
SG_LOG
|
||||
(
|
||||
SG_GENERAL,
|
||||
SG_WARN,
|
||||
"Canvas::addPlacementFactory: replace existing factor for type " << type
|
||||
);
|
||||
|
||||
_placement_factories[type] = factory;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::setSelf(const PropertyBasedElementPtr& self)
|
||||
{
|
||||
PropertyBasedElement::setSelf(self);
|
||||
|
||||
CanvasPtr canvas = boost::static_pointer_cast<Canvas>(self);
|
||||
|
||||
_root_group.reset( new Group(canvas, _node) );
|
||||
_root_group->setSelf(_root_group);
|
||||
|
||||
// Remove automatically created property listener as we forward them on our
|
||||
// own
|
||||
_root_group->removeListener();
|
||||
|
||||
_cull_callback = new CullCallback(canvas);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Canvas::setStatusFlags(unsigned int flags, bool set)
|
||||
{
|
||||
if( set )
|
||||
_status |= flags;
|
||||
else
|
||||
_status &= ~flags;
|
||||
|
||||
if( (_status & MISSING_SIZE_X) && (_status & MISSING_SIZE_Y) )
|
||||
_status_msg = "Missing size";
|
||||
else if( _status & MISSING_SIZE_X )
|
||||
_status_msg = "Missing size-x";
|
||||
else if( _status & MISSING_SIZE_Y )
|
||||
_status_msg = "Missing size-y";
|
||||
else if( _status & CREATE_FAILED )
|
||||
_status_msg = "Creating render target failed";
|
||||
else if( _status == STATUS_DIRTY )
|
||||
_status_msg = "Creation pending...";
|
||||
else
|
||||
_status_msg = "Ok";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Canvas::PlacementFactoryMap Canvas::_placement_factories;
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
212
simgear/canvas/Canvas.hxx
Normal file
212
simgear/canvas/Canvas.hxx
Normal file
@@ -0,0 +1,212 @@
|
||||
// The canvas for rendering with the 2d API
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef CANVAS_HXX_
|
||||
#define CANVAS_HXX_
|
||||
|
||||
#include "canvas_fwd.hxx"
|
||||
#include "ODGauge.hxx"
|
||||
|
||||
#include <simgear/canvas/elements/CanvasGroup.hxx>
|
||||
#include <simgear/math/SGRect.hxx>
|
||||
#include <simgear/props/PropertyBasedElement.hxx>
|
||||
#include <simgear/props/propertyObject.hxx>
|
||||
#include <osg/NodeCallback>
|
||||
#include <osg/observer_ptr>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
class CanvasMgr;
|
||||
class MouseEvent;
|
||||
|
||||
class Canvas:
|
||||
public PropertyBasedElement
|
||||
{
|
||||
public:
|
||||
|
||||
enum StatusFlags
|
||||
{
|
||||
STATUS_OK,
|
||||
STATUS_DIRTY = 1,
|
||||
MISSING_SIZE_X = STATUS_DIRTY << 1,
|
||||
MISSING_SIZE_Y = MISSING_SIZE_X << 1,
|
||||
CREATE_FAILED = MISSING_SIZE_Y << 1
|
||||
};
|
||||
|
||||
/**
|
||||
* This callback is installed on every placement of the canvas in the
|
||||
* scene to only render the canvas if at least one placement is visible
|
||||
*/
|
||||
class CullCallback:
|
||||
public osg::NodeCallback
|
||||
{
|
||||
public:
|
||||
CullCallback(const CanvasWeakPtr& canvas);
|
||||
|
||||
private:
|
||||
CanvasWeakPtr _canvas;
|
||||
|
||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
|
||||
};
|
||||
typedef osg::ref_ptr<CullCallback> CullCallbackPtr;
|
||||
|
||||
Canvas(SGPropertyNode* node);
|
||||
virtual void onDestroy();
|
||||
|
||||
void setSystemAdapter(const SystemAdapterPtr& system_adapter);
|
||||
SystemAdapterPtr getSystemAdapter() const;
|
||||
|
||||
void setCanvasMgr(CanvasMgr* canvas_mgr);
|
||||
CanvasMgr* getCanvasMgr() const;
|
||||
|
||||
bool isInit() const;
|
||||
|
||||
/**
|
||||
* Add a canvas which should be marked as dirty upon any change to this
|
||||
* canvas.
|
||||
*
|
||||
* This mechanism is used to eg. redraw a canvas if it's displaying
|
||||
* another canvas (recursive canvases)
|
||||
*/
|
||||
void addParentCanvas(const CanvasWeakPtr& canvas);
|
||||
|
||||
/**
|
||||
* Add a canvas which should be marked visible if this canvas is visible.
|
||||
*/
|
||||
void addChildCanvas(const CanvasWeakPtr& canvas);
|
||||
|
||||
/**
|
||||
* Stop notifying the given canvas upon changes
|
||||
*/
|
||||
void removeParentCanvas(const CanvasWeakPtr& canvas);
|
||||
void removeChildCanvas(const CanvasWeakPtr& canvas);
|
||||
|
||||
/**
|
||||
* Create a new group
|
||||
*/
|
||||
GroupPtr createGroup(const std::string& name = "");
|
||||
|
||||
/**
|
||||
* Get an existing group with the given name
|
||||
*/
|
||||
GroupPtr getGroup(const std::string& name);
|
||||
|
||||
/**
|
||||
* Get an existing group with the given name or otherwise create a new
|
||||
* group
|
||||
*/
|
||||
GroupPtr getOrCreateGroup(const std::string& name);
|
||||
|
||||
/**
|
||||
* Get the root group of the canvas
|
||||
*/
|
||||
GroupPtr getRootGroup();
|
||||
|
||||
/**
|
||||
* Enable rendering for the next frame
|
||||
*
|
||||
* @param force Force redraw even if nothing has changed (if dirty flag
|
||||
* is not set)
|
||||
*/
|
||||
void enableRendering(bool force = false);
|
||||
|
||||
void update(double delta_time_sec);
|
||||
|
||||
naRef addEventListener(const nasal::CallContext& ctx);
|
||||
|
||||
void setSizeX(int sx);
|
||||
void setSizeY(int sy);
|
||||
|
||||
int getSizeX() const;
|
||||
int getSizeY() const;
|
||||
|
||||
void setViewWidth(int w);
|
||||
void setViewHeight(int h);
|
||||
|
||||
int getViewWidth() const;
|
||||
int getViewHeight() const;
|
||||
SGRect<int> getViewport() const;
|
||||
|
||||
bool handleMouseEvent(const MouseEventPtr& event);
|
||||
|
||||
virtual void childAdded( SGPropertyNode * parent,
|
||||
SGPropertyNode * child );
|
||||
virtual void childRemoved( SGPropertyNode * parent,
|
||||
SGPropertyNode * child );
|
||||
virtual void valueChanged (SGPropertyNode * node);
|
||||
|
||||
osg::Texture2D* getTexture() const;
|
||||
|
||||
CullCallbackPtr getCullCallback() const;
|
||||
|
||||
void reloadPlacements( const std::string& type = std::string() );
|
||||
static void addPlacementFactory( const std::string& type,
|
||||
PlacementFactory factory );
|
||||
|
||||
protected:
|
||||
|
||||
SystemAdapterPtr _system_adapter;
|
||||
CanvasMgr *_canvas_mgr;
|
||||
|
||||
std::auto_ptr<EventManager> _event_manager;
|
||||
|
||||
int _size_x,
|
||||
_size_y,
|
||||
_view_width,
|
||||
_view_height;
|
||||
|
||||
PropertyObject<int> _status;
|
||||
PropertyObject<std::string> _status_msg;
|
||||
|
||||
bool _sampling_dirty,
|
||||
_render_dirty,
|
||||
_visible;
|
||||
|
||||
ODGauge _texture;
|
||||
GroupPtr _root_group;
|
||||
|
||||
CullCallbackPtr _cull_callback;
|
||||
bool _render_always; //<! Used to disable automatic lazy rendering (culling)
|
||||
|
||||
std::vector<SGPropertyNode*> _dirty_placements;
|
||||
std::vector<Placements> _placements;
|
||||
std::set<CanvasWeakPtr> _parent_canvases, //<! Canvases showing this canvas
|
||||
_child_canvases; //<! Canvases displayed within
|
||||
// this canvas
|
||||
|
||||
typedef std::map<std::string, PlacementFactory> PlacementFactoryMap;
|
||||
static PlacementFactoryMap _placement_factories;
|
||||
|
||||
virtual void setSelf(const PropertyBasedElementPtr& self);
|
||||
void setStatusFlags(unsigned int flags, bool set = true);
|
||||
|
||||
private:
|
||||
|
||||
Canvas(const Canvas&); // = delete;
|
||||
Canvas& operator=(const Canvas&); // = delete;
|
||||
};
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
|
||||
#endif /* CANVAS_HXX_ */
|
||||
98
simgear/canvas/CanvasEvent.cxx
Normal file
98
simgear/canvas/CanvasEvent.cxx
Normal file
@@ -0,0 +1,98 @@
|
||||
// Canvas Event for event model similar to DOM Level 3 Event Model
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#include "CanvasEvent.hxx"
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Event::Event():
|
||||
type(UNKNOWN),
|
||||
propagation_stopped(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Event::~Event()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Event::Type Event::getType() const
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string Event::getTypeString() const
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
# define ENUM_MAPPING(name, str) case name: return str;
|
||||
# include "CanvasEventTypes.hxx"
|
||||
# undef ENUM_MAPPING
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ElementWeakPtr Event::getTarget() const
|
||||
{
|
||||
return target;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
double Event::getTime() const
|
||||
{
|
||||
return time;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Event::stopPropagation()
|
||||
{
|
||||
propagation_stopped = true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Event::Type Event::strToType(const std::string& str)
|
||||
{
|
||||
typedef std::map<std::string, Type> TypeMap;
|
||||
static TypeMap type_map;
|
||||
|
||||
if( type_map.empty() )
|
||||
{
|
||||
# define ENUM_MAPPING(type, str) type_map[ str ] = type;
|
||||
# include "CanvasEventTypes.hxx"
|
||||
# undef ENUM_MAPPING
|
||||
}
|
||||
|
||||
TypeMap::const_iterator it = type_map.find(str);
|
||||
if( it == type_map.end() )
|
||||
return UNKNOWN;
|
||||
|
||||
return it->second;
|
||||
}
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
70
simgear/canvas/CanvasEvent.hxx
Normal file
70
simgear/canvas/CanvasEvent.hxx
Normal file
@@ -0,0 +1,70 @@
|
||||
// Canvas Event for event model similar to DOM Level 3 Event Model
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef CANVAS_EVENT_HXX_
|
||||
#define CANVAS_EVENT_HXX_
|
||||
|
||||
#include "canvas_fwd.hxx"
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
class Event
|
||||
{
|
||||
public:
|
||||
|
||||
enum Type
|
||||
{
|
||||
UNKNOWN,
|
||||
# define ENUM_MAPPING(name, str) name,
|
||||
# include "CanvasEventTypes.hxx"
|
||||
# undef ENUM_MAPPING
|
||||
USER_TYPE ///<! first unused id to be used for user defined types (not
|
||||
/// implemented yet)
|
||||
};
|
||||
|
||||
Type type;
|
||||
ElementWeakPtr target;
|
||||
double time;
|
||||
bool propagation_stopped;
|
||||
|
||||
Event();
|
||||
|
||||
// We need a vtable to allow nasal::Ghost to determine the dynamic type
|
||||
// of the actual event instances.
|
||||
virtual ~Event();
|
||||
|
||||
Type getType() const;
|
||||
std::string getTypeString() const;
|
||||
|
||||
ElementWeakPtr getTarget() const;
|
||||
|
||||
double getTime() const;
|
||||
|
||||
void stopPropagation();
|
||||
|
||||
static Type strToType(const std::string& str);
|
||||
|
||||
};
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
|
||||
#endif /* CANVAS_EVENT_HXX_ */
|
||||
70
simgear/canvas/CanvasEventListener.cxx
Normal file
70
simgear/canvas/CanvasEventListener.cxx
Normal file
@@ -0,0 +1,70 @@
|
||||
// Listener for canvas (GUI) events being passed to a Nasal function/code
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#include "CanvasEvent.hxx"
|
||||
#include "CanvasEventListener.hxx"
|
||||
#include "CanvasSystemAdapter.hxx"
|
||||
|
||||
#include <simgear/nasal/cppbind/Ghost.hxx>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EventListener::EventListener(naRef code, const SystemAdapterPtr& sys_adapter):
|
||||
_code(code),
|
||||
_gc_key(-1),
|
||||
_sys(sys_adapter)
|
||||
{
|
||||
assert( sys_adapter );
|
||||
if( !naIsCode(code)
|
||||
&& !naIsCCode(code)
|
||||
&& !naIsFunc(code) )
|
||||
throw std::runtime_error
|
||||
(
|
||||
"canvas::EventListener: invalid function argument"
|
||||
);
|
||||
|
||||
_gc_key = sys_adapter->gcSave(_code);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EventListener::~EventListener()
|
||||
{
|
||||
assert( !_sys.expired() );
|
||||
_sys.lock()->gcRelease(_gc_key);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void EventListener::call(const canvas::EventPtr& event)
|
||||
{
|
||||
SystemAdapterPtr sys = _sys.lock();
|
||||
|
||||
naRef args[] = {
|
||||
nasal::Ghost<EventPtr>::create(sys->getNasalContext(), event)
|
||||
};
|
||||
const int num_args = sizeof(args)/sizeof(args[0]);
|
||||
|
||||
sys->callMethod(_code, naNil(), num_args, args, naNil());
|
||||
}
|
||||
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
48
simgear/canvas/CanvasEventListener.hxx
Normal file
48
simgear/canvas/CanvasEventListener.hxx
Normal file
@@ -0,0 +1,48 @@
|
||||
// Listener for canvas (GUI) events being passed to a Nasal function/code
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef CANVAS_EVENT_LISTENER_HXX_
|
||||
#define CANVAS_EVENT_LISTENER_HXX_
|
||||
|
||||
#include "canvas_fwd.hxx"
|
||||
#include <simgear/nasal/naref.h>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
class EventListener
|
||||
{
|
||||
public:
|
||||
EventListener( naRef code,
|
||||
const SystemAdapterPtr& sys_adapter );
|
||||
~EventListener();
|
||||
|
||||
void call(const canvas::EventPtr& event);
|
||||
|
||||
protected:
|
||||
naRef _code;
|
||||
int _gc_key;
|
||||
SystemAdapterWeakPtr _sys;
|
||||
};
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
|
||||
#endif /* CANVAS_EVENT_LISTENER_HXX_ */
|
||||
305
simgear/canvas/CanvasEventManager.cxx
Normal file
305
simgear/canvas/CanvasEventManager.cxx
Normal file
@@ -0,0 +1,305 @@
|
||||
// Manage event handling inside a Canvas similar to the DOM Level 3 Event Model
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#include "CanvasEventManager.hxx"
|
||||
#include "MouseEvent.hxx"
|
||||
#include <simgear/canvas/elements/CanvasElement.hxx>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
const unsigned int drag_threshold = 8;
|
||||
const double multi_click_timeout = 0.4;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EventManager::StampedPropagationPath::StampedPropagationPath():
|
||||
time(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
EventManager::StampedPropagationPath::StampedPropagationPath(
|
||||
const EventPropagationPath& path,
|
||||
double time
|
||||
):
|
||||
path(path),
|
||||
time(time)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void EventManager::StampedPropagationPath::clear()
|
||||
{
|
||||
path.clear();
|
||||
time = 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool EventManager::StampedPropagationPath::valid() const
|
||||
{
|
||||
return !path.empty() && time > 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EventManager::EventManager():
|
||||
_current_click_count(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool EventManager::handleEvent( const MouseEventPtr& event,
|
||||
const EventPropagationPath& path )
|
||||
{
|
||||
switch( event->type )
|
||||
{
|
||||
case Event::MOUSE_DOWN:
|
||||
_last_mouse_down = StampedPropagationPath(path, event->getTime());
|
||||
break;
|
||||
case Event::MOUSE_UP:
|
||||
{
|
||||
if( _last_mouse_down.path.empty() )
|
||||
// Ignore mouse up without any previous mouse down
|
||||
return false;
|
||||
|
||||
// normal mouseup
|
||||
propagateEvent(event, path);
|
||||
|
||||
// now handle click/dblclick
|
||||
if( checkClickDistance(path, _last_mouse_down.path) )
|
||||
handleClick(event, getCommonAncestor(_last_mouse_down.path, path));
|
||||
|
||||
_last_mouse_down.clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
case Event::DRAG:
|
||||
if( !_last_mouse_down.valid() )
|
||||
return false;
|
||||
else
|
||||
return propagateEvent(event, _last_mouse_down.path);
|
||||
case Event::MOUSE_MOVE:
|
||||
handleMove(event, path);
|
||||
break;
|
||||
case Event::MOUSE_LEAVE:
|
||||
// Mouse leaves window and therefore also current mouseover element
|
||||
handleMove(event, EventPropagationPath());
|
||||
return true;
|
||||
case Event::WHEEL:
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return propagateEvent(event, path);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void EventManager::handleClick( const MouseEventPtr& event,
|
||||
const EventPropagationPath& path )
|
||||
{
|
||||
MouseEventPtr click(new MouseEvent(*event));
|
||||
click->type = Event::CLICK;
|
||||
|
||||
if( event->getTime() > _last_click.time + multi_click_timeout )
|
||||
_current_click_count = 1;
|
||||
else
|
||||
{
|
||||
// Maximum current click count is 3
|
||||
_current_click_count = (_current_click_count % 3) + 1;
|
||||
|
||||
if( _current_click_count > 1 )
|
||||
{
|
||||
// Reset current click count if moved too far
|
||||
if( !checkClickDistance(path, _last_click.path) )
|
||||
_current_click_count = 1;
|
||||
}
|
||||
}
|
||||
|
||||
click->click_count = _current_click_count;
|
||||
|
||||
MouseEventPtr dbl_click;
|
||||
if( _current_click_count == 2 )
|
||||
{
|
||||
dbl_click.reset(new MouseEvent(*click));
|
||||
dbl_click->type = Event::DBL_CLICK;
|
||||
}
|
||||
|
||||
propagateEvent(click, path);
|
||||
|
||||
if( dbl_click )
|
||||
propagateEvent(dbl_click, getCommonAncestor(_last_click.path, path));
|
||||
|
||||
_last_click = StampedPropagationPath(path, event->getTime());
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void EventManager::handleMove( const MouseEventPtr& event,
|
||||
const EventPropagationPath& path )
|
||||
{
|
||||
EventPropagationPath& last_path = _last_mouse_over.path;
|
||||
if( last_path == path )
|
||||
return;
|
||||
|
||||
// Leave old element
|
||||
if( !last_path.empty() )
|
||||
{
|
||||
MouseEventPtr mouseout(new MouseEvent(*event));
|
||||
mouseout->type = Event::MOUSE_OUT;
|
||||
propagateEvent(mouseout, last_path);
|
||||
|
||||
// Send a mouseleave event to all ancestors of the currently left element
|
||||
// which are not ancestor of the new element currently entered
|
||||
EventPropagationPath path_leave = last_path;
|
||||
for(size_t i = path_leave.size() - 1; i > 0; --i)
|
||||
{
|
||||
if( i < path.size() && path[i] == path_leave[i] )
|
||||
break;
|
||||
|
||||
MouseEventPtr mouseleave(new MouseEvent(*event));
|
||||
mouseleave->type = Event::MOUSE_LEAVE;
|
||||
propagateEvent(mouseleave, path_leave);
|
||||
|
||||
path_leave.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
// Enter new element
|
||||
if( !path.empty() )
|
||||
{
|
||||
MouseEventPtr mouseover(new MouseEvent(*event));
|
||||
mouseover->type = Event::MOUSE_OVER;
|
||||
propagateEvent(mouseover, path);
|
||||
|
||||
// Send a mouseenter event to all ancestors of the currently entered
|
||||
// element which are not ancestor of the old element currently being
|
||||
// left
|
||||
EventPropagationPath path_enter;
|
||||
for(size_t i = 0; i < path.size(); ++i)
|
||||
{
|
||||
path_enter.push_back(path[i]);
|
||||
|
||||
if( i < last_path.size() && path[i] == last_path[i] )
|
||||
continue;
|
||||
|
||||
MouseEventPtr mouseenter(new MouseEvent(*event));
|
||||
mouseenter->type = Event::MOUSE_ENTER;
|
||||
propagateEvent(mouseenter, path_enter);
|
||||
}
|
||||
}
|
||||
|
||||
_last_mouse_over.path = path;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool EventManager::propagateEvent( const EventPtr& event,
|
||||
const EventPropagationPath& path )
|
||||
{
|
||||
event->target = path.back().element;
|
||||
MouseEventPtr mouse_event = boost::dynamic_pointer_cast<MouseEvent>(event);
|
||||
|
||||
// Event propagation similar to DOM Level 3 event flow:
|
||||
// http://www.w3.org/TR/DOM-Level-3-Events/#event-flow
|
||||
|
||||
// Capturing phase
|
||||
// for( EventPropagationPath::const_iterator it = path.begin();
|
||||
// it != path.end();
|
||||
// ++it )
|
||||
// {
|
||||
// if( !it->element.expired() )
|
||||
// std::cout << it->element.lock()->getProps()->getPath() << std::endl;
|
||||
// }
|
||||
|
||||
// Bubbling phase
|
||||
for( EventPropagationPath::const_reverse_iterator
|
||||
it = path.rbegin();
|
||||
it != path.rend();
|
||||
++it )
|
||||
{
|
||||
ElementPtr el = it->element.lock();
|
||||
|
||||
if( !el )
|
||||
// Ignore element if it has been destroyed while traversing the event
|
||||
// (eg. removed by another event handler)
|
||||
continue;
|
||||
|
||||
// TODO provide functions to convert delta to local coordinates on demand.
|
||||
// Maybe also provide a clone method for events as local coordinates
|
||||
// might differ between different elements receiving the same event.
|
||||
if( mouse_event ) //&& event->type != Event::DRAG )
|
||||
{
|
||||
// TODO transform pos and delta for drag events. Maybe we should just
|
||||
// store the global coordinates and convert to local coordinates
|
||||
// on demand.
|
||||
|
||||
// Position and delta are specified in local coordinate system of
|
||||
// current element
|
||||
mouse_event->local_pos = it->local_pos;
|
||||
//mouse_event->delta = it->local_delta;
|
||||
}
|
||||
|
||||
el->handleEvent(event);
|
||||
|
||||
if( event->propagation_stopped )
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
EventManager::checkClickDistance( const EventPropagationPath& path1,
|
||||
const EventPropagationPath& path2 ) const
|
||||
{
|
||||
osg::Vec2 delta = path1.front().local_pos - path2.front().local_pos;
|
||||
return delta.x() < drag_threshold
|
||||
&& delta.y() < drag_threshold;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EventPropagationPath
|
||||
EventManager::getCommonAncestor( const EventPropagationPath& path1,
|
||||
const EventPropagationPath& path2 ) const
|
||||
{
|
||||
if( path1.empty() || path2.empty() )
|
||||
return EventPropagationPath();
|
||||
|
||||
if( path1.back().element.lock() == path2.back().element.lock() )
|
||||
return path2;
|
||||
|
||||
EventPropagationPath path;
|
||||
|
||||
for( size_t i = 0; i < path1.size() && i < path2.size(); ++i )
|
||||
{
|
||||
if( path1[i].element.lock() != path2[i].element.lock() )
|
||||
break;
|
||||
|
||||
path.push_back(path2[i]);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
100
simgear/canvas/CanvasEventManager.hxx
Normal file
100
simgear/canvas/CanvasEventManager.hxx
Normal file
@@ -0,0 +1,100 @@
|
||||
// Manage event handling inside a Canvas similar to the DOM Level 3 Event Model
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef CANVAS_EVENT_MANAGER_HXX_
|
||||
#define CANVAS_EVENT_MANAGER_HXX_
|
||||
|
||||
#include "canvas_fwd.hxx"
|
||||
#include <deque>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
struct EventTarget
|
||||
{
|
||||
ElementWeakPtr element;
|
||||
osg::Vec2f local_pos,
|
||||
local_delta;
|
||||
};
|
||||
typedef std::deque<EventTarget> EventPropagationPath;
|
||||
inline bool operator==(const EventTarget& t1, const EventTarget& t2)
|
||||
{
|
||||
return t1.element.lock() == t2.element.lock();
|
||||
}
|
||||
|
||||
class EventManager
|
||||
{
|
||||
public:
|
||||
EventManager();
|
||||
|
||||
bool handleEvent( const MouseEventPtr& event,
|
||||
const EventPropagationPath& path );
|
||||
|
||||
protected:
|
||||
struct StampedPropagationPath
|
||||
{
|
||||
StampedPropagationPath();
|
||||
StampedPropagationPath(const EventPropagationPath& path, double time);
|
||||
|
||||
void clear();
|
||||
bool valid() const;
|
||||
|
||||
EventPropagationPath path;
|
||||
double time;
|
||||
};
|
||||
|
||||
// TODO if we really need the paths modify to not copy around the paths
|
||||
// that much.
|
||||
StampedPropagationPath _last_mouse_down,
|
||||
_last_click,
|
||||
_last_mouse_over;
|
||||
size_t _current_click_count;
|
||||
|
||||
/**
|
||||
* Propagate click event and handle multi-click (eg. create dblclick)
|
||||
*/
|
||||
void handleClick( const MouseEventPtr& event,
|
||||
const EventPropagationPath& path );
|
||||
|
||||
/**
|
||||
* Handle mouseover/enter/out/leave
|
||||
*/
|
||||
void handleMove( const MouseEventPtr& event,
|
||||
const EventPropagationPath& path );
|
||||
|
||||
bool propagateEvent( const EventPtr& event,
|
||||
const EventPropagationPath& path );
|
||||
|
||||
/**
|
||||
* Check if two click events (either mousedown/up or two consecutive
|
||||
* clicks) are inside a maximum distance to still create a click or
|
||||
* dblclick event respectively.
|
||||
*/
|
||||
bool checkClickDistance( const EventPropagationPath& path1,
|
||||
const EventPropagationPath& path2 ) const;
|
||||
EventPropagationPath
|
||||
getCommonAncestor( const EventPropagationPath& path1,
|
||||
const EventPropagationPath& path2 ) const;
|
||||
};
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
|
||||
#endif /* CANVAS_EVENT_MANAGER_HXX_ */
|
||||
33
simgear/canvas/CanvasEventTypes.hxx
Normal file
33
simgear/canvas/CanvasEventTypes.hxx
Normal file
@@ -0,0 +1,33 @@
|
||||
// Mapping between canvas gui Event types and their names
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef ENUM_MAPPING
|
||||
# error "Don't include this file directly!"
|
||||
#endif
|
||||
|
||||
ENUM_MAPPING(MOUSE_DOWN, "mousedown")
|
||||
ENUM_MAPPING(MOUSE_UP, "mouseup")
|
||||
ENUM_MAPPING(CLICK, "click")
|
||||
ENUM_MAPPING(DBL_CLICK, "dblclick")
|
||||
ENUM_MAPPING(DRAG, "drag")
|
||||
ENUM_MAPPING(WHEEL, "wheel")
|
||||
ENUM_MAPPING(MOUSE_MOVE, "mousemove")
|
||||
ENUM_MAPPING(MOUSE_OVER, "mouseover")
|
||||
ENUM_MAPPING(MOUSE_OUT, "mouseout")
|
||||
ENUM_MAPPING(MOUSE_ENTER, "mouseenter")
|
||||
ENUM_MAPPING(MOUSE_LEAVE, "mouseleave")
|
||||
106
simgear/canvas/CanvasEventVisitor.cxx
Normal file
106
simgear/canvas/CanvasEventVisitor.cxx
Normal file
@@ -0,0 +1,106 @@
|
||||
// Visitor for traversing a canvas element hierarchy similar to the traversal
|
||||
// of the DOM Level 3 Event Model
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#include "CanvasEvent.hxx"
|
||||
#include "CanvasEventVisitor.hxx"
|
||||
#include <simgear/canvas/elements/CanvasElement.hxx>
|
||||
#include <iostream>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EventVisitor::EventVisitor( TraverseMode mode,
|
||||
const osg::Vec2f& pos,
|
||||
const osg::Vec2f& delta ):
|
||||
_traverse_mode( mode )
|
||||
{
|
||||
if( mode == TRAVERSE_DOWN )
|
||||
{
|
||||
EventTarget target = {ElementWeakPtr(), pos, delta};
|
||||
_target_path.push_back(target);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EventVisitor::~EventVisitor()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool EventVisitor::traverse(Element& el)
|
||||
{
|
||||
if( _traverse_mode == TRAVERSE_UP )
|
||||
return el.ascend(*this);
|
||||
else
|
||||
return el.traverse(*this);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool EventVisitor::apply(Element& el)
|
||||
{
|
||||
// We only need to check for hits while traversing down
|
||||
if( _traverse_mode == TRAVERSE_DOWN )
|
||||
{
|
||||
// Transform event to local coordinates
|
||||
const osg::Matrix& m = el.getMatrixTransform()->getInverseMatrix();
|
||||
const osg::Vec2f& pos = _target_path.back().local_pos;
|
||||
const osg::Vec2f local_pos
|
||||
(
|
||||
m(0, 0) * pos[0] + m(1, 0) * pos[1] + m(3, 0),
|
||||
m(0, 1) * pos[0] + m(1, 1) * pos[1] + m(3, 1)
|
||||
);
|
||||
|
||||
// Don't check collision with root element (2nd element in _target_path)
|
||||
// do event listeners attached to the canvas itself (its root group)
|
||||
// always get called even if no element has been hit.
|
||||
if( _target_path.size() > 1 && !el.hitBound(pos, local_pos) )
|
||||
return false;
|
||||
|
||||
const osg::Vec2f& delta = _target_path.back().local_delta;
|
||||
const osg::Vec2f local_delta
|
||||
(
|
||||
m(0, 0) * delta[0] + m(1, 0) * delta[1],
|
||||
m(0, 1) * delta[0] + m(1, 1) * delta[1]
|
||||
);
|
||||
|
||||
EventTarget target = {el.getWeakPtr(), local_pos, local_delta};
|
||||
_target_path.push_back(target);
|
||||
|
||||
if( el.traverse(*this) || _target_path.size() <= 2 )
|
||||
return true;
|
||||
|
||||
_target_path.pop_back();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return el.ascend(*this);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const EventPropagationPath& EventVisitor::getPropagationPath() const
|
||||
{
|
||||
return _target_path;
|
||||
}
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
61
simgear/canvas/CanvasEventVisitor.hxx
Normal file
61
simgear/canvas/CanvasEventVisitor.hxx
Normal file
@@ -0,0 +1,61 @@
|
||||
// Visitor for traversing a canvas element hierarchy similar to the traversal
|
||||
// of the DOM Level 3 Event Model
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef CANVAS_EVENT_VISITOR_HXX_
|
||||
#define CANVAS_EVENT_VISITOR_HXX_
|
||||
|
||||
#include "canvas_fwd.hxx"
|
||||
#include "CanvasEventManager.hxx"
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
class EventVisitor
|
||||
{
|
||||
public:
|
||||
|
||||
enum TraverseMode
|
||||
{
|
||||
TRAVERSE_UP,
|
||||
TRAVERSE_DOWN
|
||||
};
|
||||
|
||||
EventVisitor( TraverseMode mode,
|
||||
const osg::Vec2f& pos,
|
||||
const osg::Vec2f& delta );
|
||||
virtual ~EventVisitor();
|
||||
virtual bool traverse(Element& el);
|
||||
virtual bool apply(Element& el);
|
||||
|
||||
const EventPropagationPath& getPropagationPath() const;
|
||||
|
||||
protected:
|
||||
|
||||
TraverseMode _traverse_mode;
|
||||
EventPropagationPath _target_path;
|
||||
|
||||
};
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
|
||||
|
||||
#endif /* CANVAS_EVENTVISITOR_HXX_ */
|
||||
73
simgear/canvas/CanvasMgr.cxx
Normal file
73
simgear/canvas/CanvasMgr.cxx
Normal file
@@ -0,0 +1,73 @@
|
||||
// Canvas with 2D rendering API
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#include "CanvasMgr.hxx"
|
||||
#include "Canvas.hxx"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
/**
|
||||
* Canvas factory
|
||||
*/
|
||||
CanvasPtr canvasFactory(SGPropertyNode* node)
|
||||
{
|
||||
return CanvasPtr(new Canvas(node));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
CanvasMgr::CanvasMgr( SGPropertyNode_ptr node,
|
||||
SystemAdapterPtr system_adapter ):
|
||||
PropertyBasedMgr(node, "texture", &canvasFactory),
|
||||
_system_adapter(system_adapter)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
CanvasPtr CanvasMgr::createCanvas(const std::string& name)
|
||||
{
|
||||
return boost::static_pointer_cast<Canvas>( createElement(name) );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
CanvasPtr CanvasMgr::getCanvas(size_t index) const
|
||||
{
|
||||
return boost::static_pointer_cast<Canvas>( getElement(index) );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
CanvasPtr CanvasMgr::getCanvas(const std::string& name) const
|
||||
{
|
||||
return boost::static_pointer_cast<Canvas>( getElement(name) );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void CanvasMgr::elementCreated(PropertyBasedElementPtr element)
|
||||
{
|
||||
CanvasPtr canvas = boost::static_pointer_cast<Canvas>(element);
|
||||
canvas->setSystemAdapter(_system_adapter);
|
||||
canvas->setCanvasMgr(this);
|
||||
}
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
76
simgear/canvas/CanvasMgr.hxx
Normal file
76
simgear/canvas/CanvasMgr.hxx
Normal file
@@ -0,0 +1,76 @@
|
||||
// Canvas with 2D rendering API
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef SG_CANVAS_MGR_H_
|
||||
#define SG_CANVAS_MGR_H_
|
||||
|
||||
#include "canvas_fwd.hxx"
|
||||
#include <simgear/props/PropertyBasedMgr.hxx>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
class CanvasMgr:
|
||||
public PropertyBasedMgr
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* @param node Root node of branch used to control canvasses
|
||||
* @param system_adapter Adapter for connecting between canvas and
|
||||
* application framework
|
||||
*
|
||||
*/
|
||||
CanvasMgr( SGPropertyNode_ptr node,
|
||||
SystemAdapterPtr system_adapter );
|
||||
|
||||
/**
|
||||
* Create a new canvas
|
||||
*
|
||||
* @param name Name of the new canvas
|
||||
*/
|
||||
CanvasPtr createCanvas(const std::string& name = "");
|
||||
|
||||
/**
|
||||
* Get ::Canvas by index
|
||||
*
|
||||
* @param index Index of texture node in /canvas/by-index/
|
||||
*/
|
||||
CanvasPtr getCanvas(size_t index) const;
|
||||
|
||||
/**
|
||||
* Get ::Canvas by name
|
||||
*
|
||||
* @param name Value of child node "name" in
|
||||
* /canvas/by-index/texture[i]/name
|
||||
*/
|
||||
CanvasPtr getCanvas(const std::string& name) const;
|
||||
|
||||
protected:
|
||||
|
||||
SystemAdapterPtr _system_adapter;
|
||||
|
||||
virtual void elementCreated(PropertyBasedElementPtr element);
|
||||
};
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
|
||||
#endif /* SG_CANVAS_MGR_H_ */
|
||||
244
simgear/canvas/CanvasObjectPlacement.cxx
Normal file
244
simgear/canvas/CanvasObjectPlacement.cxx
Normal file
@@ -0,0 +1,244 @@
|
||||
// Canvas placement for placing a canvas texture onto osg objects.
|
||||
//
|
||||
// It also provides a SGPickCallback for passing mouse events to the canvas and
|
||||
// manages emissive lighting of the placed canvas.
|
||||
//
|
||||
// Copyright (C) 2013 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#include "Canvas.hxx"
|
||||
#include "CanvasObjectPlacement.hxx"
|
||||
#include "MouseEvent.hxx"
|
||||
|
||||
#include <simgear/props/props.hxx>
|
||||
#include <simgear/scene/util/SGPickCallback.hxx>
|
||||
|
||||
#include <osgGA/GUIEventAdapter>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
/**
|
||||
* Handle picking events on object with a canvas placed onto
|
||||
*/
|
||||
class ObjectPickCallback:
|
||||
public SGPickCallback
|
||||
{
|
||||
public:
|
||||
|
||||
ObjectPickCallback(const CanvasWeakPtr& canvas):
|
||||
_canvas(canvas)
|
||||
{}
|
||||
|
||||
virtual bool needsUV() const { return true; }
|
||||
|
||||
virtual bool buttonPressed( int,
|
||||
const osgGA::GUIEventAdapter& ea,
|
||||
const Info& info )
|
||||
{
|
||||
MouseEventPtr event(new MouseEvent(ea));
|
||||
updatePosFromUV(event, info.uv);
|
||||
|
||||
if( ea.getEventType() == osgGA::GUIEventAdapter::SCROLL )
|
||||
{
|
||||
event->type = Event::WHEEL;
|
||||
event->delta.set(0,0);
|
||||
switch( ea.getScrollingMotion() )
|
||||
{
|
||||
case osgGA::GUIEventAdapter::SCROLL_UP:
|
||||
event->delta.y() = 1;
|
||||
break;
|
||||
case osgGA::GUIEventAdapter::SCROLL_DOWN:
|
||||
event->delta.y() = -1;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
event->type = Event::MOUSE_DOWN;
|
||||
}
|
||||
|
||||
return handleEvent(event);
|
||||
}
|
||||
|
||||
virtual void buttonReleased( int,
|
||||
const osgGA::GUIEventAdapter& ea,
|
||||
const Info* info )
|
||||
{
|
||||
if( ea.getEventType() != osgGA::GUIEventAdapter::RELEASE )
|
||||
return;
|
||||
|
||||
MouseEventPtr event(new MouseEvent(ea));
|
||||
event->type = Event::MOUSE_UP;
|
||||
updatePosFromUV(event, info ? info->uv : SGVec2d(-1,-1));
|
||||
|
||||
handleEvent(event);
|
||||
}
|
||||
|
||||
virtual void mouseMoved( const osgGA::GUIEventAdapter& ea,
|
||||
const Info* info )
|
||||
{
|
||||
// drag (currently only with LMB)
|
||||
if( ea.getEventType() != osgGA::GUIEventAdapter::DRAG )
|
||||
return;
|
||||
|
||||
MouseEventPtr event(new MouseEvent(ea));
|
||||
event->type = Event::DRAG;
|
||||
updatePosFromUV(event, info ? info->uv : SGVec2d(-1,-1));
|
||||
|
||||
handleEvent(event);
|
||||
}
|
||||
|
||||
virtual bool hover( const osg::Vec2d& windowPos,
|
||||
const Info& info )
|
||||
{
|
||||
// TODO somehow get more info about event (time, modifiers, pressed
|
||||
// buttons, ...)
|
||||
MouseEventPtr event(new MouseEvent);
|
||||
event->type = Event::MOUSE_MOVE;
|
||||
event->screen_pos = windowPos;
|
||||
updatePosFromUV(event, info.uv);
|
||||
|
||||
return handleEvent(event);
|
||||
}
|
||||
|
||||
virtual void mouseLeave( const osg::Vec2d& windowPos )
|
||||
{
|
||||
MouseEventPtr event(new MouseEvent);
|
||||
event->type = Event::MOUSE_LEAVE;
|
||||
event->screen_pos = windowPos;
|
||||
|
||||
handleEvent(event);
|
||||
}
|
||||
|
||||
protected:
|
||||
CanvasWeakPtr _canvas;
|
||||
osg::Vec2f _last_pos,
|
||||
_last_delta;
|
||||
|
||||
void updatePosFromUV(const MouseEventPtr& event, const SGVec2d& uv)
|
||||
{
|
||||
CanvasPtr canvas = _canvas.lock();
|
||||
if( !canvas )
|
||||
return;
|
||||
|
||||
osg::Vec2d pos( uv.x() * canvas->getViewWidth(),
|
||||
(1 - uv.y()) * canvas->getViewHeight() );
|
||||
|
||||
_last_delta = pos - _last_pos;
|
||||
_last_pos = pos;
|
||||
|
||||
event->client_pos = pos;
|
||||
event->delta = _last_delta;
|
||||
}
|
||||
|
||||
bool handleEvent(const MouseEventPtr& event)
|
||||
{
|
||||
CanvasPtr canvas = _canvas.lock();
|
||||
if( !canvas )
|
||||
return false;
|
||||
|
||||
return canvas->handleMouseEvent(event);
|
||||
}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ObjectPlacement::ObjectPlacement( SGPropertyNode* node,
|
||||
const GroupPtr& group,
|
||||
const CanvasWeakPtr& canvas ):
|
||||
Placement(node),
|
||||
_group(group),
|
||||
_canvas(canvas)
|
||||
{
|
||||
// TODO make more generic and extendable for more properties
|
||||
if( node->hasValue("emission") )
|
||||
setEmission( node->getFloatValue("emission") );
|
||||
if( node->hasValue("capture-events") )
|
||||
setCaptureEvents( node->getBoolValue("capture-events") );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ObjectPlacement::~ObjectPlacement()
|
||||
{
|
||||
assert( _group->getNumChildren() == 1 );
|
||||
osg::Node *child = _group->getChild(0);
|
||||
|
||||
if( _group->getNumParents() )
|
||||
{
|
||||
osg::Group *parent = _group->getParent(0);
|
||||
parent->addChild(child);
|
||||
parent->removeChild(_group);
|
||||
}
|
||||
|
||||
_group->removeChild(child);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ObjectPlacement::setEmission(float emit)
|
||||
{
|
||||
emit = SGMiscf::clip(emit, 0, 1);
|
||||
|
||||
if( !_material )
|
||||
{
|
||||
_material = new osg::Material;
|
||||
_material->setColorMode(osg::Material::OFF);
|
||||
_material->setDataVariance(osg::Object::DYNAMIC);
|
||||
_group->getOrCreateStateSet()
|
||||
->setAttribute(_material, ( osg::StateAttribute::ON
|
||||
| osg::StateAttribute::OVERRIDE ) );
|
||||
}
|
||||
|
||||
_material->setEmission(
|
||||
osg::Material::FRONT_AND_BACK,
|
||||
osg::Vec4(emit, emit, emit, emit)
|
||||
);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ObjectPlacement::setCaptureEvents(bool enable)
|
||||
{
|
||||
if( !enable && _scene_user_data )
|
||||
return;
|
||||
|
||||
if( enable && !_pick_cb )
|
||||
_pick_cb = new ObjectPickCallback(_canvas);
|
||||
|
||||
_scene_user_data = SGSceneUserData::getOrCreateSceneUserData(_group);
|
||||
_scene_user_data->setPickCallback(enable ? _pick_cb.get() : 0);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool ObjectPlacement::childChanged(SGPropertyNode* node)
|
||||
{
|
||||
if( node->getParent() != _node )
|
||||
return false;
|
||||
|
||||
if( node->getNameString() == "emission" )
|
||||
setEmission( node->getFloatValue() );
|
||||
else if( node->getNameString() == "capture-events" )
|
||||
setCaptureEvents( node->getBoolValue() );
|
||||
else
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
75
simgear/canvas/CanvasObjectPlacement.hxx
Normal file
75
simgear/canvas/CanvasObjectPlacement.hxx
Normal file
@@ -0,0 +1,75 @@
|
||||
// Canvas placement for placing a canvas texture onto osg objects.
|
||||
//
|
||||
// It also provides a SGPickCallback for passing mouse events to the canvas and
|
||||
// manages emissive lighting of the placed canvas.
|
||||
//
|
||||
// Copyright (C) 2013 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef CANVAS_PICK_PLACEMENT_HXX_
|
||||
#define CANVAS_OBJECT_PLACEMENT_HXX_
|
||||
|
||||
#include "CanvasPlacement.hxx"
|
||||
#include "canvas_fwd.hxx"
|
||||
|
||||
#include <simgear/scene/util/SGSceneUserData.hxx>
|
||||
#include <osg/Material>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
class ObjectPlacement:
|
||||
public Placement
|
||||
{
|
||||
public:
|
||||
|
||||
typedef osg::ref_ptr<osg::Group> GroupPtr;
|
||||
typedef osg::ref_ptr<osg::Material> MaterialPtr;
|
||||
|
||||
ObjectPlacement( SGPropertyNode* node,
|
||||
const GroupPtr& group,
|
||||
const CanvasWeakPtr& canvas );
|
||||
virtual ~ObjectPlacement();
|
||||
|
||||
/**
|
||||
* Set emissive lighting of the object the canvas is placed on.
|
||||
*/
|
||||
void setEmission(float emit);
|
||||
|
||||
/**
|
||||
* Set whether pick events should be captured.
|
||||
*/
|
||||
void setCaptureEvents(bool enable);
|
||||
|
||||
virtual bool childChanged(SGPropertyNode* child);
|
||||
|
||||
protected:
|
||||
typedef SGSharedPtr<SGPickCallback> PickCallbackPtr;
|
||||
typedef osg::ref_ptr<SGSceneUserData> SGSceneUserDataPtr;
|
||||
|
||||
GroupPtr _group;
|
||||
MaterialPtr _material;
|
||||
CanvasWeakPtr _canvas;
|
||||
PickCallbackPtr _pick_cb;
|
||||
SGSceneUserDataPtr _scene_user_data;
|
||||
};
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
|
||||
#endif /* CANVAS_PICK_PLACEMENT_HXX_ */
|
||||
59
simgear/canvas/CanvasPlacement.cxx
Normal file
59
simgear/canvas/CanvasPlacement.cxx
Normal file
@@ -0,0 +1,59 @@
|
||||
// Base class for canvas placements
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#include "CanvasPlacement.hxx"
|
||||
#include <simgear/props/props.hxx>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Placement::Placement(SGPropertyNode* node):
|
||||
_node(node)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Placement::~Placement()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
SGConstPropertyNode_ptr Placement::getProps() const
|
||||
{
|
||||
return _node;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
SGPropertyNode_ptr Placement::getProps()
|
||||
{
|
||||
return _node;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool Placement::childChanged(SGPropertyNode* child)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
51
simgear/canvas/CanvasPlacement.hxx
Normal file
51
simgear/canvas/CanvasPlacement.hxx
Normal file
@@ -0,0 +1,51 @@
|
||||
// Base class for canvas placements
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef CANVAS_PLACEMENT_HXX_
|
||||
#define CANVAS_PLACEMENT_HXX_
|
||||
|
||||
#include <simgear/props/propsfwd.hxx>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
class Placement
|
||||
{
|
||||
public:
|
||||
Placement(SGPropertyNode* node);
|
||||
virtual ~Placement() = 0;
|
||||
|
||||
SGConstPropertyNode_ptr getProps() const;
|
||||
SGPropertyNode_ptr getProps();
|
||||
|
||||
virtual bool childChanged(SGPropertyNode* child);
|
||||
|
||||
protected:
|
||||
SGPropertyNode_ptr _node;
|
||||
|
||||
private:
|
||||
Placement(const Placement&) /* = delete */;
|
||||
Placement& operator=(const Placement&) /* = delete */;
|
||||
};
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
|
||||
#endif /* CANVAS_PLACEMENT_HXX_ */
|
||||
67
simgear/canvas/CanvasSystemAdapter.hxx
Normal file
67
simgear/canvas/CanvasSystemAdapter.hxx
Normal file
@@ -0,0 +1,67 @@
|
||||
// Adapter for using the canvas with different applications
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef SG_CANVAS_SYSTEM_ADAPTER_HXX_
|
||||
#define SG_CANVAS_SYSTEM_ADAPTER_HXX_
|
||||
|
||||
#include "canvas_fwd.hxx"
|
||||
#include <simgear/nasal/nasal.h>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
class SystemAdapter
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~SystemAdapter() {}
|
||||
virtual FontPtr getFont(const std::string& name) const = 0;
|
||||
virtual void addCamera(osg::Camera* camera) const = 0;
|
||||
virtual void removeCamera(osg::Camera* camera) const = 0;
|
||||
virtual osg::Image* getImage(const std::string& path) const = 0;
|
||||
|
||||
virtual naContext getNasalContext() const = 0;
|
||||
|
||||
/**
|
||||
* Save passed reference to Nasal object from being deleted by the
|
||||
* garbage collector.
|
||||
*/
|
||||
virtual int gcSave(naRef r) = 0;
|
||||
|
||||
/**
|
||||
* Release an object previously passed to ::gcSave to allow it being
|
||||
* cleaned up by the garbage collector.
|
||||
*/
|
||||
virtual void gcRelease(int key) = 0;
|
||||
|
||||
/**
|
||||
* Call a Nasal function with the given environment and arguments.
|
||||
*/
|
||||
virtual naRef callMethod( naRef code,
|
||||
naRef self,
|
||||
int argc,
|
||||
naRef* args,
|
||||
naRef locals ) = 0;
|
||||
};
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
|
||||
#endif /* SG_CANVAS_SYSTEM_ADAPTER_HXX_ */
|
||||
82
simgear/canvas/MouseEvent.hxx
Normal file
82
simgear/canvas/MouseEvent.hxx
Normal file
@@ -0,0 +1,82 @@
|
||||
// Mouse event
|
||||
//
|
||||
// Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef CANVAS_MOUSE_EVENT_HXX_
|
||||
#define CANVAS_MOUSE_EVENT_HXX_
|
||||
|
||||
#include "CanvasEvent.hxx"
|
||||
#include <osgGA/GUIEventAdapter>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
class MouseEvent:
|
||||
public Event
|
||||
{
|
||||
public:
|
||||
MouseEvent():
|
||||
button(-1),
|
||||
state(-1),
|
||||
mod(-1),
|
||||
click_count(0)
|
||||
{}
|
||||
|
||||
MouseEvent(const osgGA::GUIEventAdapter& ea):
|
||||
button(ea.getButton()),
|
||||
state(ea.getButtonMask()),
|
||||
mod(ea.getModKeyMask()),
|
||||
click_count(0)
|
||||
{
|
||||
time = ea.getTime();
|
||||
}
|
||||
|
||||
osg::Vec2f getScreenPos() const { return screen_pos; }
|
||||
osg::Vec2f getClientPos() const { return client_pos; }
|
||||
osg::Vec2f getLocalPos() const { return local_pos; }
|
||||
osg::Vec2f getDelta() const { return delta; }
|
||||
|
||||
float getScreenX() const { return screen_pos.x(); }
|
||||
float getScreenY() const { return screen_pos.y(); }
|
||||
|
||||
float getClientX() const { return client_pos.x(); }
|
||||
float getClientY() const { return client_pos.y(); }
|
||||
|
||||
float getLocalX() const { return local_pos.x(); }
|
||||
float getLocalY() const { return local_pos.y(); }
|
||||
|
||||
float getDeltaX() const { return delta.x(); }
|
||||
float getDeltaY() const { return delta.y(); }
|
||||
|
||||
int getCurrentClickCount() const { return click_count; }
|
||||
|
||||
osg::Vec2f screen_pos, //<! Position in screen coordinates
|
||||
client_pos, //<! Position in window/canvas coordinates
|
||||
local_pos, //<! Position in local/element coordinates
|
||||
delta;
|
||||
int button, //<! Button for this event
|
||||
state, //<! Current button state
|
||||
mod, //<! Keyboard modifier state
|
||||
click_count; //<! Current click count
|
||||
};
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
|
||||
#endif /* CANVAS_MOUSE_EVENT_HXX_ */
|
||||
331
simgear/canvas/ODGauge.cxx
Normal file
331
simgear/canvas/ODGauge.cxx
Normal file
@@ -0,0 +1,331 @@
|
||||
// Owner Drawn Gauge helper class
|
||||
//
|
||||
// Written by Harald JOHNSEN, started May 2005.
|
||||
//
|
||||
// Copyright (C) 2005 Harald JOHNSEN
|
||||
//
|
||||
// Ported to OSG by Tim Moore - Jun 2007
|
||||
//
|
||||
// Heavily modified to be usable for the 2d Canvas by Thomas Geymayer - April 2012
|
||||
// Supports now multisampling/mipmapping, usage of the stencil buffer and placing
|
||||
// the texture in the scene by certain filter criteria
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <simgear_config.h>
|
||||
#endif
|
||||
|
||||
#include "ODGauge.hxx"
|
||||
#include "CanvasSystemAdapter.hxx"
|
||||
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
#include <simgear/scene/util/RenderConstants.hxx>
|
||||
|
||||
#include <osg/Texture2D>
|
||||
#include <osg/AlphaFunc>
|
||||
#include <osg/BlendFunc>
|
||||
#include <osg/Camera>
|
||||
#include <osg/Matrix>
|
||||
#include <osg/PolygonMode>
|
||||
#include <osg/ShadeModel>
|
||||
#include <osg/StateSet>
|
||||
#include <osg/FrameBufferObject> // for GL_DEPTH_STENCIL_EXT on Windows
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ODGauge::ODGauge():
|
||||
_size_x( -1 ),
|
||||
_size_y( -1 ),
|
||||
_view_width( -1 ),
|
||||
_view_height( -1 ),
|
||||
_flags(0),
|
||||
_coverage_samples( 0 ),
|
||||
_color_samples( 0 )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ODGauge::~ODGauge()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::setSystemAdapter(const SystemAdapterPtr& system_adapter)
|
||||
{
|
||||
_system_adapter = system_adapter;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::setSize(int size_x, int size_y)
|
||||
{
|
||||
_size_x = size_x;
|
||||
_size_y = size_y < 0 ? size_x : size_y;
|
||||
|
||||
if( serviceable() )
|
||||
reinit();
|
||||
else if( texture )
|
||||
texture->setTextureSize(_size_x, _size_y);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::setViewSize(int width, int height)
|
||||
{
|
||||
_view_width = width;
|
||||
_view_height = height < 0 ? width : height;
|
||||
|
||||
if( camera )
|
||||
updateCoordinateFrame();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
osg::Vec2s ODGauge::getViewSize() const
|
||||
{
|
||||
return osg::Vec2s(_view_width, _view_height);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::useImageCoords(bool use)
|
||||
{
|
||||
if( updateFlag(USE_IMAGE_COORDS, use) && texture )
|
||||
updateCoordinateFrame();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::useStencil(bool use)
|
||||
{
|
||||
if( updateFlag(USE_STENCIL, use) && texture )
|
||||
updateStencil();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::useAdditiveBlend(bool use)
|
||||
{
|
||||
if( updateFlag(USE_ADDITIVE_BLEND, use) && camera )
|
||||
updateBlendMode();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::setSampling( bool mipmapping,
|
||||
int coverage_samples,
|
||||
int color_samples )
|
||||
{
|
||||
if( !updateFlag(USE_MIPMAPPING, mipmapping)
|
||||
&& _coverage_samples == coverage_samples
|
||||
&& _color_samples == color_samples )
|
||||
return;
|
||||
|
||||
if( color_samples > coverage_samples )
|
||||
{
|
||||
SG_LOG
|
||||
(
|
||||
SG_GL,
|
||||
SG_WARN,
|
||||
"ODGauge::setSampling: color_samples > coverage_samples not allowed!"
|
||||
);
|
||||
color_samples = coverage_samples;
|
||||
}
|
||||
|
||||
_coverage_samples = coverage_samples;
|
||||
_color_samples = color_samples;
|
||||
|
||||
updateSampling();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::setRender(bool render)
|
||||
{
|
||||
// Only the far camera should trigger this texture to be rendered.
|
||||
camera->setNodeMask(render ? simgear::BACKGROUND_BIT : 0);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool ODGauge::serviceable() const
|
||||
{
|
||||
return _flags & AVAILABLE;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::allocRT(osg::NodeCallback* camera_cull_callback)
|
||||
{
|
||||
camera = new osg::Camera;
|
||||
camera->setDataVariance(osg::Object::DYNAMIC);
|
||||
camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
|
||||
camera->setRenderOrder(osg::Camera::PRE_RENDER);
|
||||
camera->setClearColor(osg::Vec4(0.0f, 0.0f, 0.0f , 0.0f));
|
||||
camera->setClearStencil(0);
|
||||
camera->setRenderTargetImplementation( osg::Camera::FRAME_BUFFER_OBJECT,
|
||||
osg::Camera::FRAME_BUFFER );
|
||||
|
||||
if( camera_cull_callback )
|
||||
camera->setCullCallback(camera_cull_callback);
|
||||
|
||||
setRender(true);
|
||||
updateCoordinateFrame();
|
||||
updateStencil();
|
||||
|
||||
osg::StateSet* stateSet = camera->getOrCreateStateSet();
|
||||
stateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
|
||||
stateSet->setMode(GL_CULL_FACE, osg::StateAttribute::OFF);
|
||||
stateSet->setMode(GL_FOG, osg::StateAttribute::OFF);
|
||||
stateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF);
|
||||
stateSet->setAttributeAndModes(
|
||||
new osg::PolygonMode( osg::PolygonMode::FRONT_AND_BACK,
|
||||
osg::PolygonMode::FILL ),
|
||||
osg::StateAttribute::ON );
|
||||
stateSet->setAttributeAndModes(
|
||||
new osg::AlphaFunc(osg::AlphaFunc::GREATER, 0.001f),
|
||||
osg::StateAttribute::ON );
|
||||
stateSet->setAttribute(new osg::ShadeModel(osg::ShadeModel::FLAT));
|
||||
|
||||
if( !texture )
|
||||
{
|
||||
texture = new osg::Texture2D;
|
||||
texture->setResizeNonPowerOfTwoHint(false);
|
||||
texture->setTextureSize(_size_x, _size_y);
|
||||
texture->setInternalFormat(GL_RGBA);
|
||||
}
|
||||
|
||||
updateSampling();
|
||||
updateBlendMode();
|
||||
|
||||
if( _system_adapter )
|
||||
_system_adapter->addCamera(camera.get());
|
||||
|
||||
_flags |= AVAILABLE;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::reinit()
|
||||
{
|
||||
osg::NodeCallback* cull_callback = camera ? camera->getCullCallback() : 0;
|
||||
clear();
|
||||
allocRT(cull_callback);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::clear()
|
||||
{
|
||||
if( camera.valid() && _system_adapter )
|
||||
_system_adapter->removeCamera(camera.get());
|
||||
camera.release();
|
||||
texture.release();
|
||||
|
||||
_flags &= ~AVAILABLE;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool ODGauge::updateFlag(Flags flag, bool enable)
|
||||
{
|
||||
if( bool(_flags & flag) == enable )
|
||||
return false;
|
||||
|
||||
_flags ^= flag;
|
||||
return true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::updateCoordinateFrame()
|
||||
{
|
||||
assert( camera );
|
||||
|
||||
if( _view_width < 0 )
|
||||
_view_width = _size_x;
|
||||
if( _view_height < 0 )
|
||||
_view_height = _size_y;
|
||||
|
||||
camera->setViewport(0, 0, _size_x, _size_y);
|
||||
|
||||
if( _flags & USE_IMAGE_COORDS )
|
||||
camera->setProjectionMatrix(
|
||||
osg::Matrix::ortho2D(0, _view_width, _view_height, 0)
|
||||
);
|
||||
else
|
||||
camera->setProjectionMatrix(
|
||||
osg::Matrix::ortho2D( -_view_width/2., _view_width/2.,
|
||||
-_view_height/2., _view_height/2. )
|
||||
);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::updateStencil()
|
||||
{
|
||||
assert( camera );
|
||||
|
||||
GLbitfield mask = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT;
|
||||
|
||||
if( _flags & USE_STENCIL )
|
||||
{
|
||||
camera->attach( osg::Camera::PACKED_DEPTH_STENCIL_BUFFER,
|
||||
GL_DEPTH_STENCIL_EXT );
|
||||
mask |= GL_STENCIL_BUFFER_BIT;
|
||||
}
|
||||
else
|
||||
{
|
||||
camera->detach(osg::Camera::PACKED_DEPTH_STENCIL_BUFFER);
|
||||
}
|
||||
|
||||
camera->setClearMask(mask);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::updateSampling()
|
||||
{
|
||||
assert( camera );
|
||||
assert( texture );
|
||||
|
||||
texture->setFilter(
|
||||
osg::Texture2D::MIN_FILTER,
|
||||
(_flags & USE_MIPMAPPING) ? osg::Texture2D::LINEAR_MIPMAP_LINEAR
|
||||
: osg::Texture2D::LINEAR
|
||||
);
|
||||
camera->attach(
|
||||
osg::Camera::COLOR_BUFFER,
|
||||
texture.get(),
|
||||
0, 0,
|
||||
_flags & USE_MIPMAPPING,
|
||||
_coverage_samples,
|
||||
_color_samples
|
||||
);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void ODGauge::updateBlendMode()
|
||||
{
|
||||
assert( camera );
|
||||
|
||||
camera->getOrCreateStateSet()
|
||||
->setAttributeAndModes
|
||||
(
|
||||
(_flags & USE_ADDITIVE_BLEND)
|
||||
? new osg::BlendFunc( osg::BlendFunc::SRC_ALPHA,
|
||||
osg::BlendFunc::ONE_MINUS_SRC_ALPHA,
|
||||
osg::BlendFunc::ONE,
|
||||
osg::BlendFunc::ONE )
|
||||
: new osg::BlendFunc( osg::BlendFunc::SRC_ALPHA,
|
||||
osg::BlendFunc::ONE_MINUS_SRC_ALPHA )
|
||||
);
|
||||
}
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
176
simgear/canvas/ODGauge.hxx
Normal file
176
simgear/canvas/ODGauge.hxx
Normal file
@@ -0,0 +1,176 @@
|
||||
// Owner Drawn Gauge helper class
|
||||
//
|
||||
// Written by Harald JOHNSEN, started May 2005.
|
||||
//
|
||||
// Copyright (C) 2005 Harald JOHNSEN - hjohnsen@evc.net
|
||||
//
|
||||
// Ported to OSG by Tim Moore - Jun 2007
|
||||
//
|
||||
// Heavily modified to be usable for the 2d Canvas by Thomas Geymayer - April 2012
|
||||
// Supports now multisampling/mipmapping, usage of the stencil buffer and placing
|
||||
// the texture in the scene by certain filter criteria
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef _SG_OD_GAUGE_HXX
|
||||
#define _SG_OD_GAUGE_HXX
|
||||
|
||||
#include "canvas_fwd.hxx"
|
||||
|
||||
#include <osg/NodeCallback>
|
||||
#include <osg/Group>
|
||||
|
||||
namespace osg
|
||||
{
|
||||
class Camera;
|
||||
class Texture2D;
|
||||
}
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
namespace canvas
|
||||
{
|
||||
|
||||
/**
|
||||
* Owner Drawn Gauge (aka render-to-texture) helper class
|
||||
*/
|
||||
class ODGauge
|
||||
{
|
||||
public:
|
||||
|
||||
ODGauge();
|
||||
virtual ~ODGauge();
|
||||
|
||||
void setSystemAdapter(const SystemAdapterPtr& system_adapter);
|
||||
|
||||
/**
|
||||
* Set the size of the render target.
|
||||
*
|
||||
* @param size_x X size
|
||||
* @param size_y Y size. Defaults to size_x if not specified
|
||||
*/
|
||||
void setSize(int size_x, int size_y = -1);
|
||||
|
||||
/**
|
||||
* Set the size of the viewport
|
||||
*
|
||||
* @param width
|
||||
* @param height Defaults to width if not specified
|
||||
*/
|
||||
void setViewSize(int width, int height = -1);
|
||||
|
||||
osg::Vec2s getViewSize() const;
|
||||
|
||||
/**
|
||||
* DEPRECATED
|
||||
*
|
||||
* Get size of squared texture
|
||||
*/
|
||||
int size() const { return _size_x; }
|
||||
|
||||
/**
|
||||
* Set whether to use image coordinates or not.
|
||||
*
|
||||
* Default: origin == center of texture
|
||||
* Image Coords: origin == top left corner
|
||||
*/
|
||||
void useImageCoords(bool use = true);
|
||||
|
||||
/**
|
||||
* Enable/Disable using a stencil buffer
|
||||
*/
|
||||
void useStencil(bool use = true);
|
||||
|
||||
/**
|
||||
* Enable/Disable additive alpha blending (Can improve results with
|
||||
* transparent background)
|
||||
*/
|
||||
void useAdditiveBlend(bool use = true);
|
||||
|
||||
/**
|
||||
* Set sampling parameters for mipmapping and coverage sampling
|
||||
* antialiasing.
|
||||
*
|
||||
* @note color_samples is not allowed to be higher than coverage_samples
|
||||
*
|
||||
*/
|
||||
void setSampling( bool mipmapping,
|
||||
int coverage_samples = 0,
|
||||
int color_samples = 0 );
|
||||
|
||||
/**
|
||||
* Enable/Disable updating the texture (If disabled the contents of the
|
||||
* texture remains with the outcome of the last rendering pass)
|
||||
*/
|
||||
void setRender(bool render);
|
||||
|
||||
/**
|
||||
* Say if we can render to a texture.
|
||||
* @return true if rtt is available
|
||||
*/
|
||||
bool serviceable() const;
|
||||
|
||||
/**
|
||||
* Get the OSG camera for drawing this gauge.
|
||||
*/
|
||||
osg::Camera* getCamera() const { return camera.get(); }
|
||||
|
||||
osg::Texture2D* getTexture() const { return texture.get(); }
|
||||
|
||||
// Real initialization function. Bad name.
|
||||
void allocRT(osg::NodeCallback* camera_cull_callback = 0);
|
||||
void reinit();
|
||||
void clear();
|
||||
|
||||
protected:
|
||||
|
||||
SystemAdapterPtr _system_adapter;
|
||||
|
||||
int _size_x,
|
||||
_size_y,
|
||||
_view_width,
|
||||
_view_height;
|
||||
|
||||
enum Flags
|
||||
{
|
||||
AVAILABLE = 1,
|
||||
USE_IMAGE_COORDS = AVAILABLE << 1,
|
||||
USE_STENCIL = USE_IMAGE_COORDS << 1,
|
||||
USE_MIPMAPPING = USE_STENCIL << 1,
|
||||
USE_ADDITIVE_BLEND = USE_MIPMAPPING << 1
|
||||
};
|
||||
|
||||
uint32_t _flags;
|
||||
|
||||
// Multisampling parameters
|
||||
int _coverage_samples,
|
||||
_color_samples;
|
||||
|
||||
osg::ref_ptr<osg::Camera> camera;
|
||||
osg::ref_ptr<osg::Texture2D> texture;
|
||||
|
||||
bool updateFlag(Flags flag, bool enable);
|
||||
|
||||
void updateCoordinateFrame();
|
||||
void updateStencil();
|
||||
void updateSampling();
|
||||
void updateBlendMode();
|
||||
|
||||
};
|
||||
|
||||
} // namespace canvas
|
||||
} // namespace simgear
|
||||
|
||||
#endif // _SG_OD_GAUGE_HXX
|
||||
12
simgear/canvas/ShivaVG/AUTHORS
Normal file
12
simgear/canvas/ShivaVG/AUTHORS
Normal file
@@ -0,0 +1,12 @@
|
||||
===============================================================================
|
||||
ShivaVG - an open-source LGPL ANSI C implementation of the OpenVG specification
|
||||
===============================================================================
|
||||
|
||||
Lead developer:
|
||||
|
||||
Ivan Leben <ivan.leben@gmail.com>
|
||||
|
||||
Occasional patches:
|
||||
|
||||
Daniel Turing
|
||||
Vincenzo Pupillo
|
||||
504
simgear/canvas/ShivaVG/COPYING
Normal file
504
simgear/canvas/ShivaVG/COPYING
Normal file
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
67
simgear/canvas/ShivaVG/ChangeLog
Normal file
67
simgear/canvas/ShivaVG/ChangeLog
Normal file
@@ -0,0 +1,67 @@
|
||||
04 Feb 2008 Ivan Leben <ivan.leben@gmail.com>
|
||||
|
||||
* shImage.c: shCopyPixels uses memcpy when formats are
|
||||
equal.
|
||||
|
||||
04 Feb 2008 Ivan Leben <ivan.leben@gmail.com>
|
||||
|
||||
* openvg.h: changed typedef of VGHandle to void*. Code
|
||||
compiles with no warnings on 64-bit systems now and
|
||||
it's much safer anyway.
|
||||
|
||||
03 Feb 2008 Ivan Leben <ivan.leben@gmail.com>
|
||||
|
||||
* shContest.c: fixed a bug in SHContext destructor where
|
||||
resource deletion loop was iterating image array while
|
||||
freeing paint objects
|
||||
|
||||
03 Feb 2008 Ivan Leben <ivan.leben@gmail.com>
|
||||
|
||||
* a patch by Vincenzo Pupillo fixes array constructor behavior
|
||||
when it runs out of memory plus makes its destructor a bit
|
||||
more robust
|
||||
|
||||
03 Feb 2008 Ivan Leben <ivan.leben@gmail.com>
|
||||
|
||||
* autogen.sh: added --force to autoreconf call
|
||||
|
||||
03 Feb 2008 Ivan Leben <ivan.leben@gmail.com>
|
||||
|
||||
* Removed automake/autoconf generated files. Added autogen.sh
|
||||
to generate them.
|
||||
|
||||
03 Feb 2008 Ivan Leben <ivan.leben@gmail.com>
|
||||
|
||||
* configure.in: changed order of checks for glut library and
|
||||
glXGetProcAddress in -lGL so that latter doesn't fail when
|
||||
glut is not installed.
|
||||
|
||||
30 Jan 2008 Ivan Leben <ivan.leben@gmail.com>
|
||||
|
||||
* shGeometry.c: shStrokePath() fixed to handle zero-length line
|
||||
segments gracefully
|
||||
|
||||
* fixed the image color component ordering to be valid against the
|
||||
spec
|
||||
|
||||
* shImage.c, shImage.h: completely overhauled to support multiple
|
||||
image formats. Everything but _PRE and _BW_1 now supported.
|
||||
|
||||
24 Jan 2008 Ivan Leben <ivan.leben@gmail.com>
|
||||
|
||||
* Moved release-related info from ChangeLog to NEWS. ChangeLog will
|
||||
now include info regarding each commit to repository
|
||||
|
||||
* Rearranged the path tesselletaion and user-to-surface transformation
|
||||
steps in the pipeline to produce higher curve resolution when path is
|
||||
scaled up
|
||||
|
||||
* Using new pipeline design, transformed bound-box query can now return
|
||||
really tight bounds
|
||||
|
||||
* Inserted empty/nop definitions for all non-implemented function so
|
||||
that linking against the library doesn't fail.
|
||||
|
||||
22 Jan 2008 Ivan Leben <ivan.leben@gmail.com>
|
||||
|
||||
* Fixed a bug where vgGetError would always return VG_NO_ERROR
|
||||
80
simgear/canvas/ShivaVG/MYTODO
Normal file
80
simgear/canvas/ShivaVG/MYTODO
Normal file
@@ -0,0 +1,80 @@
|
||||
shIsValid* functions do a search through array!!!
|
||||
That is required because user handles are actually pointers and need to be found in the valid path array. Solution would be to use indices into an array of pointers for internal handle-to-pointer conversion. When a path is deleted, an empty space would be left in the array and used when the next path is created.
|
||||
|
||||
How to speed up image upload / manipulation
|
||||
=============================================
|
||||
|
||||
1) shCopyPixels uses memcpy
|
||||
|
||||
First, manipulation can be speeded up by modifying shCopyPixels
|
||||
to copy lines using memcpy directly when source and target
|
||||
formats are equal. If stride is same too, than we can memcpy
|
||||
the whole block of memory.
|
||||
|
||||
2) What about mapping image manipulation directly to OpenGL
|
||||
texture manipulation calls? Which formats could support this?
|
||||
|
||||
PROBLEM: if NOPS textures are not supported, then writing
|
||||
and reading the image data back results in a precision loss!
|
||||
Even if PBO available we'd need to gluScaleImage into it.
|
||||
|
||||
--> means: no NOPS, need intermediate buffer anyway
|
||||
|
||||
=== Solution1: PBO are available ====
|
||||
|
||||
Extension required: EXT_pixel_buffer_object (ARB_pixel_buffer_object ?)
|
||||
|
||||
Complexity of implementation: really easy - PBO simply
|
||||
replaces the buffer that would be used if NOPS were not there
|
||||
|
||||
Cannot just glBindBuffer(GL_PIXEL_UNPACK_BUFFER) and then
|
||||
glReadPixels into client memory, because glPixelStore
|
||||
doesn't allow for random row byte size ("stride" must be
|
||||
a multiple of pixel byte size).
|
||||
|
||||
We can safely glMapBuffer and copy from it whatever we want
|
||||
however we want, and do any kind of conversion inbetween.
|
||||
Is glMapBuffer + memcpy into user memory faster than just
|
||||
glGetTexImage? Probably yes, since glGetTexImage probably
|
||||
first downloads the data from GPU anyway.
|
||||
|
||||
glMapBuffer better anyway, because we can directly do the format
|
||||
conversions unsupported by OpenGL (premultiplied to unpremultiplied,
|
||||
grayscale conversion with different per component coefficients
|
||||
instead of simple averaging etc.). We use all the exact same code
|
||||
as when NOPS not supported.
|
||||
|
||||
|
||||
=== Solution2: no PBOs ===
|
||||
|
||||
- vgImageSubData => glTexSubImage2D
|
||||
- vgGetImageSubData => glGetTexImage
|
||||
- vgCopyImage => glGetTexImage, glTexSubImage2D
|
||||
- vgSetPixels => glGetTexImage, glDrawPixels
|
||||
|
||||
(PROBLEM: for glGetTexImage, row length in glPixelStore must
|
||||
be a multiple of pixel byte size!)
|
||||
|
||||
- when copying pixels to/from the texture, we still need to
|
||||
manually clip the working pixel region to the intersection
|
||||
of the source and destination rectangles, since opengl spec
|
||||
says INVALID_VALUE error is generated for invalid regions
|
||||
(e.g. dstX + copyW > dstW)
|
||||
|
||||
|
||||
How to solve great slow-down when scaled up?
|
||||
=============================================
|
||||
|
||||
Reasons:
|
||||
- cpu is subdividing a loooong path
|
||||
- fill-rate is a bad thing
|
||||
|
||||
1. By writing gradient shaders, there would be no need to
|
||||
draw into stencil first and then fill the whole area where stencil
|
||||
odd - at least not when drawing stroke (optimizes half of the pipeline)
|
||||
|
||||
2. Real tesselation would reduce fill rate for filled paths, but does
|
||||
the CPU bottleneck outweight the gain?
|
||||
|
||||
3. Early path discarding (transformed bounds outside surface? maybe
|
||||
early convex-hull rule removal?)
|
||||
38
simgear/canvas/ShivaVG/NEWS
Normal file
38
simgear/canvas/ShivaVG/NEWS
Normal file
@@ -0,0 +1,38 @@
|
||||
version 0.2.0 to 0.2.1 (20 Mar 2009):
|
||||
* Implemented scissoring for 1 scissor rectangle
|
||||
|
||||
version 0.2.0 (20 Jan 2008):
|
||||
* Fixed a bug where rotation in the paint-to-user matrix broke radial
|
||||
gradient fill.
|
||||
|
||||
* vgCreateContextSH interface changed to allow for specification of
|
||||
surface width and height
|
||||
|
||||
* new extension: vgResizeSurfaceSH to be called whenever the surface
|
||||
needs to be resized to match the new window size
|
||||
|
||||
* #define GL_GLEXT_LEGACY in shExtensions.h prior to including gl.h
|
||||
so it doesn't include glext.h automatically, which enables us to
|
||||
check for OpenGL version and define OpenGL extension functions
|
||||
manually.
|
||||
|
||||
* Optimized image uploading by replacing the call to gluBuild2DMipmaps
|
||||
with glTexImage2D and changing the filter used to GL_LINEAR
|
||||
|
||||
* Added detection of ARB_texture_non_power_of_two extension to upload
|
||||
rectangular images directly instead of scaling them and loosing
|
||||
precision
|
||||
|
||||
* Pattern paint implemented
|
||||
|
||||
* Include folder changed to "vg" (lowercase)
|
||||
|
||||
* Added a message to test_blend program to notify the user that it
|
||||
has not been implemented yet (black screen is therefore fine)
|
||||
|
||||
* All the calls to glLoadMatrix replaced with glPushMatrix,
|
||||
glMultMatrix, glPopMatrix.
|
||||
|
||||
* Replaced images used in example programs for royalty-free
|
||||
|
||||
* README file written
|
||||
252
simgear/canvas/ShivaVG/README
Normal file
252
simgear/canvas/ShivaVG/README
Normal file
@@ -0,0 +1,252 @@
|
||||
ShivaVG
|
||||
=============================
|
||||
|
||||
See AUTHORS for the list of contributors
|
||||
|
||||
ShivaVG is an open-source LGPL ANSI C implementation of the Khronos
|
||||
Group OpenVG specification.
|
||||
|
||||
I. BUILD
|
||||
II. TESTING
|
||||
III. IMPLEMENTATION STATUS
|
||||
IV. EXTENSIONS
|
||||
|
||||
|
||||
I. BUILD
|
||||
=============================
|
||||
|
||||
* Prerequisites:
|
||||
|
||||
OpenGL development libraries and headers should be installed.
|
||||
Othe than that, since it's ANSI C should compile with any modern
|
||||
C compiler. jpeglib needs to be installed for example programs
|
||||
that use images.
|
||||
|
||||
* Compiling under UNIX systems:
|
||||
|
||||
Read the INSTALL file for more detailed (though generic) directions.
|
||||
This library uses the standard ./configure ; make. The example
|
||||
programs are automatically compiled. However, compilation of each
|
||||
example program can be toggled by ./configure --with-example-xxx
|
||||
command where xxx denotes the name of the example. Run ./configure
|
||||
--help for a list of such options.
|
||||
|
||||
* Compiling on Mac:
|
||||
|
||||
No XCode project files provided yet. The easiest way is by just
|
||||
using gcc, in which case look under UNIX compiling section.
|
||||
|
||||
* Compiling natively on Windows platform:
|
||||
|
||||
Solution files are provided for Visual C++ version 7 and 8. For
|
||||
the example programs using images to compile, you will need the
|
||||
appropriate build of jpeglib to match your Visual C++ version.
|
||||
|
||||
* Compiling in mingw / cygwin environment:
|
||||
|
||||
Might work just as fine as any UNIX-flavored system, but hasn't
|
||||
been tested yet.
|
||||
|
||||
|
||||
II. TESTING
|
||||
=============================
|
||||
|
||||
There is no real testing suite yet. The example programs are there
|
||||
just to play with what the implementation can currently do, but
|
||||
can hardly provide any proper validation, since no reference images
|
||||
are provided. Here is a description of each example program and
|
||||
what features it highlights:
|
||||
|
||||
* test_vgu
|
||||
|
||||
Constructs some path primitives using the VGU API.
|
||||
|
||||
* test_tiger
|
||||
|
||||
The most simple performance test. It draws the well known svg
|
||||
tiger using just simple stroke and fill of solid colors. It
|
||||
consists of 240 paths.
|
||||
|
||||
* test_dash
|
||||
|
||||
Shows different stroke dashing modes.
|
||||
|
||||
* test_linear
|
||||
|
||||
A rectangle drawn using 3-color linear gradient fill paint
|
||||
|
||||
* test_radial
|
||||
|
||||
A rectangle drawn using 3-color radial gradient fill paint
|
||||
|
||||
* test_interpolate
|
||||
|
||||
Interpolates between two paths - an apple and a pear.
|
||||
|
||||
* test_image
|
||||
|
||||
Images are drawn using VG_DRAW_IMAGE_MULTIPLY image mode to be
|
||||
multiplied with radial gradient fill paint.
|
||||
|
||||
* test_pattern
|
||||
|
||||
An image is drawn in multiply mode with an image pattern fill
|
||||
paint.
|
||||
|
||||
|
||||
III. IMPLEMENTATION STATUS
|
||||
=============================
|
||||
|
||||
Khronos states in the OpenVG specification, that the contexts for all
|
||||
their client APIs are expected to be created via the EGL API. Since
|
||||
EGL to use with ShivaVG has not been implemented yet, there is a set
|
||||
of extension functions provided for the task of creating, maintaining
|
||||
and destroying the OpenVG context. (See next section EXTENSIONS for
|
||||
details.)
|
||||
|
||||
What follows is a description of which functions or to what extent
|
||||
a certain function has been implemented. When a function is marked
|
||||
as PARTIALLY implemented, the TODO file or the comments in the code
|
||||
itself would provide further clues.
|
||||
|
||||
|
||||
* General:
|
||||
|
||||
vgGetError ............................ FULLY implemented
|
||||
vgFlush ............................... FULLY implemented
|
||||
vgFinish .............................. FULLY implemented
|
||||
|
||||
* Getters and setters:
|
||||
|
||||
vgSet ................................. FULLY implemented
|
||||
vgSeti ................................ FULLY implemented
|
||||
vgSetfv ............................... FULLY implemented
|
||||
vgSetiv ............................... FULLY implemented
|
||||
vgGetf ................................ FULLY implemented
|
||||
vgGeti ................................ FULLY implemented
|
||||
vgGetVectorSize ....................... FULLY implemented
|
||||
vgGetfv ............................... FULLY implemented
|
||||
vgGetiv ............................... FULLY implemented
|
||||
vgSetParameterf ....................... FULLY implemented
|
||||
vgSetParameteri ....................... FULLY implemented
|
||||
vgSetParameterfv ...................... FULLY implemented
|
||||
vgSetParameteriv ...................... FULLY implemented
|
||||
vgGetParameterf ....................... FULLY implemented
|
||||
vgGetParameteri ....................... FULLY implemented
|
||||
vgGetParameterVectorSize............... FULLY implemented
|
||||
vgGetParameterfv ...................... FULLY implemented
|
||||
vgGetParameteriv ...................... FULLY implemented
|
||||
|
||||
* Matrix Manipulation:
|
||||
|
||||
vgLoadIdentity ........................ FULLY implemented
|
||||
vgLoadMatrix .......................... FULLY implemented
|
||||
vgGetMatrix ........................... FULLY implemented
|
||||
vgMultMatrix .......................... FULLY implemented
|
||||
vgTranslate ........................... FULLY implemented
|
||||
vgScale ............................... FULLY implemented
|
||||
vgShear ............................... FULLY implemented
|
||||
vgRotate .............................. FULLY implemented
|
||||
|
||||
* Masking and Clearing:
|
||||
|
||||
vgMask ................................ NOT implemented
|
||||
vgClear ............................... FULLY implemented
|
||||
|
||||
* Paths:
|
||||
|
||||
vgCreatePath .......................... FULLY implemented
|
||||
vgClearPath ........................... FULLY implemented
|
||||
vgDestroyPath ......................... FULLY implemented
|
||||
vgRemovePathCapabilities .............. FULLY implemented
|
||||
vgGetPathCapabilities ................. FULLY implemented
|
||||
vgAppendPath .......................... FULLY implemented
|
||||
vgAppendPathData ...................... FULLY implemented
|
||||
vgModifyPathCoords .................... FULLY implemented
|
||||
vgTransformPath ....................... FULLY implemented
|
||||
vgInterpolatePath ..................... FULLY implemented
|
||||
vgPathLength .......................... NOT implemented
|
||||
vgPointAlongPath ...................... NOT implemented
|
||||
vgPathBounds .......................... FULLY implemented
|
||||
vgPathTransformedBounds ............... FULLY implemented
|
||||
vgDrawPath ............................ PARTIALLY implemented
|
||||
|
||||
* Paint:
|
||||
|
||||
vgCreatePaint ......................... FULLY implemented
|
||||
vgDestroyPaint ........................ FULLY implemented
|
||||
vgSetPaint ............................ FULLY implemented
|
||||
vgGetPaint ............................ FULLY implemented
|
||||
vgSetColor ............................ FULLY implemented
|
||||
vgGetColor ............................ FULLY implemented
|
||||
vgPaintPattern ........................ FULLY implemented
|
||||
|
||||
* Images:
|
||||
|
||||
vgCreateImage ......................... PARTIALLY implemented
|
||||
vgDestroyImage ........................ FULLY implemented
|
||||
vgClearImage .......................... FULLY implemented
|
||||
vgImageSubData ........................ PARTIALLY implemented
|
||||
vgGetImageSubData ..................... PARTIALLY implemented
|
||||
vgChildImage .......................... NOT implemented
|
||||
vgGetParent ........................... NOT implemented
|
||||
vgCopyImage ........................... FULLY implemented
|
||||
vgDrawImage ........................... PARTIALLY implemented
|
||||
vgSetPixels ........................... FULLY implemented
|
||||
vgWritePixels ......................... FULLY implemented
|
||||
vgGetPixels ........................... FULLY implemented
|
||||
vgReadPixels .......................... FULLY implemented
|
||||
vgCopyPixels .......................... FULLY implemented
|
||||
|
||||
* Image Filters:
|
||||
|
||||
vgColorMatrix ......................... NOT implemented
|
||||
vgConvolve ............................ NOT implemented
|
||||
vgSeparableConvolve ................... NOT implemented
|
||||
vgGaussianBlur ........................ NOT implemented
|
||||
vgLookup .............................. NOT implemented
|
||||
vgLookupSingle ........................ NOT implemented
|
||||
|
||||
* Hardware Queries:
|
||||
|
||||
vgHardwareQuery ....................... NOT implemented
|
||||
|
||||
* Renderer and Extension Information:
|
||||
|
||||
vgGetString ........................... FULLY implemented
|
||||
|
||||
* VGU
|
||||
|
||||
vguLine ............................... FULLY implemented
|
||||
vguPolygon ............................ FULLY implemented
|
||||
vguRect ............................... FULLY implemented
|
||||
vguRoundRect .......................... FULLY implemented
|
||||
vguEllipse ............................ FULLY implemented
|
||||
vguArc ................................ FULLY implemented
|
||||
vguComputeWarpQuadToSquare ............ NOT implemented
|
||||
vguComputeWarpSquareToQuad ............ NOT implemented
|
||||
vguComputeWarpQuadToQuad .............. NOT implemented
|
||||
|
||||
|
||||
IV. EXTENSIONS
|
||||
=============================
|
||||
|
||||
There are three extensions to the API that manipulate the OpenVG
|
||||
context as a temporary replacement for EGL:
|
||||
|
||||
VGboolean vgCreateContextSH(VGint width, VGint height)
|
||||
|
||||
Creates an OpenVG context on top of an existing OpenGL context
|
||||
that should have been manually initialized by the user of the
|
||||
library. Width and height specify the size of the rendering
|
||||
surface. No multi-threading support has been implemented yet.
|
||||
The context is created once per process.
|
||||
|
||||
void vgResizeSurfaceSH(VGint width, VGint height)
|
||||
|
||||
Should be called whenever the size of the surface changes (e.g.
|
||||
the owner window of the OpenGL context is resized).
|
||||
|
||||
void vgDestroyContextSH()
|
||||
|
||||
Destroys the OpenVG context associated with the calling process.
|
||||
42
simgear/canvas/ShivaVG/TODO
Normal file
42
simgear/canvas/ShivaVG/TODO
Normal file
@@ -0,0 +1,42 @@
|
||||
----------
|
||||
Known bugs
|
||||
----------
|
||||
|
||||
- outofmemory in arrays silently ignored
|
||||
- blending doesn't use premultiplied colors (not porter-duff model)
|
||||
- gradient color ramp is not interpolated in linear space
|
||||
- linear and non-linear image formats behave both linearly
|
||||
- radial gradient circle has got a fixed step instead of
|
||||
proportional to its radius
|
||||
|
||||
-------------------------
|
||||
Incomplete functionality:
|
||||
-------------------------
|
||||
|
||||
- non-zero fill mode
|
||||
- proper porter-duff blending
|
||||
- masking
|
||||
- scissoring
|
||||
- child images
|
||||
- VG_DRAW_IMAGE_STENCIL
|
||||
- _PRE and BW_1 image formats
|
||||
- VGU warp matrices
|
||||
- EGL (image drawing targets)
|
||||
- boundbox / point-on-path / tangent-on-path queries
|
||||
- RENDERING_QUALITY_FASTER == RENDERING_QUALITY_BETTER
|
||||
|
||||
---------------------------
|
||||
Possible portability issues
|
||||
---------------------------
|
||||
|
||||
- GL_UNSIGNED_INT_8_8_8_8 and other for images
|
||||
- GL_MIRRORED_REPEAT for gradients
|
||||
- GL_CLAMP_TO_EDGE for gradients and pattern paints
|
||||
- GL_CLAMP_TO_BORDER for pattern paints
|
||||
- multitexturing for VG_DRAW_IMAGE_MULTIPLY, VG_DRAW_IMAGE_STENCIL
|
||||
|
||||
------
|
||||
Bonus:
|
||||
------
|
||||
|
||||
- gradient shaders? antialiasing shader?
|
||||
638
simgear/canvas/ShivaVG/include/vg/openvg.h
Normal file
638
simgear/canvas/ShivaVG/include/vg/openvg.h
Normal file
@@ -0,0 +1,638 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Ivan Leben
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library in the file COPYING;
|
||||
* if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _OPENVG_H
|
||||
#define _OPENVG_H
|
||||
|
||||
#define OPENVG_VERSION_1_0_1 1
|
||||
|
||||
/* Type definitions */
|
||||
/* TODO: we can't use config.h in this header so there
|
||||
must be some other technique to assert the proper
|
||||
size of the basic types */
|
||||
|
||||
typedef float VGfloat;
|
||||
typedef char VGbyte;
|
||||
typedef unsigned char VGubyte;
|
||||
typedef short VGshort;
|
||||
typedef int VGint;
|
||||
typedef unsigned int VGuint;
|
||||
typedef unsigned int VGbitfield;
|
||||
|
||||
typedef enum {
|
||||
VG_FALSE = 0,
|
||||
VG_TRUE = 1
|
||||
} VGboolean;
|
||||
|
||||
#define VG_MAXSHORT ((VGshort)((~((unsigned)0)) >> 1))
|
||||
#define VG_MAXINT ((VGint)((~((unsigned)0)) >> 1))
|
||||
|
||||
/* Define handle to be of same length as any pointer */
|
||||
|
||||
typedef void * VGHandle;
|
||||
#define VG_INVALID_HANDLE ((VGHandle)NULL)
|
||||
|
||||
/* Enumerations */
|
||||
|
||||
typedef enum {
|
||||
VG_NO_ERROR = 0,
|
||||
VG_BAD_HANDLE_ERROR = 0x1000,
|
||||
VG_ILLEGAL_ARGUMENT_ERROR = 0x1001,
|
||||
VG_OUT_OF_MEMORY_ERROR = 0x1002,
|
||||
VG_PATH_CAPABILITY_ERROR = 0x1003,
|
||||
VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004,
|
||||
VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005,
|
||||
VG_IMAGE_IN_USE_ERROR = 0x1006,
|
||||
VG_NO_CONTEXT_ERROR = 0x1007
|
||||
} VGErrorCode;
|
||||
|
||||
typedef enum {
|
||||
/* Mode settings */
|
||||
VG_MATRIX_MODE = 0x1100,
|
||||
VG_FILL_RULE = 0x1101,
|
||||
VG_IMAGE_QUALITY = 0x1102,
|
||||
VG_RENDERING_QUALITY = 0x1103,
|
||||
VG_BLEND_MODE = 0x1104,
|
||||
VG_IMAGE_MODE = 0x1105,
|
||||
|
||||
/* Scissoring rectangles */
|
||||
VG_SCISSOR_RECTS = 0x1106,
|
||||
|
||||
/* Stroke parameters */
|
||||
VG_STROKE_LINE_WIDTH = 0x1110,
|
||||
VG_STROKE_CAP_STYLE = 0x1111,
|
||||
VG_STROKE_JOIN_STYLE = 0x1112,
|
||||
VG_STROKE_MITER_LIMIT = 0x1113,
|
||||
VG_STROKE_DASH_PATTERN = 0x1114,
|
||||
VG_STROKE_DASH_PHASE = 0x1115,
|
||||
VG_STROKE_DASH_PHASE_RESET = 0x1116,
|
||||
|
||||
/* Edge fill color for VG_TILE_FILL tiling mode */
|
||||
VG_TILE_FILL_COLOR = 0x1120,
|
||||
|
||||
/* Color for vgClear */
|
||||
VG_CLEAR_COLOR = 0x1121,
|
||||
|
||||
/* Enable/disable alpha masking and scissoring */
|
||||
VG_MASKING = 0x1130,
|
||||
VG_SCISSORING = 0x1131,
|
||||
|
||||
/* Pixel layout information */
|
||||
VG_PIXEL_LAYOUT = 0x1140,
|
||||
VG_SCREEN_LAYOUT = 0x1141,
|
||||
|
||||
/* Source format selection for image filters */
|
||||
VG_FILTER_FORMAT_LINEAR = 0x1150,
|
||||
VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151,
|
||||
|
||||
/* Destination write enable mask for image filters */
|
||||
VG_FILTER_CHANNEL_MASK = 0x1152,
|
||||
|
||||
/* Implementation limits (read-only) */
|
||||
VG_MAX_SCISSOR_RECTS = 0x1160,
|
||||
VG_MAX_DASH_COUNT = 0x1161,
|
||||
VG_MAX_KERNEL_SIZE = 0x1162,
|
||||
VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163,
|
||||
VG_MAX_COLOR_RAMP_STOPS = 0x1164,
|
||||
VG_MAX_IMAGE_WIDTH = 0x1165,
|
||||
VG_MAX_IMAGE_HEIGHT = 0x1166,
|
||||
VG_MAX_IMAGE_PIXELS = 0x1167,
|
||||
VG_MAX_IMAGE_BYTES = 0x1168,
|
||||
VG_MAX_FLOAT = 0x1169,
|
||||
VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A
|
||||
} VGParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200,
|
||||
VG_RENDERING_QUALITY_FASTER = 0x1201,
|
||||
VG_RENDERING_QUALITY_BETTER = 0x1202 /* Default */
|
||||
} VGRenderingQuality;
|
||||
|
||||
typedef enum {
|
||||
VG_PIXEL_LAYOUT_UNKNOWN = 0x1300,
|
||||
VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301,
|
||||
VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302,
|
||||
VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303,
|
||||
VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304
|
||||
} VGPixelLayout;
|
||||
|
||||
typedef enum {
|
||||
VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400,
|
||||
VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401,
|
||||
VG_MATRIX_FILL_PAINT_TO_USER = 0x1402,
|
||||
VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403
|
||||
} VGMatrixMode;
|
||||
|
||||
typedef enum {
|
||||
VG_CLEAR_MASK = 0x1500,
|
||||
VG_FILL_MASK = 0x1501,
|
||||
VG_SET_MASK = 0x1502,
|
||||
VG_UNION_MASK = 0x1503,
|
||||
VG_INTERSECT_MASK = 0x1504,
|
||||
VG_SUBTRACT_MASK = 0x1505
|
||||
} VGMaskOperation;
|
||||
|
||||
#define VG_PATH_FORMAT_STANDARD 0
|
||||
|
||||
typedef enum {
|
||||
VG_PATH_DATATYPE_S_8 = 0,
|
||||
VG_PATH_DATATYPE_S_16 = 1,
|
||||
VG_PATH_DATATYPE_S_32 = 2,
|
||||
VG_PATH_DATATYPE_F = 3
|
||||
} VGPathDatatype;
|
||||
|
||||
typedef enum {
|
||||
VG_ABSOLUTE = 0,
|
||||
VG_RELATIVE = 1
|
||||
} VGPathAbsRel;
|
||||
|
||||
typedef enum {
|
||||
VG_CLOSE_PATH = ( 0 << 1),
|
||||
VG_MOVE_TO = ( 1 << 1),
|
||||
VG_LINE_TO = ( 2 << 1),
|
||||
VG_HLINE_TO = ( 3 << 1),
|
||||
VG_VLINE_TO = ( 4 << 1),
|
||||
VG_QUAD_TO = ( 5 << 1),
|
||||
VG_CUBIC_TO = ( 6 << 1),
|
||||
VG_SQUAD_TO = ( 7 << 1),
|
||||
VG_SCUBIC_TO = ( 8 << 1),
|
||||
VG_SCCWARC_TO = ( 9 << 1),
|
||||
VG_SCWARC_TO = (10 << 1),
|
||||
VG_LCCWARC_TO = (11 << 1),
|
||||
VG_LCWARC_TO = (12 << 1)
|
||||
} VGPathSegment;
|
||||
|
||||
typedef enum {
|
||||
VG_MOVE_TO_ABS = VG_MOVE_TO | VG_ABSOLUTE,
|
||||
VG_MOVE_TO_REL = VG_MOVE_TO | VG_RELATIVE,
|
||||
VG_LINE_TO_ABS = VG_LINE_TO | VG_ABSOLUTE,
|
||||
VG_LINE_TO_REL = VG_LINE_TO | VG_RELATIVE,
|
||||
VG_HLINE_TO_ABS = VG_HLINE_TO | VG_ABSOLUTE,
|
||||
VG_HLINE_TO_REL = VG_HLINE_TO | VG_RELATIVE,
|
||||
VG_VLINE_TO_ABS = VG_VLINE_TO | VG_ABSOLUTE,
|
||||
VG_VLINE_TO_REL = VG_VLINE_TO | VG_RELATIVE,
|
||||
VG_QUAD_TO_ABS = VG_QUAD_TO | VG_ABSOLUTE,
|
||||
VG_QUAD_TO_REL = VG_QUAD_TO | VG_RELATIVE,
|
||||
VG_CUBIC_TO_ABS = VG_CUBIC_TO | VG_ABSOLUTE,
|
||||
VG_CUBIC_TO_REL = VG_CUBIC_TO | VG_RELATIVE,
|
||||
VG_SQUAD_TO_ABS = VG_SQUAD_TO | VG_ABSOLUTE,
|
||||
VG_SQUAD_TO_REL = VG_SQUAD_TO | VG_RELATIVE,
|
||||
VG_SCUBIC_TO_ABS = VG_SCUBIC_TO | VG_ABSOLUTE,
|
||||
VG_SCUBIC_TO_REL = VG_SCUBIC_TO | VG_RELATIVE,
|
||||
VG_SCCWARC_TO_ABS = VG_SCCWARC_TO | VG_ABSOLUTE,
|
||||
VG_SCCWARC_TO_REL = VG_SCCWARC_TO | VG_RELATIVE,
|
||||
VG_SCWARC_TO_ABS = VG_SCWARC_TO | VG_ABSOLUTE,
|
||||
VG_SCWARC_TO_REL = VG_SCWARC_TO | VG_RELATIVE,
|
||||
VG_LCCWARC_TO_ABS = VG_LCCWARC_TO | VG_ABSOLUTE,
|
||||
VG_LCCWARC_TO_REL = VG_LCCWARC_TO | VG_RELATIVE,
|
||||
VG_LCWARC_TO_ABS = VG_LCWARC_TO | VG_ABSOLUTE,
|
||||
VG_LCWARC_TO_REL = VG_LCWARC_TO | VG_RELATIVE
|
||||
} VGPathCommand;
|
||||
|
||||
typedef VGHandle VGPath;
|
||||
|
||||
typedef enum {
|
||||
VG_PATH_CAPABILITY_APPEND_FROM = (1 << 0),
|
||||
VG_PATH_CAPABILITY_APPEND_TO = (1 << 1),
|
||||
VG_PATH_CAPABILITY_MODIFY = (1 << 2),
|
||||
VG_PATH_CAPABILITY_TRANSFORM_FROM = (1 << 3),
|
||||
VG_PATH_CAPABILITY_TRANSFORM_TO = (1 << 4),
|
||||
VG_PATH_CAPABILITY_INTERPOLATE_FROM = (1 << 5),
|
||||
VG_PATH_CAPABILITY_INTERPOLATE_TO = (1 << 6),
|
||||
VG_PATH_CAPABILITY_PATH_LENGTH = (1 << 7),
|
||||
VG_PATH_CAPABILITY_POINT_ALONG_PATH = (1 << 8),
|
||||
VG_PATH_CAPABILITY_TANGENT_ALONG_PATH = (1 << 9),
|
||||
VG_PATH_CAPABILITY_PATH_BOUNDS = (1 << 10),
|
||||
VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS = (1 << 11),
|
||||
VG_PATH_CAPABILITY_ALL = (1 << 12) - 1
|
||||
} VGPathCapabilities;
|
||||
|
||||
typedef enum {
|
||||
VG_PATH_FORMAT = 0x1600,
|
||||
VG_PATH_DATATYPE = 0x1601,
|
||||
VG_PATH_SCALE = 0x1602,
|
||||
VG_PATH_BIAS = 0x1603,
|
||||
VG_PATH_NUM_SEGMENTS = 0x1604,
|
||||
VG_PATH_NUM_COORDS = 0x1605
|
||||
} VGPathParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_CAP_BUTT = 0x1700,
|
||||
VG_CAP_ROUND = 0x1701,
|
||||
VG_CAP_SQUARE = 0x1702
|
||||
} VGCapStyle;
|
||||
|
||||
typedef enum {
|
||||
VG_JOIN_MITER = 0x1800,
|
||||
VG_JOIN_ROUND = 0x1801,
|
||||
VG_JOIN_BEVEL = 0x1802
|
||||
} VGJoinStyle;
|
||||
|
||||
typedef enum {
|
||||
VG_EVEN_ODD = 0x1900,
|
||||
VG_NON_ZERO = 0x1901
|
||||
} VGFillRule;
|
||||
|
||||
typedef enum {
|
||||
VG_STROKE_PATH = (1 << 0),
|
||||
VG_FILL_PATH = (1 << 1)
|
||||
} VGPaintMode;
|
||||
|
||||
typedef VGHandle VGPaint;
|
||||
|
||||
typedef enum {
|
||||
/* Color paint parameters */
|
||||
VG_PAINT_TYPE = 0x1A00,
|
||||
VG_PAINT_COLOR = 0x1A01,
|
||||
VG_PAINT_COLOR_RAMP_SPREAD_MODE = 0x1A02,
|
||||
VG_PAINT_COLOR_RAMP_PREMULTIPLIED = 0x1A07,
|
||||
VG_PAINT_COLOR_RAMP_STOPS = 0x1A03,
|
||||
|
||||
/* Linear gradient paint parameters */
|
||||
VG_PAINT_LINEAR_GRADIENT = 0x1A04,
|
||||
|
||||
/* Radial gradient paint parameters */
|
||||
VG_PAINT_RADIAL_GRADIENT = 0x1A05,
|
||||
|
||||
/* Pattern paint parameters */
|
||||
VG_PAINT_PATTERN_TILING_MODE = 0x1A06
|
||||
} VGPaintParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_PAINT_TYPE_COLOR = 0x1B00,
|
||||
VG_PAINT_TYPE_LINEAR_GRADIENT = 0x1B01,
|
||||
VG_PAINT_TYPE_RADIAL_GRADIENT = 0x1B02,
|
||||
VG_PAINT_TYPE_PATTERN = 0x1B03
|
||||
} VGPaintType;
|
||||
|
||||
typedef enum {
|
||||
VG_COLOR_RAMP_SPREAD_PAD = 0x1C00,
|
||||
VG_COLOR_RAMP_SPREAD_REPEAT = 0x1C01,
|
||||
VG_COLOR_RAMP_SPREAD_REFLECT = 0x1C02
|
||||
} VGColorRampSpreadMode;
|
||||
|
||||
typedef enum {
|
||||
VG_TILE_FILL = 0x1D00,
|
||||
VG_TILE_PAD = 0x1D01,
|
||||
VG_TILE_REPEAT = 0x1D02,
|
||||
VG_TILE_REFLECT = 0x1D03
|
||||
} VGTilingMode;
|
||||
|
||||
typedef enum {
|
||||
/* RGB{A,X} channel ordering */
|
||||
VG_sRGBX_8888 = 0,
|
||||
VG_sRGBA_8888 = 1,
|
||||
VG_sRGBA_8888_PRE = 2,
|
||||
VG_sRGB_565 = 3,
|
||||
VG_sRGBA_5551 = 4,
|
||||
VG_sRGBA_4444 = 5,
|
||||
VG_sL_8 = 6,
|
||||
VG_lRGBX_8888 = 7,
|
||||
VG_lRGBA_8888 = 8,
|
||||
VG_lRGBA_8888_PRE = 9,
|
||||
VG_lL_8 = 10,
|
||||
VG_A_8 = 11,
|
||||
VG_BW_1 = 12,
|
||||
|
||||
/* {A,X}RGB channel ordering */
|
||||
VG_sXRGB_8888 = 0 | (1 << 6),
|
||||
VG_sARGB_8888 = 1 | (1 << 6),
|
||||
VG_sARGB_8888_PRE = 2 | (1 << 6),
|
||||
VG_sARGB_1555 = 4 | (1 << 6),
|
||||
VG_sARGB_4444 = 5 | (1 << 6),
|
||||
VG_lXRGB_8888 = 7 | (1 << 6),
|
||||
VG_lARGB_8888 = 8 | (1 << 6),
|
||||
VG_lARGB_8888_PRE = 9 | (1 << 6),
|
||||
|
||||
/* BGR{A,X} channel ordering */
|
||||
VG_sBGRX_8888 = 0 | (1 << 7),
|
||||
VG_sBGRA_8888 = 1 | (1 << 7),
|
||||
VG_sBGRA_8888_PRE = 2 | (1 << 7),
|
||||
VG_sBGR_565 = 3 | (1 << 7),
|
||||
VG_sBGRA_5551 = 4 | (1 << 7),
|
||||
VG_sBGRA_4444 = 5 | (1 << 7),
|
||||
VG_lBGRX_8888 = 7 | (1 << 7),
|
||||
VG_lBGRA_8888 = 8 | (1 << 7),
|
||||
VG_lBGRA_8888_PRE = 9 | (1 << 7),
|
||||
|
||||
/* {A,X}BGR channel ordering */
|
||||
VG_sXBGR_8888 = 0 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_8888 = 1 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_8888_PRE = 2 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_1555 = 4 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_4444 = 5 | (1 << 6) | (1 << 7),
|
||||
VG_lXBGR_8888 = 7 | (1 << 6) | (1 << 7),
|
||||
VG_lABGR_8888 = 8 | (1 << 6) | (1 << 7),
|
||||
VG_lABGR_8888_PRE = 9 | (1 << 6) | (1 << 7)
|
||||
} VGImageFormat;
|
||||
|
||||
typedef VGHandle VGImage;
|
||||
|
||||
typedef enum {
|
||||
VG_IMAGE_QUALITY_NONANTIALIASED = (1 << 0),
|
||||
VG_IMAGE_QUALITY_FASTER = (1 << 1),
|
||||
VG_IMAGE_QUALITY_BETTER = (1 << 2)
|
||||
} VGImageQuality;
|
||||
|
||||
typedef enum {
|
||||
VG_IMAGE_FORMAT = 0x1E00,
|
||||
VG_IMAGE_WIDTH = 0x1E01,
|
||||
VG_IMAGE_HEIGHT = 0x1E02
|
||||
} VGImageParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_DRAW_IMAGE_NORMAL = 0x1F00,
|
||||
VG_DRAW_IMAGE_MULTIPLY = 0x1F01,
|
||||
VG_DRAW_IMAGE_STENCIL = 0x1F02
|
||||
} VGImageMode;
|
||||
|
||||
typedef enum {
|
||||
VG_RED = (1 << 3),
|
||||
VG_GREEN = (1 << 2),
|
||||
VG_BLUE = (1 << 1),
|
||||
VG_ALPHA = (1 << 0)
|
||||
} VGImageChannel;
|
||||
|
||||
typedef enum {
|
||||
VG_BLEND_SRC = 0x2000,
|
||||
VG_BLEND_SRC_OVER = 0x2001,
|
||||
VG_BLEND_DST_OVER = 0x2002,
|
||||
VG_BLEND_SRC_IN = 0x2003,
|
||||
VG_BLEND_DST_IN = 0x2004,
|
||||
VG_BLEND_MULTIPLY = 0x2005,
|
||||
VG_BLEND_SCREEN = 0x2006,
|
||||
VG_BLEND_DARKEN = 0x2007,
|
||||
VG_BLEND_LIGHTEN = 0x2008,
|
||||
VG_BLEND_ADDITIVE = 0x2009,
|
||||
VG_BLEND_SRC_OUT_SH = 0x200A,
|
||||
VG_BLEND_DST_OUT_SH = 0x200B,
|
||||
VG_BLEND_SRC_ATOP_SH = 0x200C,
|
||||
VG_BLEND_DST_ATOP_SH = 0x200D
|
||||
} VGBlendMode;
|
||||
|
||||
typedef enum {
|
||||
VG_IMAGE_FORMAT_QUERY = 0x2100,
|
||||
VG_PATH_DATATYPE_QUERY = 0x2101
|
||||
} VGHardwareQueryType;
|
||||
|
||||
typedef enum {
|
||||
VG_HARDWARE_ACCELERATED = 0x2200,
|
||||
VG_HARDWARE_UNACCELERATED = 0x2201
|
||||
} VGHardwareQueryResult;
|
||||
|
||||
typedef enum {
|
||||
VG_VENDOR = 0x2300,
|
||||
VG_RENDERER = 0x2301,
|
||||
VG_VERSION = 0x2302,
|
||||
VG_EXTENSIONS = 0x2303
|
||||
} VGStringID;
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
#if 0 // We are including ShivaVG directly into libSimGearScene and only using
|
||||
// inside the library so there is no need for any dll import/export stuff
|
||||
#if defined(_WIN32) || defined(__VC32__)
|
||||
# if defined(VG_API_EXPORT)
|
||||
# define VG_API_CALL __declspec(dllexport)
|
||||
# else
|
||||
# define VG_API_CALL __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define VG_API_CALL extern
|
||||
#endif
|
||||
#else
|
||||
# define VG_API_CALL
|
||||
#endif
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
VG_API_CALL VGErrorCode vgGetError(void);
|
||||
|
||||
VG_API_CALL void vgFlush(void);
|
||||
VG_API_CALL void vgFinish(void);
|
||||
|
||||
/* Getters and Setters */
|
||||
VG_API_CALL void vgSetf (VGParamType type, VGfloat value);
|
||||
VG_API_CALL void vgSeti (VGParamType type, VGint value);
|
||||
VG_API_CALL void vgSetfv(VGParamType type, VGint count,
|
||||
const VGfloat * values);
|
||||
VG_API_CALL void vgSetiv(VGParamType type, VGint count,
|
||||
const VGint * values);
|
||||
|
||||
VG_API_CALL VGfloat vgGetf(VGParamType type);
|
||||
VG_API_CALL VGint vgGeti(VGParamType type);
|
||||
VG_API_CALL VGint vgGetVectorSize(VGParamType type);
|
||||
VG_API_CALL void vgGetfv(VGParamType type, VGint count, VGfloat * values);
|
||||
VG_API_CALL void vgGetiv(VGParamType type, VGint count, VGint * values);
|
||||
|
||||
VG_API_CALL void vgSetParameterf(VGHandle object,
|
||||
VGint paramType,
|
||||
VGfloat value);
|
||||
VG_API_CALL void vgSetParameteri(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint value);
|
||||
VG_API_CALL void vgSetParameterfv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, const VGfloat * values);
|
||||
VG_API_CALL void vgSetParameteriv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, const VGint * values);
|
||||
|
||||
VG_API_CALL VGfloat vgGetParameterf(VGHandle object,
|
||||
VGint paramType);
|
||||
VG_API_CALL VGint vgGetParameteri(VGHandle object,
|
||||
VGint paramType);
|
||||
VG_API_CALL VGint vgGetParameterVectorSize(VGHandle object,
|
||||
VGint paramType);
|
||||
VG_API_CALL void vgGetParameterfv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, VGfloat * values);
|
||||
VG_API_CALL void vgGetParameteriv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, VGint * values);
|
||||
|
||||
/* Matrix Manipulation */
|
||||
VG_API_CALL void vgLoadIdentity(void);
|
||||
VG_API_CALL void vgLoadMatrix(const VGfloat * m);
|
||||
VG_API_CALL void vgGetMatrix(VGfloat * m);
|
||||
VG_API_CALL void vgMultMatrix(const VGfloat * m);
|
||||
VG_API_CALL void vgTranslate(VGfloat tx, VGfloat ty);
|
||||
VG_API_CALL void vgScale(VGfloat sx, VGfloat sy);
|
||||
VG_API_CALL void vgShear(VGfloat shx, VGfloat shy);
|
||||
VG_API_CALL void vgRotate(VGfloat angle);
|
||||
|
||||
/* Masking and Clearing */
|
||||
VG_API_CALL void vgMask(VGImage mask, VGMaskOperation operation,
|
||||
VGint x, VGint y, VGint width, VGint height);
|
||||
VG_API_CALL void vgClear(VGint x, VGint y, VGint width, VGint height);
|
||||
|
||||
/* Paths */
|
||||
VG_API_CALL VGPath vgCreatePath(VGint pathFormat,
|
||||
VGPathDatatype datatype,
|
||||
VGfloat scale, VGfloat bias,
|
||||
VGint segmentCapacityHint,
|
||||
VGint coordCapacityHint,
|
||||
VGbitfield capabilities);
|
||||
VG_API_CALL void vgClearPath(VGPath path, VGbitfield capabilities);
|
||||
VG_API_CALL void vgDestroyPath(VGPath path);
|
||||
VG_API_CALL void vgRemovePathCapabilities(VGPath path,
|
||||
VGbitfield capabilities);
|
||||
VG_API_CALL VGbitfield vgGetPathCapabilities(VGPath path);
|
||||
VG_API_CALL void vgAppendPath(VGPath dstPath, VGPath srcPath);
|
||||
VG_API_CALL void vgAppendPathData(VGPath dstPath,
|
||||
VGint numSegments,
|
||||
const VGubyte * pathSegments,
|
||||
const void * pathData);
|
||||
VG_API_CALL void vgModifyPathCoords(VGPath dstPath, VGint startIndex,
|
||||
VGint numSegments,
|
||||
const void * pathData);
|
||||
VG_API_CALL void vgTransformPath(VGPath dstPath, VGPath srcPath);
|
||||
VG_API_CALL VGboolean vgInterpolatePath(VGPath dstPath,
|
||||
VGPath startPath,
|
||||
VGPath endPath,
|
||||
VGfloat amount);
|
||||
VG_API_CALL VGfloat vgPathLength(VGPath path,
|
||||
VGint startSegment, VGint numSegments);
|
||||
VG_API_CALL void vgPointAlongPath(VGPath path,
|
||||
VGint startSegment, VGint numSegments,
|
||||
VGfloat distance,
|
||||
VGfloat * x, VGfloat * y,
|
||||
VGfloat * tangentX, VGfloat * tangentY);
|
||||
VG_API_CALL void vgPathBounds(VGPath path,
|
||||
VGfloat * minX, VGfloat * minY,
|
||||
VGfloat * width, VGfloat * height);
|
||||
VG_API_CALL void vgPathTransformedBounds(VGPath path,
|
||||
VGfloat * minX, VGfloat * minY,
|
||||
VGfloat * width, VGfloat * height);
|
||||
VG_API_CALL void vgDrawPath(VGPath path, VGbitfield paintModes);
|
||||
|
||||
/* Paint */
|
||||
VG_API_CALL VGPaint vgCreatePaint(void);
|
||||
VG_API_CALL void vgDestroyPaint(VGPaint paint);
|
||||
VG_API_CALL void vgSetPaint(VGPaint paint, VGbitfield paintModes);
|
||||
VG_API_CALL VGPaint vgGetPaint(VGPaintMode paintMode);
|
||||
VG_API_CALL void vgSetColor(VGPaint paint, VGuint rgba);
|
||||
VG_API_CALL VGuint vgGetColor(VGPaint paint);
|
||||
VG_API_CALL void vgPaintPattern(VGPaint paint, VGImage pattern);
|
||||
|
||||
/* Images */
|
||||
VG_API_CALL VGImage vgCreateImage(VGImageFormat format,
|
||||
VGint width, VGint height,
|
||||
VGbitfield allowedQuality);
|
||||
VG_API_CALL void vgDestroyImage(VGImage image);
|
||||
VG_API_CALL void vgClearImage(VGImage image,
|
||||
VGint x, VGint y, VGint width, VGint height);
|
||||
VG_API_CALL void vgImageSubData(VGImage image,
|
||||
const void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint x, VGint y, VGint width, VGint height);
|
||||
VG_API_CALL void vgGetImageSubData(VGImage image,
|
||||
void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint x, VGint y,
|
||||
VGint width, VGint height);
|
||||
VG_API_CALL VGImage vgChildImage(VGImage parent,
|
||||
VGint x, VGint y, VGint width, VGint height);
|
||||
VG_API_CALL VGImage vgGetParent(VGImage image);
|
||||
VG_API_CALL void vgCopyImage(VGImage dst, VGint dx, VGint dy,
|
||||
VGImage src, VGint sx, VGint sy,
|
||||
VGint width, VGint height,
|
||||
VGboolean dither);
|
||||
VG_API_CALL void vgDrawImage(VGImage image);
|
||||
VG_API_CALL void vgSetPixels(VGint dx, VGint dy,
|
||||
VGImage src, VGint sx, VGint sy,
|
||||
VGint width, VGint height);
|
||||
VG_API_CALL void vgWritePixels(const void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint dx, VGint dy,
|
||||
VGint width, VGint height);
|
||||
VG_API_CALL void vgGetPixels(VGImage dst, VGint dx, VGint dy,
|
||||
VGint sx, VGint sy,
|
||||
VGint width, VGint height);
|
||||
VG_API_CALL void vgReadPixels(void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint sx, VGint sy,
|
||||
VGint width, VGint height);
|
||||
VG_API_CALL void vgCopyPixels(VGint dx, VGint dy,
|
||||
VGint sx, VGint sy,
|
||||
VGint width, VGint height);
|
||||
|
||||
/* Image Filters */
|
||||
VG_API_CALL void vgColorMatrix(VGImage dst, VGImage src,
|
||||
const VGfloat * matrix);
|
||||
VG_API_CALL void vgConvolve(VGImage dst, VGImage src,
|
||||
VGint kernelWidth, VGint kernelHeight,
|
||||
VGint shiftX, VGint shiftY,
|
||||
const VGshort * kernel,
|
||||
VGfloat scale,
|
||||
VGfloat bias,
|
||||
VGTilingMode tilingMode);
|
||||
VG_API_CALL void vgSeparableConvolve(VGImage dst, VGImage src,
|
||||
VGint kernelWidth,
|
||||
VGint kernelHeight,
|
||||
VGint shiftX, VGint shiftY,
|
||||
const VGshort * kernelX,
|
||||
const VGshort * kernelY,
|
||||
VGfloat scale,
|
||||
VGfloat bias,
|
||||
VGTilingMode tilingMode);
|
||||
VG_API_CALL void vgGaussianBlur(VGImage dst, VGImage src,
|
||||
VGfloat stdDeviationX,
|
||||
VGfloat stdDeviationY,
|
||||
VGTilingMode tilingMode);
|
||||
VG_API_CALL void vgLookup(VGImage dst, VGImage src,
|
||||
const VGubyte * redLUT,
|
||||
const VGubyte * greenLUT,
|
||||
const VGubyte * blueLUT,
|
||||
const VGubyte * alphaLUT,
|
||||
VGboolean outputLinear,
|
||||
VGboolean outputPremultiplied);
|
||||
VG_API_CALL void vgLookupSingle(VGImage dst, VGImage src,
|
||||
const VGuint * lookupTable,
|
||||
VGImageChannel sourceChannel,
|
||||
VGboolean outputLinear,
|
||||
VGboolean outputPremultiplied);
|
||||
|
||||
/* Hardware Queries */
|
||||
VG_API_CALL VGHardwareQueryResult vgHardwareQuery(VGHardwareQueryType key,
|
||||
VGint setting);
|
||||
|
||||
/* Renderer and Extension Information */
|
||||
VG_API_CALL const VGubyte * vgGetString(VGStringID name);
|
||||
|
||||
/* Extensions */
|
||||
|
||||
#define OVG_SH_blend_src_out 1
|
||||
#define OVG_SH_blend_dst_out 1
|
||||
#define OVG_SH_blend_src_atop 1
|
||||
#define OVG_SH_blend_dst_atop 1
|
||||
|
||||
VG_API_CALL VGboolean vgCreateContextSH(VGint width, VGint height);
|
||||
VG_API_CALL VGboolean vgHasContextSH();
|
||||
VG_API_CALL void vgResizeSurfaceSH(VGint width, VGint height);
|
||||
VG_API_CALL void vgDestroyContextSH(void);
|
||||
|
||||
|
||||
#if defined (__cplusplus)
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
#endif /* _OPENVG_H */
|
||||
104
simgear/canvas/ShivaVG/include/vg/vgu.h
Normal file
104
simgear/canvas/ShivaVG/include/vg/vgu.h
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Ivan Leben
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library in the file COPYING;
|
||||
* if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _VGU_H
|
||||
#define _VGU_H
|
||||
|
||||
#include "openvg.h"
|
||||
|
||||
#define VGU_VERSION_1_0 1
|
||||
#define VGU_VERSION_1_0_1 1
|
||||
|
||||
#ifndef VGU_API_CALL
|
||||
#define VGU_API_CALL VG_API_CALL
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
VGU_NO_ERROR = 0,
|
||||
VGU_BAD_HANDLE_ERROR = 0xF000,
|
||||
VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001,
|
||||
VGU_OUT_OF_MEMORY_ERROR = 0xF002,
|
||||
VGU_PATH_CAPABILITY_ERROR = 0xF003,
|
||||
VGU_BAD_WARP_ERROR = 0xF004
|
||||
} VGUErrorCode;
|
||||
|
||||
typedef enum {
|
||||
VGU_ARC_OPEN = 0xF100,
|
||||
VGU_ARC_CHORD = 0xF101,
|
||||
VGU_ARC_PIE = 0xF102
|
||||
} VGUArcType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
VGU_API_CALL VGUErrorCode vguLine(VGPath path,
|
||||
VGfloat x0, VGfloat y0,
|
||||
VGfloat x1, VGfloat y1);
|
||||
|
||||
VGU_API_CALL VGUErrorCode vguPolygon(VGPath path,
|
||||
const VGfloat * points, VGint count,
|
||||
VGboolean closed);
|
||||
|
||||
VGU_API_CALL VGUErrorCode vguRect(VGPath path,
|
||||
VGfloat x, VGfloat y,
|
||||
VGfloat width, VGfloat height);
|
||||
|
||||
VGU_API_CALL VGUErrorCode vguRoundRect(VGPath path,
|
||||
VGfloat x, VGfloat y,
|
||||
VGfloat width, VGfloat height,
|
||||
VGfloat arcWidth, VGfloat arcHeight);
|
||||
|
||||
VGU_API_CALL VGUErrorCode vguEllipse(VGPath path,
|
||||
VGfloat cx, VGfloat cy,
|
||||
VGfloat width, VGfloat height);
|
||||
|
||||
VGU_API_CALL VGUErrorCode vguArc(VGPath path,
|
||||
VGfloat x, VGfloat y,
|
||||
VGfloat width, VGfloat height,
|
||||
VGfloat startAngle, VGfloat angleExtent,
|
||||
VGUArcType arcType);
|
||||
|
||||
VGU_API_CALL VGUErrorCode vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0,
|
||||
VGfloat sx1, VGfloat sy1,
|
||||
VGfloat sx2, VGfloat sy2,
|
||||
VGfloat sx3, VGfloat sy3,
|
||||
VGfloat * matrix);
|
||||
|
||||
VGU_API_CALL VGUErrorCode vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0,
|
||||
VGfloat dx1, VGfloat dy1,
|
||||
VGfloat dx2, VGfloat dy2,
|
||||
VGfloat dx3, VGfloat dy3,
|
||||
VGfloat * matrix);
|
||||
|
||||
VGU_API_CALL VGUErrorCode vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0,
|
||||
VGfloat dx1, VGfloat dy1,
|
||||
VGfloat dx2, VGfloat dy2,
|
||||
VGfloat dx3, VGfloat dy3,
|
||||
VGfloat sx0, VGfloat sy0,
|
||||
VGfloat sx1, VGfloat sy1,
|
||||
VGfloat sx2, VGfloat sy2,
|
||||
VGfloat sx3, VGfloat sy3,
|
||||
VGfloat * matrix);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* #ifndef _VGU_H */
|
||||
30
simgear/canvas/ShivaVG/src/CMakeLists.txt
Normal file
30
simgear/canvas/ShivaVG/src/CMakeLists.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
include(SimGearComponent)
|
||||
|
||||
set(HEADERS
|
||||
../include/vg/openvg.h
|
||||
../include/vg/vgu.h
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
shArrays.c
|
||||
shArrays.h
|
||||
shContext.c
|
||||
shContext.h
|
||||
shExtensions.c
|
||||
shExtensions.h
|
||||
shGeometry.c
|
||||
shGeometry.h
|
||||
shImage.c
|
||||
shImage.h
|
||||
shPaint.c
|
||||
shPaint.h
|
||||
shParams.c
|
||||
shPath.c
|
||||
shPath.h
|
||||
shPipeline.c
|
||||
shVectors.c
|
||||
shVectors.h
|
||||
shVgu.c
|
||||
)
|
||||
|
||||
simgear_scene_component(ShivaVG canvas/ShivaVG "${SOURCES}" "${HEADERS}")
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user