aboutsummaryrefslogtreecommitdiff
path: root/assets/interlocking.html.LyXconv/interlocking.css
blob: 461af3cea79cdbbc0962b8acf1f31e632fe674dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
 
/* start css.sty */
.ecsx-1728{font-size:170%; font-weight: bold;}
.ecsx-1728{ font-weight: bold;}
.ecsx-1728{ font-weight: bold;}
.ecsx-1728{ font-weight: bold;}
.ecsx-1728{ font-weight: bold;}
.ecsx-1728{ font-weight: bold;}
.ecsx-1728{ font-weight: bold;}
.ecsx-1728{ font-weight: bold;}
.ecst-1440{font-size:140%;}
.ecsx-1200{font-size:120%; font-weight: bold;}
.ecsx-1200{ font-weight: bold;}
.ecsx-1200{ font-weight: bold;}
.ecsx-1200{ font-weight: bold;}
.ecsx-1200{ font-weight: bold;}
.ecsx-1200{ font-weight: bold;}
.ecsx-1200{ font-weight: bold;}
.ecsx-1200{ font-weight: bold;}
.ecsx-1000{ font-weight: bold;}
.ecsx-1000{ font-weight: bold;}
.ecsx-1000{ font-weight: bold;}
.ecsx-1000{ font-weight: bold;}
.ecsx-1000{ font-weight: bold;}
.ecsx-1000{ font-weight: bold;}
.ecsx-1000{ font-weight: bold;}
.ecsx-1000{ font-weight: bold;}
.ecbx-1000{ font-weight: bold;}
.ecbx-1000{ font-weight: bold;}
.ecbx-1000{ font-weight: bold;}
.ecbx-1000{ font-weight: bold;}
.ecbx-1000{ font-weight: bold;}
.ecbx-1000{ font-weight: bold;}
.ecbx-1000{ font-weight: bold;}
.ecbx-1000{ font-weight: bold;}
.ecti-1000{ font-style: italic;}
.ecti-1000{ font-style: italic;}
.ecti-1000{ font-style: italic;}
.ecti-1000{ font-style: italic;}
.ecti-1000{ font-style: italic;}
.ecti-1000{ font-style: italic;}
.ecti-1000{ font-style: italic;}
.ecti-1000{ font-style: italic;}
.ectt-1000{ font-family: monospace;}
.ectt-1000{ font-family: monospace;}
.ectt-1000{ font-family: monospace;}
.ectt-1000{ font-family: monospace;}
.ectt-1000{ font-family: monospace;}
.ectt-1000{ font-family: monospace;}
.ectt-1000{ font-family: monospace;}
.ectt-1000{ font-family: monospace;}
p.noindent { text-indent: 0em }
td p.noindent { text-indent: 0em; margin-top:0em; }
p.nopar { text-indent: 0em; }
p.indent{ text-indent: 1.5em }
@media print {div.crosslinks {visibility:hidden;}}
a img { border-top: 0; border-left: 0; border-right: 0; }
center { margin-top:1em; margin-bottom:1em; }
td center { margin-top:0em; margin-bottom:0em; }
.Canvas { position:relative; }
img.math{vertical-align:middle;}
li p.indent { text-indent: 0em }
li p:first-child{ margin-top:0em; }
li p:last-child, li div:last-child { margin-bottom:0.5em; }
li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; }
.enumerate1 {list-style-type:decimal;}
.enumerate2 {list-style-type:lower-alpha;}
.enumerate3 {list-style-type:lower-roman;}
.enumerate4 {list-style-type:upper-alpha;}
div.newtheorem { margin-bottom: 2em; margin-top: 2em;}
.obeylines-h,.obeylines-v {white-space: nowrap; }
div.obeylines-v p { margin-top:0; margin-bottom:0; }
.overline{ text-decoration:overline; }
.overline img{ border-top: 1px solid black; }
td.displaylines {text-align:center; white-space:nowrap;}
.centerline {text-align:center;}
.rightline {text-align:right;}
div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; }
.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; }
div.fbox {display:table}
div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; }
div.minipage{width:100%;}
div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;}
div.center div {text-align: left;}
div.flushright, div.flushright div.flushright {text-align: right;}
div.flushright div {text-align: left;}
div.flushleft {text-align: left;}
.underline{ text-decoration:underline; }
.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; }
.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; }
.framebox-c {text-align:center;}
.framebox-l {text-align:left;}
.framebox-r {text-align:right;}
span.thank-mark{ vertical-align: super }
span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; }
div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; }
table.tabular td p{margin-top:0em;}
table.tabular {margin-left: auto; margin-right: auto;}
td p:first-child{ margin-top:0em; }
td p:last-child{ margin-bottom:0em; }
div.td00{ margin-left:0pt; margin-right:0pt; }
div.td01{ margin-left:0pt; margin-right:5pt; }
div.td10{ margin-left:5pt; margin-right:0pt; }
div.td11{ margin-left:5pt; margin-right:5pt; }
table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; }
td.td00{ padding-left:0pt; padding-right:0pt; }
td.td01{ padding-left:0pt; padding-right:5pt; }
td.td10{ padding-left:5pt; padding-right:0pt; }
td.td11{ padding-left:5pt; padding-right:5pt; }
table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; }
.hline hr, .cline hr{ height : 1px; margin:0px; }
.tabbing-right {text-align:right;}
span.TEX {letter-spacing: -0.125em; }
span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;}
a span.TEX span.E {text-decoration: none; }
span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;}
span.LATEX span.TEX{ position:relative; left: -0.4em; }
div.float, div.figure {margin-left: auto; margin-right: auto;}
div.float img {text-align:center;}
div.figure img {text-align:center;}
.marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;}
.marginpar p{margin-top:0.4em; margin-bottom:0.4em;}
table.equation {width:100%;}
.equation td{text-align:center; }
td.equation { margin-top:1em; margin-bottom:1em; } 
td.equation-label { width:5%; text-align:center; }
td.eqnarray4 { width:5%; white-space: normal; }
td.eqnarray2 { width:5%; }
table.eqnarray-star, table.eqnarray {width:100%;}
div.eqnarray{text-align:center;}
div.array {text-align:center;}
div.pmatrix {text-align:center;}
table.pmatrix {width:100%;}
span.pmatrix img{vertical-align:middle;}
div.pmatrix {text-align:center;}
table.pmatrix {width:100%;}
span.bar-css {text-decoration:overline;}
img.cdots{vertical-align:middle;}
.figure img.graphics {margin-left:10%;}
/* end css.sty */

hl opt">, 1); suncolor_f.r = 1; suncolor_f.g = MYMAX(0.3, MYMIN(1.0, 0.7 + m_time_brightness * 0.5)); suncolor_f.b = MYMAX(0.0, m_brightness * 0.95); video::SColorf suncolor2_f(1, 1, 1, 1); suncolor_f.r = 1; suncolor_f.g = MYMAX(0.3, MYMIN(1.0, 0.85 + m_time_brightness * 0.5)); suncolor_f.b = MYMAX(0.0, m_brightness); float moonsize = 0.04; video::SColorf mooncolor_f(0.50, 0.57, 0.65, 1); video::SColorf mooncolor2_f(0.85, 0.875, 0.9, 1); float nightlength = 0.415; float wn = nightlength / 2; float wicked_time_of_day = 0; if (m_time_of_day > wn && m_time_of_day < 1.0 - wn) wicked_time_of_day = (m_time_of_day - wn) / (1.0 - wn * 2) * 0.5 + 0.25; else if (m_time_of_day < 0.5) wicked_time_of_day = m_time_of_day / wn * 0.25; else wicked_time_of_day = 1.0 - ((1.0 - m_time_of_day) / wn * 0.25); /*std::cerr<<"time_of_day="<<m_time_of_day<<" -> " <<"wicked_time_of_day="<<wicked_time_of_day<<std::endl;*/ video::SColor suncolor = suncolor_f.toSColor(); video::SColor suncolor2 = suncolor2_f.toSColor(); video::SColor mooncolor = mooncolor_f.toSColor(); video::SColor mooncolor2 = mooncolor2_f.toSColor(); // Calculate offset normalized to the X dimension of a 512x1 px tonemap float offset = (1.0 - fabs(sin((m_time_of_day - 0.5) * irr::core::PI))) * 511; if (m_sun_tonemap) { u8 * texels = (u8 *)m_sun_tonemap->lock(); video::SColor* texel = (video::SColor *)(texels + (u32)offset * 4); video::SColor texel_color (255, texel->getRed(), texel->getGreen(), texel->getBlue()); m_sun_tonemap->unlock(); m_materials[3].EmissiveColor = texel_color; } if (m_moon_tonemap) { u8 * texels = (u8 *)m_moon_tonemap->lock(); video::SColor* texel = (video::SColor *)(texels + (u32)offset * 4); video::SColor texel_color (255, texel->getRed(), texel->getGreen(), texel->getBlue()); m_moon_tonemap->unlock(); m_materials[4].EmissiveColor = texel_color; } const f32 t = 1.0f; const f32 o = 0.0f; static const u16 indices[4] = {0, 1, 2, 3}; video::S3DVertex vertices[4]; driver->setMaterial(m_materials[1]); video::SColor cloudyfogcolor = m_bgcolor; // Draw far cloudy fog thing blended with skycolor for (u32 j = 0; j < 4; j++) { video::SColor c = cloudyfogcolor.getInterpolated(m_skycolor, 0.45); vertices[0] = video::S3DVertex(-1, 0.08, -1, 0, 0, 1, c, t, t); vertices[1] = video::S3DVertex( 1, 0.08, -1, 0, 0, 1, c, o, t); vertices[2] = video::S3DVertex( 1, 0.12, -1, 0, 0, 1, c, o, o); vertices[3] = video::S3DVertex(-1, 0.12, -1, 0, 0, 1, c, t, o); for (u32 i = 0; i < 4; i++) { if (j == 0) // Don't switch {} else if (j == 1) // Switch from -Z (south) to +X (east) vertices[i].Pos.rotateXZBy(90); else if (j == 2) // Switch from -Z (south) to -X (west) vertices[i].Pos.rotateXZBy(-90); else // Switch from -Z (south) to +Z (north) vertices[i].Pos.rotateXZBy(-180); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); } // Draw far cloudy fog thing for (u32 j = 0; j < 4; j++) { video::SColor c = cloudyfogcolor; vertices[0] = video::S3DVertex(-1, -1.0, -1, 0, 0, 1, c, t, t); vertices[1] = video::S3DVertex( 1, -1.0, -1, 0, 0, 1, c, o, t); vertices[2] = video::S3DVertex( 1, 0.08, -1, 0, 0, 1, c, o, o); vertices[3] = video::S3DVertex(-1, 0.08, -1, 0, 0, 1, c, t, o); for (u32 i = 0; i < 4; i++) { if (j == 0) // Don't switch {} else if (j == 1) // Switch from -Z (south) to +X (east) vertices[i].Pos.rotateXZBy(90); else if (j == 2) // Switch from -Z (south) to -X (west) vertices[i].Pos.rotateXZBy(-90); else // Switch from -Z (south) to +Z (north) vertices[i].Pos.rotateXZBy(-180); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); } // Draw bottom far cloudy fog thing video::SColor c = cloudyfogcolor; vertices[0] = video::S3DVertex(-1, -1.0, -1, 0, 1, 0, c, t, t); vertices[1] = video::S3DVertex( 1, -1.0, -1, 0, 1, 0, c, o, t); vertices[2] = video::S3DVertex( 1, -1.0, 1, 0, 1, 0, c, o, o); vertices[3] = video::S3DVertex(-1, -1.0, 1, 0, 1, 0, c, t, o); driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); // If sun, moon and stars are (temporarily) disabled, abort here if (!m_bodies_visible) return; driver->setMaterial(m_materials[2]); // Draw sunrise/sunset horizon glow texture (textures/base/pack/sunrisebg.png) { float mid1 = 0.25; float mid = wicked_time_of_day < 0.5 ? mid1 : (1.0 - mid1); float a_ = 1.0 - fabs(wicked_time_of_day - mid) * 35.0; float a = easeCurve(MYMAX(0, MYMIN(1, a_))); //std::cerr<<"a_="<<a_<<" a="<<a<<std::endl; video::SColor c(255, 255, 255, 255); float y = -(1.0 - a) * 0.22; vertices[0] = video::S3DVertex(-1, -0.05 + y, -1, 0, 0, 1, c, t, t); vertices[1] = video::S3DVertex( 1, -0.05 + y, -1, 0, 0, 1, c, o, t); vertices[2] = video::S3DVertex( 1, 0.2 + y, -1, 0, 0, 1, c, o, o); vertices[3] = video::S3DVertex(-1, 0.2 + y, -1, 0, 0, 1, c, t, o); for (u32 i = 0; i < 4; i++) { if (wicked_time_of_day < 0.5) // Switch from -Z (south) to +X (east) vertices[i].Pos.rotateXZBy(90); else // Switch from -Z (south) to -X (west) vertices[i].Pos.rotateXZBy(-90); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); } // Draw sun if (wicked_time_of_day > 0.15 && wicked_time_of_day < 0.85) { if (!m_sun_texture) { driver->setMaterial(m_materials[1]); float d = sunsize * 1.7; video::SColor c = suncolor; c.setAlpha(0.05 * 255); vertices[0] = video::S3DVertex(-d, -d, -1, 0, 0, 1, c, t, t); vertices[1] = video::S3DVertex( d, -d, -1, 0, 0, 1, c, o, t); vertices[2] = video::S3DVertex( d, d, -1, 0, 0, 1, c, o, o); vertices[3] = video::S3DVertex(-d, d, -1, 0, 0, 1, c, t, o); for (u32 i = 0; i < 4; i++) { // Switch from -Z (south) to +X (east) vertices[i].Pos.rotateXZBy(90); vertices[i].Pos.rotateXYBy(wicked_time_of_day * 360 - 90); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); d = sunsize * 1.2; c = suncolor; c.setAlpha(0.15 * 255); vertices[0] = video::S3DVertex(-d, -d, -1, 0, 0, 1, c, t, t); vertices[1] = video::S3DVertex( d, -d, -1, 0, 0, 1, c, o, t); vertices[2] = video::S3DVertex( d, d, -1, 0, 0, 1, c, o, o); vertices[3] = video::S3DVertex(-d, d, -1, 0, 0, 1, c, t, o); for (u32 i = 0; i < 4; i++) { // Switch from -Z (south) to +X (east) vertices[i].Pos.rotateXZBy(90); vertices[i].Pos.rotateXYBy(wicked_time_of_day * 360 - 90); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); d = sunsize; vertices[0] = video::S3DVertex(-d, -d, -1, 0, 0, 1, suncolor, t, t); vertices[1] = video::S3DVertex( d, -d, -1, 0, 0, 1, suncolor, o, t); vertices[2] = video::S3DVertex( d, d, -1, 0, 0, 1, suncolor, o, o); vertices[3] = video::S3DVertex(-d, d, -1, 0, 0, 1, suncolor, t, o); for (u32 i = 0; i < 4; i++) { // Switch from -Z (south) to +X (east) vertices[i].Pos.rotateXZBy(90); vertices[i].Pos.rotateXYBy(wicked_time_of_day * 360 - 90); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); d = sunsize * 0.7; vertices[0] = video::S3DVertex(-d, -d, -1, 0, 0, 1, suncolor2, t, t); vertices[1] = video::S3DVertex( d, -d, -1, 0, 0, 1, suncolor2, o, t); vertices[2] = video::S3DVertex( d, d, -1, 0, 0, 1, suncolor2, o, o); vertices[3] = video::S3DVertex(-d, d, -1, 0, 0, 1, suncolor2, t, o); for (u32 i = 0; i < 4; i++) { // Switch from -Z (south) to +X (east) vertices[i].Pos.rotateXZBy(90); vertices[i].Pos.rotateXYBy(wicked_time_of_day * 360 - 90); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); } else { driver->setMaterial(m_materials[3]); float d = sunsize * 1.7; video::SColor c; if (m_sun_tonemap) c = video::SColor (0, 0, 0, 0); else c = video::SColor (255, 255, 255, 255); vertices[0] = video::S3DVertex(-d, -d, -1, 0, 0, 1, c, t, t); vertices[1] = video::S3DVertex( d, -d, -1, 0, 0, 1, c, o, t); vertices[2] = video::S3DVertex( d, d, -1, 0, 0, 1, c, o, o); vertices[3] = video::S3DVertex(-d, d, -1, 0, 0, 1, c, t, o); for(u32 i = 0; i < 4; i++) { // Switch from -Z (south) to +X (east) vertices[i].Pos.rotateXZBy(90); vertices[i].Pos.rotateXYBy(wicked_time_of_day * 360 - 90); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); } } // Draw moon if (wicked_time_of_day < 0.3 || wicked_time_of_day > 0.7) { if (!m_moon_texture) { driver->setMaterial(m_materials[1]); float d = moonsize * 1.9; video::SColor c = mooncolor; c.setAlpha(0.05 * 255); vertices[0] = video::S3DVertex(-d, -d, -1, 0, 0, 1, c, t, t); vertices[1] = video::S3DVertex( d, -d, -1, 0, 0, 1, c, o, t); vertices[2] = video::S3DVertex( d, d, -1, 0, 0, 1, c, o, o); vertices[3] = video::S3DVertex(-d, d, -1, 0, 0, 1, c, t, o); for (u32 i = 0; i < 4; i++) { // Switch from -Z (south) to -X (west) vertices[i].Pos.rotateXZBy(-90); vertices[i].Pos.rotateXYBy(wicked_time_of_day * 360 - 90); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); d = moonsize * 1.3; c = mooncolor; c.setAlpha(0.15 * 255); vertices[0] = video::S3DVertex(-d, -d, -1, 0, 0, 1, c, t, t); vertices[1] = video::S3DVertex( d, -d, -1, 0, 0, 1, c, o, t); vertices[2] = video::S3DVertex( d, d, -1, 0, 0, 1, c, o, o); vertices[3] = video::S3DVertex(-d, d, -1, 0, 0, 1, c, t, o); for (u32 i = 0; i < 4; i++) { // Switch from -Z (south) to -X (west) vertices[i].Pos.rotateXZBy(-90); vertices[i].Pos.rotateXYBy(wicked_time_of_day * 360 - 90); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); d = moonsize; vertices[0] = video::S3DVertex(-d, -d, -1, 0, 0, 1, mooncolor, t, t); vertices[1] = video::S3DVertex( d, -d, -1, 0, 0, 1, mooncolor, o, t); vertices[2] = video::S3DVertex( d, d, -1, 0, 0, 1, mooncolor, o, o); vertices[3] = video::S3DVertex(-d, d, -1, 0, 0, 1, mooncolor, t, o); for (u32 i = 0; i < 4; i++) { // Switch from -Z (south) to -X (west) vertices[i].Pos.rotateXZBy(-90); vertices[i].Pos.rotateXYBy(wicked_time_of_day * 360 - 90); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); float d2 = moonsize * 0.6; vertices[0] = video::S3DVertex(-d, -d, -1, 0, 0, 1, mooncolor2, t, t); vertices[1] = video::S3DVertex( d2,-d, -1, 0, 0, 1, mooncolor2, o, t); vertices[2] = video::S3DVertex( d2, d2, -1, 0, 0, 1, mooncolor2, o, o); vertices[3] = video::S3DVertex(-d, d2, -1, 0, 0, 1, mooncolor2, t, o); for (u32 i = 0; i < 4; i++) { // Switch from -Z (south) to -X (west) vertices[i].Pos.rotateXZBy(-90); vertices[i].Pos.rotateXYBy(wicked_time_of_day * 360 - 90); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); } else { driver->setMaterial(m_materials[4]); float d = moonsize * 1.9; video::SColor c; if (m_moon_tonemap) c = video::SColor (0, 0, 0, 0); else c = video::SColor (255, 255, 255, 255); vertices[0] = video::S3DVertex(-d, -d, -1, 0, 0, 1, c, t, t); vertices[1] = video::S3DVertex( d, -d, -1, 0, 0, 1, c, o, t); vertices[2] = video::S3DVertex( d, d, -1, 0, 0, 1, c, o, o); vertices[3] = video::S3DVertex(-d, d, -1, 0, 0, 1, c, t, o); for (u32 i = 0; i < 4; i++) { // Switch from -Z (south) to -X (west) vertices[i].Pos.rotateXZBy(-90); vertices[i].Pos.rotateXYBy(wicked_time_of_day * 360 - 90); } driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2); } } // Draw stars do { driver->setMaterial(m_materials[1]); float starbrightness = MYMAX(0, MYMIN(1,