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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Castle Game Engine: CastleSceneManager: Class TCastleSceneManager</title>
<meta name="generator" content="PasDoc 0.13.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<a name="TCastleSceneManager"></a><h1 class="cio">Class TCastleSceneManager</h1>
<table class="sections wide_list">
<tr>
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td><a class="section" href="#PasDoc-Fields">Fields</a></td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
<a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="CastleSceneManager.html">CastleSceneManager</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TCastleSceneManager = class(<a class="normal" href="CastleSceneManager.TCastleAbstractViewport.html">TCastleAbstractViewport</a>)</code></p>
<h2 class="description">Description</h2>
<p>
Scene manager that knows about all 3D things inside your world.
<p>Single scenes/models (like <a class="normal" href="CastleScene.TCastleScene.html">TCastleScene</a> or <a class="normal" href="CastlePrecalculatedAnimation.TCastlePrecalculatedAnimation.html">TCastlePrecalculatedAnimation</a> instances) can be rendered directly, but it's not always comfortable. Scenes have to assume that they are "one of the many" inside your 3D world, which means that multi-pass rendering techniques have to be implemented at a higher level. This concerns the need for multiple passes from the same camera (for shadow volumes) and multiple passes from different cameras (for generating textures for shadow maps, cube map environment etc.).
<p>Scene manager overcomes this limitation. A single SceneManager object knows about all 3D things in your world, and renders them all for you, taking care of doing multiple rendering passes for particular features. Naturally, it also serves as container for all your visible 3D scenes.
<p><a class="normal" href="CastleSceneManager.TCastleSceneManager.html#Items">Items</a> property keeps a tree of <a class="normal" href="Castle3D.T3D.html">T3D</a> objects. All our 3D objects, like <a class="normal" href="CastleSceneCore.TCastleSceneCore.html">TCastleSceneCore</a> (and so also <a class="normal" href="CastleScene.TCastleScene.html">TCastleScene</a>) and <a class="normal" href="CastlePrecalculatedAnimationCore.TCastlePrecalculatedAnimationCore.html">TCastlePrecalculatedAnimationCore</a> (and so also <a class="normal" href="CastlePrecalculatedAnimation.TCastlePrecalculatedAnimation.html">TCastlePrecalculatedAnimation</a>) descend from <a class="normal" href="Castle3D.T3D.html">T3D</a>, and you can add them to the scene manager. And naturally you can implement your own <a class="normal" href="Castle3D.T3D.html">T3D</a> descendants, representing any 3D (possibly dynamic, animated and even interactive) object.
<p><a class="normal" href="CastleSceneManager.TCastleSceneManager.html#Render">TCastleSceneManager.Render</a> can assume that it's the <i>only</i> manager rendering to the screen (although you can safely render more 3D geometry *after* calling <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#Render">TCastleSceneManager.Render</a>). So it's Render method takes care of
<p></p>
<ul class="paragraph_spacing">
<li><p>clearing the screen,</p></li>
<li><p>rendering the background of the scene,</p></li>
<li><p>rendering the headlight,</p></li>
<li><p>rendering the scene from given camera,</p></li>
<li><p>and making multiple passes for shadow volumes and generated textures.</p></li>
</ul>
<p>
<p>For some of these features, you'll have to set the <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#MainScene">MainScene</a> property.
<p>This is a <a class="normal" href="CastleUIControls.TUIControl.html">TUIControl</a> descendant, which means it's advised usage is to add this to <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Controls">TCastleWindowCustom.Controls</a> or <a class="normal" href="CastleControl.TCastleControlCustom.html#Controls">TCastleControlCustom.Controls</a>. This passes relevant <a class="normal" href="CastleUIControls.TUIControl.html">TUIControl</a> events to all the <a class="normal" href="Castle3D.T3D.html">T3D</a> objects inside. Note that even when you set <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#DefaultViewport">DefaultViewport</a> = <code>False</code> (and use custom viewports, by <a class="normal" href="CastleSceneManager.TCastleViewport.html">TCastleViewport</a> class, to render your 3D world), you still should add scene manager to the controls list (this allows e.g. 3D items to receive <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#Update">Update</a> events).</p>
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TComponent</li>
<li class="ancestor"><a class="normal" href="CastleUIControls.TInputListener.html">TInputListener</a></li>
<li class="ancestor"><a class="normal" href="CastleUIControls.TUIControl.html">TUIControl</a></li>
<li class="ancestor"><a class="normal" href="CastleUIControls.TUIRectangularControl.html">TUIRectangularControl</a></li>
<li class="ancestor"><a class="normal" href="CastleSceneManager.TCastleAbstractViewport.html">TCastleAbstractViewport</a></li>
<li class="thisitem">TCastleSceneManager</li></ul><h2 class="overview">Overview</h2>
<a name="PasDoc-Fields"></a><h3 class="summary">Fields</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code><b><a href="CastleSceneManager.TCastleSceneManager.html#FSectors">FSectors</a></b>: <a href="CastleSectors.TSectorList.html">TSectorList</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code><b><a href="CastleSceneManager.TCastleSceneManager.html#Waypoints">Waypoints</a></b>: <a href="CastleSectors.TWaypointList.html">TWaypointList</a>;</code></td>
</tr>
</table>
<a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#SetCamera">SetCamera</a></b>(const Value: <a href="CastleCameras.TCamera.html">TCamera</a>); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#CollisionIgnoreItem">CollisionIgnoreItem</a></b>(const Sender: TObject; const Triangle: <a href="CastleTriangles.html#P3DTriangle">P3DTriangle</a>): boolean; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#Notification">Notification</a></b>(AComponent: TComponent; Operation: TOperation); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#CameraMoveAllowed">CameraMoveAllowed</a></b>(ACamera: <a href="CastleCameras.TWalkCamera.html">TWalkCamera</a>; const ProposedNewPos: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; out NewPos: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const BecauseOfGravity: boolean): boolean; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#CameraHeight">CameraHeight</a></b>(ACamera: <a href="CastleCameras.TWalkCamera.html">TWalkCamera</a>; const Position: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; out AboveHeight: Single; out AboveGround: <a href="CastleTriangles.html#P3DTriangle">P3DTriangle</a>): boolean; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#CameraRayCollision">CameraRayCollision</a></b>(const RayOrigin, RayDirection: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>): <a href="Castle3D.TRayCollision.html">TRayCollision</a>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#CameraVisibleChange">CameraVisibleChange</a></b>(ACamera: TObject); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#GetItems">GetItems</a></b>: <a href="Castle3D.T3DWorld.html">T3DWorld</a>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#GetMainScene">GetMainScene</a></b>: <a href="CastleScene.TCastleScene.html">TCastleScene</a>; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#GetShadowVolumeRenderer">GetShadowVolumeRenderer</a></b>: <a href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html">TGLShadowVolumeRenderer</a>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#GetMouseRayHit">GetMouseRayHit</a></b>: <a href="Castle3D.TRayCollision.html">TRayCollision</a>; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#GetHeadlightCamera">GetHeadlightCamera</a></b>: <a href="CastleCameras.TCamera.html">TCamera</a>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#GetPlayer">GetPlayer</a></b>: <a href="CastlePlayer.TPlayer.html">TPlayer</a>; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#GetTimeScale">GetTimeScale</a></b>: Single; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#PointingDeviceActivate">PointingDeviceActivate</a></b>(const Active: boolean): boolean; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#PointingDeviceMove">PointingDeviceMove</a></b>(const RayOrigin, RayDirection: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>): boolean; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#PointingDeviceActivateFailed">PointingDeviceActivateFailed</a></b>(const Active: boolean); virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#PointingDeviceActivate3D">PointingDeviceActivate3D</a></b>(const Item: <a href="Castle3D.T3D.html">T3D</a>; const Active: boolean; const Distance: Single): boolean; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#MoveAllowed">MoveAllowed</a></b>(const OldPosition, NewPosition: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const BecauseOfGravity: boolean): boolean; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#BoundNavigationInfoChanged">BoundNavigationInfoChanged</a></b>; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#BoundViewpointChanged">BoundViewpointChanged</a></b>; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#Headlight">Headlight</a></b>: <a href="X3DNodes.TAbstractLightNode.html">TAbstractLightNode</a>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <b><a href="CastleSceneManager.TCastleSceneManager.html#Create">Create</a></b>(AOwner: TComponent); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <b><a href="CastleSceneManager.TCastleSceneManager.html#Destroy">Destroy</a></b>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#GLContextOpen">GLContextOpen</a></b>; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#GLContextClose">GLContextClose</a></b>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#PositionInside">PositionInside</a></b>(const Position: <a href="CastleVectors.html#TVector2Single">TVector2Single</a>): boolean; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#PrepareResources">PrepareResources</a></b>(const DisplayProgressTitle: string = ''); virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#BeforeRender">BeforeRender</a></b>; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#Render">Render</a></b>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#CameraToChanges">CameraToChanges</a></b>: <a href="Castle3D.html#TVisibleChanges">TVisibleChanges</a>; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleSceneManager.TCastleSceneManager.html#Update">Update</a></b>(const SecondsPassed: Single; var HandleInput: boolean); override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#CreateDefaultCamera">CreateDefaultCamera</a></b>(AOwner: TComponent): <a href="CastleCameras.TCamera.html">TCamera</a>; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleSceneManager.TCastleSceneManager.html#GravityUp">GravityUp</a></b>: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>;</code></td>
</tr>
</table>
<a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#MoveLimit">MoveLimit</a></b>: <a href="CastleBoxes.TBox3D.html">TBox3D</a> read FMoveLimit write FMoveLimit;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#ShadowVolumeRenderer">ShadowVolumeRenderer</a></b>: <a href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html">TGLShadowVolumeRenderer</a>
read FShadowVolumeRenderer;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#MouseRayHit">MouseRayHit</a></b>: <a href="Castle3D.TRayCollision.html">TRayCollision</a> read FMouseRayHit;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#Viewports">Viewports</a></b>: <a href="CastleSceneManager.TCastleAbstractViewportList.html">TCastleAbstractViewportList</a> read FViewports;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#Sectors">Sectors</a></b>: <a href="CastleSectors.TSectorList.html">TSectorList</a> read <a href="CastleSceneManager.TCastleSceneManager.html#FSectors">FSectors</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#Water">Water</a></b>: <a href="CastleBoxes.TBox3D.html">TBox3D</a> read FWater write FWater;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#TimeScale">TimeScale</a></b>: Single read FTimeScale write FTimeScale default 1;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#Items">Items</a></b>: <a href="Castle3D.T3DWorld.html">T3DWorld</a> read FItems;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#MainScene">MainScene</a></b>: <a href="CastleScene.TCastleScene.html">TCastleScene</a> read FMainScene write SetMainScene;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#OnCameraChanged">OnCameraChanged</a></b>: TNotifyEvent read FOnCameraChanged write FOnCameraChanged;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#OnBoundViewpointChanged">OnBoundViewpointChanged</a></b>: TNotifyEvent read FOnBoundViewpointChanged write FOnBoundViewpointChanged;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#OnBoundNavigationInfoChanged">OnBoundNavigationInfoChanged</a></b>: TNotifyEvent read FOnBoundNavigationInfoChanged write FOnBoundNavigationInfoChanged;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#DefaultViewport">DefaultViewport</a></b>: boolean
read FDefaultViewport write SetDefaultViewport default true;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#Player">Player</a></b>: <a href="CastlePlayer.TPlayer.html">TPlayer</a> read FPlayer write SetPlayer;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <b><a href="CastleSceneManager.TCastleSceneManager.html#OnMoveAllowed">OnMoveAllowed</a></b>: <a href="CastleSceneManager.html#TWorldMoveAllowedEvent">TWorldMoveAllowedEvent</a>
read FOnMoveAllowed write FOnMoveAllowed;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Fields</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="FSectors"></a><code><b>FSectors</b>: <a href="CastleSectors.TSectorList.html">TSectorList</a>;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="Waypoints"></a><code><b>Waypoints</b>: <a href="CastleSectors.TWaypointList.html">TWaypointList</a>;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="SetCamera"></a><code>procedure <b>SetCamera</b>(const Value: <a href="CastleCameras.TCamera.html">TCamera</a>); override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="CollisionIgnoreItem"></a><code>function <b>CollisionIgnoreItem</b>(const Sender: TObject; const Triangle: <a href="CastleTriangles.html#P3DTriangle">P3DTriangle</a>): boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Triangles to ignore by all collision detection in scene manager. The default implementation in this class resturns always <code>False</code>, so nothing is ignored. You can override it e.g. to ignore your "water" material, when you want player to dive under the water.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="Notification"></a><code>procedure <b>Notification</b>(AComponent: TComponent; Operation: TOperation); override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="CameraMoveAllowed"></a><code>function <b>CameraMoveAllowed</b>(ACamera: <a href="CastleCameras.TWalkCamera.html">TWalkCamera</a>; const ProposedNewPos: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; out NewPos: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const BecauseOfGravity: boolean): boolean; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="CameraHeight"></a><code>function <b>CameraHeight</b>(ACamera: <a href="CastleCameras.TWalkCamera.html">TWalkCamera</a>; const Position: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; out AboveHeight: Single; out AboveGround: <a href="CastleTriangles.html#P3DTriangle">P3DTriangle</a>): boolean; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="CameraRayCollision"></a><code>function <b>CameraRayCollision</b>(const RayOrigin, RayDirection: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>): <a href="Castle3D.TRayCollision.html">TRayCollision</a>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="CameraVisibleChange"></a><code>procedure <b>CameraVisibleChange</b>(ACamera: TObject); override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GetItems"></a><code>function <b>GetItems</b>: <a href="Castle3D.T3DWorld.html">T3DWorld</a>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GetMainScene"></a><code>function <b>GetMainScene</b>: <a href="CastleScene.TCastleScene.html">TCastleScene</a>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GetShadowVolumeRenderer"></a><code>function <b>GetShadowVolumeRenderer</b>: <a href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html">TGLShadowVolumeRenderer</a>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GetMouseRayHit"></a><code>function <b>GetMouseRayHit</b>: <a href="Castle3D.TRayCollision.html">TRayCollision</a>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GetHeadlightCamera"></a><code>function <b>GetHeadlightCamera</b>: <a href="CastleCameras.TCamera.html">TCamera</a>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GetPlayer"></a><code>function <b>GetPlayer</b>: <a href="CastlePlayer.TPlayer.html">TPlayer</a>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GetTimeScale"></a><code>function <b>GetTimeScale</b>: Single; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="PointingDeviceActivate"></a><code>function <b>PointingDeviceActivate</b>(const Active: boolean): boolean; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="PointingDeviceMove"></a><code>function <b>PointingDeviceMove</b>(const RayOrigin, RayDirection: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>): boolean; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="PointingDeviceActivateFailed"></a><code>procedure <b>PointingDeviceActivateFailed</b>(const Active: boolean); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#PointingDeviceActivate">PointingDeviceActivate</a> was not handled by any 3D object. You can override this to make a message / sound signal to notify user that his <a class="normal" href="CastleSceneManager.html#Input_Interact">Input_Interact</a> click was not successful.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="PointingDeviceActivate3D"></a><code>function <b>PointingDeviceActivate3D</b>(const Item: <a href="Castle3D.T3D.html">T3D</a>; const Active: boolean; const Distance: Single): boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Handle pointing device (mouse) activation/deactivation event over a given 3D object. See <a class="normal" href="Castle3D.T3D.html#PointingDeviceActivate">T3D.PointingDeviceActivate</a> method for description how it should be handled. Default implementation in <a class="normal" href="CastleSceneManager.TCastleSceneManager.html">TCastleSceneManager</a> just calls <a class="normal" href="Castle3D.T3D.html#PointingDeviceActivate">T3D.PointingDeviceActivate</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="MoveAllowed"></a><code>function <b>MoveAllowed</b>(const OldPosition, NewPosition: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const BecauseOfGravity: boolean): boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Handle <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#OnMoveAllowed">OnMoveAllowed</a> and default <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#MoveLimit">MoveLimit</a> algorithm. See the description of <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#OnMoveAllowed">OnMoveAllowed</a> property for information.
<p>When this is called, collision detection determined that this move is allowed. The default implementation in <a class="normal" href="CastleSceneManager.TCastleSceneManager.html">TCastleSceneManager</a> calculates the result using the algorithm described at the <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#MoveLimit">MoveLimit</a> property, then calls <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#OnMoveAllowed">OnMoveAllowed</a> event.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="BoundNavigationInfoChanged"></a><code>procedure <b>BoundNavigationInfoChanged</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="BoundViewpointChanged"></a><code>procedure <b>BoundViewpointChanged</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="Headlight"></a><code>function <b>Headlight</b>: <a href="X3DNodes.TAbstractLightNode.html">TAbstractLightNode</a>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Create"></a><code>constructor <b>Create</b>(AOwner: TComponent); override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Destroy"></a><code>destructor <b>Destroy</b>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GLContextOpen"></a><code>procedure <b>GLContextOpen</b>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GLContextClose"></a><code>procedure <b>GLContextClose</b>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="PositionInside"></a><code>function <b>PositionInside</b>(const Position: <a href="CastleVectors.html#TVector2Single">TVector2Single</a>): boolean; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="PrepareResources"></a><code>procedure <b>PrepareResources</b>(const DisplayProgressTitle: string = ''); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Prepare resources, to make various methods (like <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#Render">Render</a>) execute fast.
<p>If DisplayProgressTitle <> '', we will display progress bar during loading. This is especially useful for long precalculated animations (<a class="normal" href="CastlePrecalculatedAnimation.TCastlePrecalculatedAnimation.html">TCastlePrecalculatedAnimation</a> with a lot of ScenesCount), they show nice linearly increasing progress bar.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="BeforeRender"></a><code>procedure <b>BeforeRender</b>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Render"></a><code>procedure <b>Render</b>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CameraToChanges"></a><code>function <b>CameraToChanges</b>: <a href="Castle3D.html#TVisibleChanges">TVisibleChanges</a>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
What changes happen when camera changes. You may want to use it when calling Scene.CameraChanged.
<p>Implementation in this class is correlated with RenderHeadlight.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Update"></a><code>procedure <b>Update</b>(const SecondsPassed: Single; var HandleInput: boolean); override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CreateDefaultCamera"></a><code>function <b>CreateDefaultCamera</b>(AOwner: TComponent): <a href="CastleCameras.TCamera.html">TCamera</a>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GravityUp"></a><code>function <b>GravityUp</b>: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Up vector, according to gravity. Gravity force pulls in -<code>GravityUp</code> direction.</p>
</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MoveLimit"></a><code>property <b>MoveLimit</b>: <a href="CastleBoxes.TBox3D.html">TBox3D</a> read FMoveLimit write FMoveLimit;</code></td>
</tr>
<tr><td colspan="2">
<p>
Where the 3D items (player, creatures, items) can move, and where the gravity works. In case of 1st-person view (always, for now) limiting the player position also implies limiting the camera position. Intuitively, this is the "sensible" part of 3D space where normal physics should work.
<p>TODO: When you activate 3rd-person camera (not implemented yet), this limit will apply to the Player.Position, not Camera.Position.
<p></p>
<ul class="paragraph_spacing">
<li><p>When <code>MoveLimit</code> is an empty box (this is the default situation) then movement is limited to not fall because of gravity outside of Items.BoundingBox. Still, we can freely move anywhere (only gravity effect is limited to the Items.BoundingBox).
<p>This is the safest behavior for general 3D model browsers, it prevents camera from falling into an infinite abyss of our 3D space, since gravity will always stop at the Items.BoundingBox border.</p></li>
<li><p>When <code>MoveLimit</code> is not an empty box, then position cannot go outside of this box.
<p>Note that the <a class="normal" href="CastleLevels.TGameSceneManager.html#LoadLevel">TGameSceneManager.LoadLevel</a> always, automatically, assigns this property to be non-empty. It's either determined by CasMoveLimit placeholder in the level 3D model, or it's automatically calculated to include level bounding box + some space for flying.</p></li>
</ul>
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ShadowVolumeRenderer"></a><code>property <b>ShadowVolumeRenderer</b>: <a href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html">TGLShadowVolumeRenderer</a>
read FShadowVolumeRenderer;</code></td>
</tr>
<tr><td colspan="2">
<p>
Renderer of shadow volumes. You can use this to optimize rendering of your shadow quads in <a class="normal" href="CastleSceneManager.TCastleAbstractViewport.html#RenderShadowVolume">RenderShadowVolume</a>, and you can control it's statistics (<a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#Count">TGLShadowVolumeRenderer.Count</a> and related properties).
<p>This is internally initialized by scene manager. It's <code>Nil</code> when OpenGL context is not yet initialized (or scene manager is not added to <code>Controls</code> list yet).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MouseRayHit"></a><code>property <b>MouseRayHit</b>: <a href="Castle3D.TRayCollision.html">TRayCollision</a> read FMouseRayHit;</code></td>
</tr>
<tr><td colspan="2">
<p>
Current 3D objects under the mouse cursor. Updated in every mouse move. May be <code>Nil</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Viewports"></a><code>property <b>Viewports</b>: <a href="CastleSceneManager.TCastleAbstractViewportList.html">TCastleAbstractViewportList</a> read FViewports;</code></td>
</tr>
<tr><td colspan="2">
<p>
List of viewports connected to this scene manager. This contains all <a class="normal" href="CastleSceneManager.TCastleViewport.html">TCastleViewport</a> instances that have <a class="normal" href="CastleSceneManager.TCastleViewport.html#SceneManager">TCastleViewport.SceneManager</a> set to us. Also it contains Self (this very scene manager) if and only if <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#DefaultViewport">DefaultViewport</a> = <code>True</code> (because when <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#DefaultViewport">DefaultViewport</a>, scene manager acts as an additional viewport too).
<p>This list is read-only from the outside! It's automatically managed in this unit (when you change <a class="normal" href="CastleSceneManager.TCastleViewport.html#SceneManager">TCastleViewport.SceneManager</a> or <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#DefaultViewport">TCastleSceneManager.DefaultViewport</a>, we automatically update this list as appropriate).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Sectors"></a><code>property <b>Sectors</b>: <a href="CastleSectors.TSectorList.html">TSectorList</a> read <a href="CastleSceneManager.TCastleSceneManager.html#FSectors">FSectors</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Sectors and waypoints of this world, for AI in 3D. Initialized by <a class="normal" href="CastleLevels.TGameSceneManager.html#LoadLevel">TGameSceneManager.LoadLevel</a>. <code>Nil</code> if you never call <a class="normal" href="CastleLevels.TGameSceneManager.html#LoadLevel">TGameSceneManager.LoadLevel</a>.
<p>A generic AI code should work regardless if these are <code>Nil</code> or not. But if you're making a game and you know you will always call <a class="normal" href="CastleLevels.TGameSceneManager.html#LoadLevel">TGameSceneManager.LoadLevel</a>, you can just use them straight away.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Water"></a><code>property <b>Water</b>: <a href="CastleBoxes.TBox3D.html">TBox3D</a> read FWater write FWater;</code></td>
</tr>
<tr><td colspan="2">
<p>
Water volume in the scene. It may be used by various 3D objects to indicate appropriate behavior — some things swim, some things drown and such. For now, this is only used by <a class="normal" href="CastlePlayer.TPlayer.html">TPlayer</a> class to detect swimming (and make appropriate sounds, special rendering, drowning and such).
<p>For now, this is just a simple <a class="normal" href="CastleBoxes.TBox3D.html">TBox3D</a>. It will be extended to represent a set of flexible 3D volumes in the future.
<p>Empty initially. Initialize it however you want.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><a name="TimeScale"></a><code>property <b>TimeScale</b>: Single read FTimeScale write FTimeScale default 1;</code></td>
</tr>
<tr><td colspan="2">
<p>
Time scale used when not <a class="normal" href="CastleSceneManager.TCastleAbstractViewport.html#Paused">Paused</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><a name="Items"></a><code>property <b>Items</b>: <a href="Castle3D.T3DWorld.html">T3DWorld</a> read FItems;</code></td>
</tr>
<tr><td colspan="2">
<p>
Tree of 3D objects within your world. This is the place where you should add your scenes to have them handled by scene manager. You may also set your main <a class="normal" href="CastleScene.TCastleScene.html">TCastleScene</a> (if you have any) as <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#MainScene">MainScene</a>.
<p><a class="normal" href="Castle3D.T3DList.html">T3DList</a> is also <a class="normal" href="Castle3D.T3D.html">T3D</a> instance, so yes — this may be a tree of <a class="normal" href="Castle3D.T3D.html">T3D</a>, not only a flat list.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><a name="MainScene"></a><code>property <b>MainScene</b>: <a href="CastleScene.TCastleScene.html">TCastleScene</a> read FMainScene write SetMainScene;</code></td>
</tr>
<tr><td colspan="2">
<p>
The main scene of your 3D world. It's not necessary to set this (after all, your 3D world doesn't even need to have any <a class="normal" href="CastleScene.TCastleScene.html">TCastleScene</a> instance). This <i>must be</i> also added to our <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#Items">Items</a> (otherwise things will work strangely).
<p>When set, this is used for a couple of things:
<p></p>
<ul class="paragraph_spacing">
<li><p>Decides what headlight is used (by TCastleScene.Headlight).</p></li>
<li><p>Decides what background is rendered. <i>Notes for implementing descendants of this class:</i> You can change this by overriding Background method.</p></li>
<li><p>Decides if, and where, the main light casting shadows is. <i>Notes for implementing descendants of this class:</i> You can change this by overriding <a class="normal" href="CastleSceneManager.TCastleAbstractViewport.html#MainLightForShadows">MainLightForShadows</a> method.</p></li>
<li><p>Determines <a class="normal" href="CastleSceneManager.TCastleAbstractViewport.html#Projection">projection</a> for viewing (if you use default <a class="normal" href="CastleSceneManager.TCastleAbstractViewport.html#CalculateProjection">CalculateProjection</a> implementation).</p></li>
<li><p>Synchronizes our <a class="normal" href="CastleSceneManager.TCastleAbstractViewport.html#Camera">Camera</a> with VRML/X3D viewpoints and navigation info. This means that <a class="normal" href="CastleSceneManager.TCastleAbstractViewport.html#Camera">Camera</a> will be updated when VRML/X3D events change current Viewpoint or NavigationInfo, for example you can animate the camera by animating the viewpoint (or it's transformation) or bind camera to a viewpoint.
<p>Note that scene manager "hijacks" some Scene events: <a class="normal" href="CastleSceneCore.TCastleSceneCore.html#OnBoundViewpointVectorsChanged">TCastleSceneCore.OnBoundViewpointVectorsChanged</a>, TCastleSceneCore.ViewpointStack.OnBoundChanged, TCastleSceneCore.NavigationInfoStack.OnBoundChanged for this purpose. If you want to know when viewpoint changes, you can use scene manager's event <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#OnBoundViewpointChanged">OnBoundViewpointChanged</a>, <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#OnBoundNavigationInfoChanged">OnBoundNavigationInfoChanged</a>.</p></li>
</ul>
<p>
<p>The above stuff is only sensible when done once per scene manager, that's why we need <code>MainScene</code> property to indicate this. (We cannot just use every 3D object from <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#Items">Items</a> for this.)
<p>Freeing <code>MainScene</code> will automatically set this to <code>Nil</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><a name="OnCameraChanged"></a><code>property <b>OnCameraChanged</b>: TNotifyEvent read FOnCameraChanged write FOnCameraChanged;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called on any camera change. Exactly when <a class="normal" href="CastleCameras.TCamera.html">TCamera</a> generates it's <a class="normal" href="CastleUIControls.TInputListener.html#OnVisibleChange">OnVisibleChange</a> event.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><a name="OnBoundViewpointChanged"></a><code>property <b>OnBoundViewpointChanged</b>: TNotifyEvent read FOnBoundViewpointChanged write FOnBoundViewpointChanged;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when bound Viewpoint node changes. Called exactly when TCastleSceneCore.ViewpointStack.OnBoundChanged is called.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><a name="OnBoundNavigationInfoChanged"></a><code>property <b>OnBoundNavigationInfoChanged</b>: TNotifyEvent read FOnBoundNavigationInfoChanged write FOnBoundNavigationInfoChanged;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when bound NavigationInfo changes (to a different node, or just a field changes).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><a name="DefaultViewport"></a><code>property <b>DefaultViewport</b>: boolean
read FDefaultViewport write SetDefaultViewport default true;</code></td>
</tr>
<tr><td colspan="2">
<p>
Should we render the 3D world in a default viewport that covers the whole window. This is usually what you want. For more complicated uses, you can turn this off, and use explicit <a class="normal" href="CastleSceneManager.TCastleViewport.html">TCastleViewport</a> (connected to this scene manager by <a class="normal" href="CastleSceneManager.TCastleViewport.html#SceneManager">TCastleViewport.SceneManager</a> property) for making your world visible.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><a name="Player"></a><code>property <b>Player</b>: <a href="CastlePlayer.TPlayer.html">TPlayer</a> read FPlayer write SetPlayer;</code></td>
</tr>
<tr><td colspan="2">
<p>
Player in this 3D world. This currently serves various purposes:
<p></p>
<ul class="paragraph_spacing">
<li><p>In the 1st person view, this 3D object guides the camera and it never collides with the camera. That is, our <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#CameraMoveAllowed">CameraMoveAllowed</a> and similar methods simply call Player.MoveAllowed, that in turn calls World.WorldMoveAllowed making sure that player is temporarily disabled (does not collide with itself).
<p><a class="normal" href="CastleLevels.TGameSceneManager.html#LoadLevel">TGameSceneManager.LoadLevel</a> will set Player.Camera to TCastleSceneManager.Camera. This means that user can directly control Player.Camera view (position, direction, up), which in turn is always synchronized with Player view (that is, TPlayer.Direction always equals TPlayer.Camera.Direction and so on).</p></li>
<li><p>For simple AI in <a class="normal" href="CastleCreatures.html">CastleCreatures</a>, hostile creatures will attack this player. So this determines the target position that creatures try to reach, where they shoot missiles etc. More advanced AI, with friendlies/companions, or cooperating factions of creatures, may have other mechanisms to determine who wants to attack who.</p></li>
<li><p>For items on level in <a class="normal" href="CastleItems.html">CastleItems</a>, this player will pick up the items lying on the ground, and will be able to equip weapons. This functionality may be generalized in the future, to allow anyone to pick up and carry and equip items.</p></li>
</ul>
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><a name="OnMoveAllowed"></a><code>property <b>OnMoveAllowed</b>: <a href="CastleSceneManager.html#TWorldMoveAllowedEvent">TWorldMoveAllowedEvent</a>
read FOnMoveAllowed write FOnMoveAllowed;</code></td>
</tr>
<tr><td colspan="2">
<p>
Enable or disable movement of the player, items and creatures. This applies to all 3D objects using T3D.WorldMoveAllowed for movement. In case of 1st-person view (always for now), limiting the player position also implies limiting the camera position.
<p>When this event is called at all, the basic collision detection already decided that the move is allowed (so object does not collide with other collidable 3D features). You can now implement additional rules to say when the move is, or is not, allowed.
<p>Callback parameters:
<p></p>
<ul class="paragraph_spacing">
<li><p><b>Allowed</b>:
<p>Initially, the Allowed parameter is set following the algorithm described at the <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#MoveLimit">MoveLimit</a> property. Your event can use this, and e.g. do something like
<p></p>
<pre class="longcode"> Allowed := Allowed <span class="pascal_keyword">and</span> (my custom move rule); </pre>
<p>
<p>Or you can simply ignore the default Allowed value, thus ignoring the algorithm described at the <a class="normal" href="CastleSceneManager.TCastleSceneManager.html#MoveLimit">MoveLimit</a> property, and simply always set Allowed to your own decision. For example, setting
<p></p>
<pre class="longcode"> Allowed := true; </pre>
<p>
<p>will make gravity and movement work everywhere.</p></li>
<li><p><b>BecauseOfGravity</b>:
<p><code>True</code> if this move was caused by gravity, that is: given object is falling down. You can use this to limit gravity to some box, but keep other movement unlimited, like
<p></p>
<pre class="longcode">
<span class="pascal_comment">{ Allow movement everywhere, but limit gravity to a box. }</span>
Allowed := (<span class="pascal_keyword">not</span> BecauseOfGravity) <span class="pascal_keyword">or</span> MyGravityBox.PointInside(NewPos);
</pre>
<p> </p></li>
</ul>
<p></p>
</td></tr>
</table>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://michalis.ii.uni.wroc.pl/piwik-castle-engine/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "1"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
<noscript>
<!-- Piwik Image Tracker -->
<img src="http://michalis.ii.uni.wroc.pl/piwik-castle-engine/piwik.php?idsite=1&rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2015-06-15 04:43:11</em>
</span>
</td></tr></table></body></html>
|