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