1 : #VRML V2.0 utf8
2 :
3 : WorldInfo {
4 : info "Author: Martin Petricek"
5 : title "Stavba"
6 : }
7 :
8 : #cement appearance
9 : PROTO Cement [] {
10 : Appearance {
11 : material Material {
12 : diffuseColor 0.5 0.5 0.5
13 : shininess 0
14 : }
15 : }
16 : }
17 :
18 : #light wood appearance
19 : PROTO Wood [] {
20 : Appearance {
21 : material Material {
22 : diffuseColor 0.5 0.3 0
23 : }
24 : }
25 : }
26 :
27 : #dark wood appearance
28 : PROTO WoodDark [] {
29 : Appearance {
30 : material Material {
31 : diffuseColor 0.3 0.1 0
32 : }
33 : }
34 : }
35 :
36 : #cover over bricks material
37 : PROTO Cover [] {
38 : Appearance {
39 : material Material {
40 : diffuseColor 0.7 0.7 0.3
41 : shininess 0.3
42 : specularColor 1 1 1
43 : }
44 : }
45 : }
46 :
47 : #brick material
48 : PROTO Brick [] {
49 : Appearance {
50 : material Material {
51 : diffuseColor 0.85 0.2 0.1
52 : shininess 0
53 : }
54 : }
55 : }
56 :
57 : PROTO Paleta [
58 : exposedField SFVec3f pos 0 0 0 #pozice v prostoru
59 : exposedField SFRotation rot 0 0 1 0 #rotace
60 : ] {
61 : Transform {
62 : translation IS pos
63 : rotation IS rot
64 : children [
65 : #mid
66 : DEF Paleta1 Transform {
67 : translation 0 0.15 0
68 : children [
69 : Shape {
70 : appearance WoodDark{}
71 : geometry Box {
72 : size 0.2 0.2 1.5
73 : }
74 : }
75 : ]
76 : }
77 : Transform {
78 : translation 0.62 0 0
79 : children USE Paleta1
80 : }
81 : Transform {
82 : translation -0.62 0 0
83 : children USE Paleta1
84 : }
85 : #bottom
86 : DEF Paleta2 Transform {
87 : translation 0 0.025 0
88 : children [
89 : DEF Paleta3 Shape {
90 : appearance Wood{}
91 : geometry Box {
92 : size 1.5 0.05 0.2
93 : }
94 : }
95 : Transform {
96 : translation 0 0 0.65
97 : children USE Paleta3
98 : }
99 : Transform {
100 : translation 0 0 -0.65
101 : children USE Paleta3
102 : }
103 : Transform {
104 : translation 0 0 0.35
105 : children USE Paleta3
106 : }
107 : Transform {
108 : translation 0 0 -0.35
109 : children USE Paleta3
110 : }
111 : ]
112 : }
113 : #top
114 : Transform {
115 : translation 0 0.25 0
116 : children USE Paleta2
117 : }
118 : ]
119 : }
120 : }
121 :
122 : #paleta s plachtou
123 : PROTO PaletaB [
124 : exposedField SFVec3f pos 0 0 0 #pozice v prostoru
125 : exposedField SFRotation rot 0 0 1 0 #pozice v prostoru
126 : ] {
127 : Group {
128 : children [
129 : Paleta {
130 : pos IS pos
131 : rot IS rot
132 : }
133 : Transform {
134 : translation IS pos
135 : rotation IS rot
136 : children Transform {
137 : translation 0 0.9 0
138 : children Shape {
139 : appearance Cover {}
140 : geometry Box{
141 : size 1.5 1.2 1.5
142 : }
143 : }
144 : }
145 : }
146 : ]
147 : }
148 : }
149 :
150 : #paleta s cihlama
151 : PROTO PaletaC [
152 : exposedField SFVec3f pos 0 0 0 #pozice v prostoru
153 : exposedField SFRotation rot 0 0 1 0 #pozice v prostoru
154 : ] {
155 : Group {
156 : children [
157 : Paleta {
158 : pos IS pos
159 : rot IS rot
160 : }
161 : Transform {
162 : translation IS pos
163 : rotation IS rot
164 : children [
165 : Transform {
166 : translation 0 0.6 0
167 : children Shape {
168 : appearance Brick {}
169 : geometry Box{
170 : size 1.5 0.6 1.5
171 : }
172 : }
173 : }
174 : Transform {
175 : translation 0.15 0.95 0
176 : children Shape {
177 : appearance Brick {}
178 : geometry Box{
179 : size 1.2 0.1 1.5
180 : }
181 : }
182 : }
183 : Shape {
184 : appearance Brick {}
185 : geometry Extrusion {
186 : beginCap FALSE
187 : endCap TRUE
188 : convex FALSE
189 : solid TRUE
190 : spine [0 1 0, 0 1.1 0]
191 : crossSection [
192 : 0.75 0.75,
193 : 0.75 -0.6,
194 : -0.45 -0.6,
195 : -0.45 -0.3,
196 : -0.15 -0.3,
197 : -0.15 0,
198 : 0.15 0,
199 : 0.15 0.6,
200 : 0.45 0.6,
201 : 0.45 0.75,
202 : 0.75 0.75
203 : ]
204 : }
205 : }
206 : Transform {
207 : translation 0.4 1.15 -0.3
208 : children Shape {
209 : appearance Brick {}
210 : geometry Box{
211 : size 0.6 0.1 0.45
212 : }
213 : }
214 : }
215 : ]
216 : }
217 : ]
218 : }
219 : }
220 :
221 : PROTO Log [
222 : exposedField SFVec3f pos 0 0 0 #pozice v prostoru
223 : ] {
224 : Transform {
225 : translation IS pos
226 : children Transform {
227 : translation 0 0.15 0
228 : children Shape {
229 : appearance Wood{}
230 : geometry Box {
231 : size 3 0.3 0.3
232 : }
233 : }
234 : }
235 : }
236 : }
237 :
238 :
239 : PROTO Cihla [
240 : exposedField SFVec3f pos 0 0 0 #pozice v prostoru
241 : exposedField SFRotation rot 0 0 1 0 #pozice v prostoru
242 : ] {
243 : Transform {
244 : translation IS pos
245 : rotation IS rot
246 : children Shape {
247 : appearance Brick {}
248 : geometry Box {
249 : size 0.3 0.1 0.15
250 : }
251 : }
252 : }
253 : }
254 :
255 : PROTO Zed1 [] {
256 : Transform {
257 : children Shape {
258 : appearance Brick {}
259 : geometry Extrusion {
260 : beginCap TRUE
261 : endCap TRUE
262 : convex FALSE
263 : solid TRUE
264 : spine [-4.9 1 -5, -4.9 1 -4.7]
265 : crossSection [
266 : -0.55 -0.3,
267 : -0.70 -0.3,
268 : -0.70 -0.4,
269 : -0.85 -0.4,
270 : -0.85 -0.5,
271 : -1.00 -0.5,
272 : -1.00 -0.6,
273 : -1.75 -0.6,
274 : -1.75 -1.0,
275 : -1.90 -1.0,
276 : -1.90 -1.1,
277 : -2.15 -1.1,
278 : -2.15 -1.0,
279 : -2.30 -1.0,
280 : -2.30 0.0,
281 : -0.00 0.0,
282 : -0.00 -0.1,
283 : -0.15 -0.1,
284 : -0.15 -0.2,
285 : -0.55 -0.2,
286 : -0.55 -0.3
287 : ]
288 : }
289 : }
290 : }
291 : }
292 :
293 : #pytel s cementem
294 : PROTO Pyttel [
295 : exposedField SFVec3f pos 0 0 0 #pozice v prostoru
296 : ] {
297 : Transform {
298 : translation IS pos
299 : children Transform {
300 : translation 0 0.08 0
301 : scale 1 0.02 1
302 : children [
303 : DEF Pytel1 Shape {
304 : appearance Appearance {
305 : material Material {
306 : diffuseColor 0.9 0.9 0.7
307 : shininess 0
308 : ambientIntensity 0.6
309 : }
310 : }
311 : geometry ElevationGrid {
312 : xDimension 5
313 : zDimension 7
314 : xSpacing 0.1
315 : zSpacing 0.1
316 : creaseAngle 99
317 : height [
318 : 0 0 0 0 0
319 : 0 2 3 2 0
320 : 0 3 4 3 0
321 : 0 4 4 4 0
322 : 0 3 4 3 0
323 : 0 2 3 2 0
324 : 0 0 0 0 0
325 : ]
326 : }
327 : }
328 : Transform {
329 : rotation 0 0 1 3.14
330 : translation 0.4 0 0
331 : children USE Pytel1
332 : }
333 : ]
334 : }
335 : }
336 : }
337 :
338 : PROTO Base [] {
339 : Group {
340 : children [
341 : #podezdivka
342 : Transform {
343 : translation 0 0.5 0
344 : children [
345 : Shape {
346 : appearance Cement {}
347 : geometry Box {
348 : size 15 1 10
349 : }
350 : }
351 : ]
352 : }
353 : #schody
354 : Transform {
355 : translation 0 0.1 6.85
356 : scale 1 1 0.3
357 : children [
358 : DEF Stair Shape {
359 : appearance Cement {}
360 : geometry Box {
361 : size 1.5 0.2 1
362 : }
363 : }
364 : ]
365 : }
366 : Transform {
367 : translation 0 0.2 6.55
368 : scale 1 2 0.3
369 : children USE Stair
370 : }
371 : Transform {
372 : translation 0 0.3 6.25
373 : scale 1 3 0.3
374 : children USE Stair
375 : }
376 : Transform {
377 : translation 0 0.4 5.95
378 : scale 1 4 0.3
379 : children USE Stair
380 : }
381 : Transform {
382 : translation 0 0.5 5.4
383 : scale 1 5 0.8
384 : children USE Stair
385 : }
386 : ]
387 : }
388 : }
389 :
390 : Base {}
391 :
392 : Paleta {
393 : pos 3 1 2
394 : rot 0 1 0 -0.3
395 : }
396 :
397 : Paleta {
398 : pos -4 1 3
399 : rot 0 1 0 55
400 : }
401 : Paleta {
402 : pos -4.1 1.3 3
403 : rot 0 1 0 1
404 : }
405 : Paleta {
406 : pos -4 1.6 3.1
407 : }
408 :
409 : PaletaB {
410 : pos -2 1 -1
411 : rot 0 1 0 0.3
412 : }
413 :
414 : PaletaC {
415 : pos 5 1 -3
416 : rot 0 1 0 0.4
417 : }
418 :
419 : PaletaB{
420 : pos -5.5 1 -2.5
421 : rot 0 1 0 0.2
422 : }
423 :
424 : Log { pos 5.5 1 0 }
425 : Log { pos 5.6 1 0.4 }
426 : Log { pos 5.4 1 0.9 }
427 : Log { pos 5.7 1 1.25 }
428 : Transform {
429 : rotation 0 1 0 -0.15
430 : center 5 0 0
431 : children [
432 : Log { pos 5.5 1.3 0.5 }
433 : Log { pos 5.6 1.3 0.9 }
434 : ]
435 : }
436 :
437 : Zed1 {}
438 :
439 : Transform {
440 : translation -7.35 1.75 -4.85
441 : children Shape {
442 : appearance Brick {}
443 : geometry Box {
444 : size 0.3 1.5 0.3
445 : }
446 : }
447 : }
448 :
449 : Transform {
450 : rotation 0 1 0 -1.57
451 : center -7.35 1.75 -4.85
452 : children Transform {
453 : children Zed1 {}
454 : }
455 : }
456 :
457 : Transform {
458 : translation 0 0 -4
459 : children [
460 : Cihla {pos 0.7 1.05 4.2 rot 0 1 0 1 }
461 : Cihla {pos 1.1 1.05 2.3 rot 0 1 0 2 }
462 : Cihla {pos 2.6 1.05 4.5 rot 0 1 0 3 }
463 : Cihla {pos 0.9 1.05 2.0 rot 0 1 0 4 }
464 : Cihla {pos 1.6 1.05 4.1 rot 0 1 0 5 }
465 : Cihla {pos 1.8 1.05 1.4 rot 0 1 0 6 }
466 : Cihla {pos 2.1 1.05 3.3 rot 0 1 0 7 }
467 : Cihla {pos 3.4 1.05 3.2 rot 0 1 0 8 }
468 : Cihla {pos 4.3 1.05 2.1 rot 0 1 0 9 }
469 : ]
470 : }
471 :
472 : Transform {
473 : translation -0.75 2 4.85
474 : children DEF Sloupek Shape {
475 : appearance Cement {}
476 : geometry Box {
477 : size 0.3 2 0.3
478 : }
479 : }
480 :
481 : }
482 :
483 : Transform {
484 : translation 0.75 2 4.85
485 : children USE Sloupek
486 : }
487 :
488 : Transform {
489 : translation 0 3.15 4.85
490 : scale 1 1 1
491 : children Shape {
492 : appearance Cement {}
493 : geometry Box {
494 : size 1.8 0.3 0.3
495 : }
496 : }
497 : }
498 :
499 : Transform {
500 : translation 7.35 1.05 0
501 : children Shape {
502 : appearance Brick {}
503 : geometry Box {
504 : size 0.3 0.1 10
505 : }
506 : }
507 : }
508 :
509 : Transform {
510 : translation 7.35 1.15 0.075
511 : children Shape {
512 : appearance Brick {}
513 : geometry Box {
514 : size 0.3 0.1 9.85
515 : }
516 : }
517 : }
518 :
519 : Transform {
520 : translation 4.05 1.15 4.85
521 : children Shape {
522 : appearance Brick {}
523 : geometry Box {
524 : size 6.3 0.3 0.3
525 : }
526 : }
527 : }
528 :
529 :
530 : Transform {
531 : translation -3 1 1
532 : children Shape {
533 : appearance Appearance {
534 : material Material {
535 : diffuseColor 0.8 0.8 0
536 : shininess 0
537 : }
538 : }
539 : geometry Cone {
540 : bottom FALSE
541 : height 0.7
542 : bottomRadius 1.3
543 : }
544 : }
545 : }
546 :
547 : Pyttel { pos 1 1 4 }
548 : Pyttel { pos 1.3 1 4 }
549 : Pyttel { pos 1.6 1 4 }
550 : Pyttel { pos 1.1 1.13 4 }
551 : Pyttel { pos 1.4 1.13 4 }
552 :
553 : Transform {
554 : rotation 0 1 0 5
555 : children Pyttel { pos 1 1 1}
556 : }