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
|
<!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: CastleCameras: Class TCamera</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="TCamera"></a><h1 class="cio">Class TCamera</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="CastleCameras.html">CastleCameras</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TCamera = class(<a class="normal" href="CastleUIControls.TInputListener.html">TInputListener</a>)</code></p>
<h2 class="description">Description</h2>
<p>
Handle user navigation in 3D scene. You control camera parameters and provide user input to this class by various methods and properties. You can investigate the current camera configuration by many methods, the most final is the <a class="normal" href="CastleCameras.TCamera.html#Matrix">Matrix</a> method that generates a simple 4x4 camera matrix.
<p>This class is not tied to any OpenGL specifics, any VRML specifics, and <a class="normal" href="CastleWindow.html">CastleWindow</a> etc. — this class is fully flexible and may be used in any 3D program, whether using <a class="normal" href="CastleWindow.html">CastleWindow</a>, OpenGL etc. or not.
<p>Various <code>TCamera</code> descendants implement various navigation methods, for example <a class="normal" href="CastleCameras.TExamineCamera.html">TExamineCamera</a> allows the user to rotate and scale the model (imagine that you're holding a 3D model in your hands and you look at it from various sides) and <a class="normal" href="CastleCameras.TWalkCamera.html">TWalkCamera</a> implements typical navigation in the style of first-person shooter games.
<p>The most comfortable way to use a camera is with a scene manager (<a class="normal" href="CastleSceneManager.TCastleSceneManager.html">TCastleSceneManager</a>). You can create your camera instance, call it's <code>Init</code> method (this is initializes most important properties), and assign it to TCastleSceneManager.Camera property. This way SceneManager will pass all necessary window events to the camera, and when drawing SceneManager will load camera matrix like <code><a class="normal" href="CastleGLUtils.html#glLoadMatrix">glLoadMatrix</a>(Camera.Matrix);</code>. In fact, if you do not assign anything to TCastleSceneManager.Camera property, then the default camera will be created for you. So <i>when using <a class="normal" href="CastleSceneManager.TCastleSceneManager.html">TCastleSceneManager</a>, you do not have to do anything to use a camera</i> — default camera will be created and automatically used for you.</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="thisitem">TCamera</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="CastleCameras.TCamera.html#MouseDraggingStarted">MouseDraggingStarted</a></b>: Integer;</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="CastleCameras.TCamera.html#MouseDraggingStart">MouseDraggingStart</a></b>: <a href="CastleVectors.html#TVector2Single">TVector2Single</a>;</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>internal const <b><a href="CastleCameras.TCamera.html#DefaultRadius">DefaultRadius</a></b> = 0.25;</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>internal const <b><a href="CastleCameras.TCamera.html#DefaultInput">DefaultInput</a></b> = [ciNormal, ciMouseDragging, ci3dMouse];</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="CastleCameras.TCamera.html#BeginVisibleChangeSchedule">BeginVisibleChangeSchedule</a></b>;</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="CastleCameras.TCamera.html#ScheduleVisibleChange">ScheduleVisibleChange</a></b>;</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="CastleCameras.TCamera.html#EndVisibleChangeSchedule">EndVisibleChangeSchedule</a></b>;</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="CastleCameras.TCamera.html#SetInput">SetInput</a></b>(const Value: <a href="CastleCameras.html#TCameraInputs">TCameraInputs</a>); 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="CastleCameras.TCamera.html#SetEnableDragging">SetEnableDragging</a></b>(const Value: 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="CastleCameras.TCamera.html#GetIgnoreAllInputs">GetIgnoreAllInputs</a></b>: boolean;</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="CastleCameras.TCamera.html#SetIgnoreAllInputs">SetIgnoreAllInputs</a></b>(const Value: boolean);</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="CastleCameras.TCamera.html#SetProjectionMatrix">SetProjectionMatrix</a></b>(const Value: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a>); 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="CastleCameras.TCamera.html#SetRadius">SetRadius</a></b>(const Value: Single); 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>constructor <b><a href="CastleCameras.TCamera.html#Create">Create</a></b>(AOwner: TComponent); 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="CastleCameras.TCamera.html#VisibleChange">VisibleChange</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>function <b><a href="CastleCameras.TCamera.html#Matrix">Matrix</a></b>: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a>; virtual; abstract;</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="CastleCameras.TCamera.html#RotationMatrix">RotationMatrix</a></b>: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a>; virtual; abstract;</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="CastleCameras.TCamera.html#GetView">GetView</a></b>(out APos, ADir, AUp: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>); virtual; abstract;</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="CastleCameras.TCamera.html#GetView">GetView</a></b>(out APos, ADir, AUp, AGravityUp: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>); virtual; abstract;</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="CastleCameras.TCamera.html#GetPosition">GetPosition</a></b>: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; virtual; abstract;</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="CastleCameras.TCamera.html#GetGravityUp">GetGravityUp</a></b>: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; virtual; abstract;</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="CastleCameras.TCamera.html#SetView">SetView</a></b>(const APos, ADir, AUp: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const AdjustUp: boolean = true); virtual; abstract;</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="CastleCameras.TCamera.html#SetView">SetView</a></b>(const APos, ADir, AUp, AGravityUp: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const AdjustUp: boolean = true); virtual; abstract;</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="CastleCameras.TCamera.html#Ray">Ray</a></b>(const WindowPosition: <a href="CastleVectors.html#TVector2Single">TVector2Single</a>; const Projection: <a href="CastleRays.TProjection.html">TProjection</a>; out RayOrigin, RayDirection: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>);</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="CastleCameras.TCamera.html#MouseRay">MouseRay</a></b>( const Projection: <a href="CastleRays.TProjection.html">TProjection</a>; out RayOrigin, RayDirection: <a href="CastleVectors.html#TVector3Single">TVector3Single</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>procedure <b><a href="CastleCameras.TCamera.html#CustomRay">CustomRay</a></b>( const Viewport: <a href="CastleRectangles.TRectangle.html">TRectangle</a>; const WindowPosition: <a href="CastleVectors.html#TVector2Single">TVector2Single</a>; const Projection: <a href="CastleRays.TProjection.html">TProjection</a>; out RayOrigin, RayDirection: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>);</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="CastleCameras.TCamera.html#Update">Update</a></b>(const SecondsPassed: Single; var HandleInput: 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>function <b><a href="CastleCameras.TCamera.html#Press">Press</a></b>(const Event: <a href="CastleKeysMouse.TInputPressRelease.html">TInputPressRelease</a>): 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="CastleCameras.TCamera.html#Release">Release</a></b>(const Event: <a href="CastleKeysMouse.TInputPressRelease.html">TInputPressRelease</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="CastleCameras.TCamera.html#AnimateTo">AnimateTo</a></b>(OtherCamera: <a href="CastleCameras.TCamera.html">TCamera</a>; const Time: <a href="CastleTimeUtils.html#TFloatTime">TFloatTime</a>);</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="CastleCameras.TCamera.html#AnimateTo">AnimateTo</a></b>(const Pos, Dir, Up: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const Time: <a href="CastleTimeUtils.html#TFloatTime">TFloatTime</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>function <b><a href="CastleCameras.TCamera.html#Animation">Animation</a></b>: boolean; 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="CastleCameras.TCamera.html#SetInitialView">SetInitialView</a></b>( const AInitialPosition: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; AInitialDirection, AInitialUp: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const TransformCurrentCamera: boolean); 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="CastleCameras.TCamera.html#GoToInitial">GoToInitial</a></b>; 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>function <b><a href="CastleCameras.TCamera.html#GetNavigationType">GetNavigationType</a></b>: <a href="CastleCameras.html#TNavigationType">TNavigationType</a>; virtual; abstract;</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="CastleCameras.TCamera.html#IgnoreAllInputs">IgnoreAllInputs</a></b>: boolean
read <a href="CastleCameras.TCamera.html#GetIgnoreAllInputs">GetIgnoreAllInputs</a> write <a href="CastleCameras.TCamera.html#SetIgnoreAllInputs">SetIgnoreAllInputs</a> default false; deprecated;</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="CastleCameras.TCamera.html#Frustum">Frustum</a></b>: <a href="CastleFrustum.TFrustum.html">TFrustum</a> read FFrustum;</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="CastleCameras.TCamera.html#ProjectionMatrix">ProjectionMatrix</a></b>: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a>
read FProjectionMatrix write <a href="CastleCameras.TCamera.html#SetProjectionMatrix">SetProjectionMatrix</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="CastleCameras.TCamera.html#Radius">Radius</a></b>: Single read FRadius write <a href="CastleCameras.TCamera.html#SetRadius">SetRadius</a> default <a href="CastleCameras.TCamera.html#DefaultRadius">DefaultRadius</a>;</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="CastleCameras.TCamera.html#InitialPosition">InitialPosition</a></b> : <a href="CastleVectors.html#TVector3Single">TVector3Single</a> read FInitialPosition;</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="CastleCameras.TCamera.html#InitialDirection">InitialDirection</a></b>: <a href="CastleVectors.html#TVector3Single">TVector3Single</a> read FInitialDirection;</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="CastleCameras.TCamera.html#InitialUp">InitialUp</a></b> : <a href="CastleVectors.html#TVector3Single">TVector3Single</a> read FInitialUp;</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="CastleCameras.TCamera.html#EnableDragging">EnableDragging</a></b>: boolean read FEnableDragging write <a href="CastleCameras.TCamera.html#SetEnableDragging">SetEnableDragging</a>;</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="CastleCameras.TCamera.html#Input">Input</a></b>: <a href="CastleCameras.html#TCameraInputs">TCameraInputs</a> read FInput write <a href="CastleCameras.TCamera.html#SetInput">SetInput</a> default <a href="CastleCameras.TCamera.html#DefaultInput">DefaultInput</a>;</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="MouseDraggingStarted"></a><code><b>MouseDraggingStarted</b>: Integer;</code></td>
</tr>
<tr><td colspan="2">
<p>
Needed for ciMouseDragging navigation. Checking <code>MouseDraggingStarted</code> means that we handle only dragging that was initialized on viewport (since the viewport passed events to camera). <code>MouseDraggingStarted</code> -1 means none, otherwise it's the finder index (to support multitouch).</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="MouseDraggingStart"></a><code><b>MouseDraggingStart</b>: <a href="CastleVectors.html#TVector2Single">TVector2Single</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="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="DefaultRadius"></a><code>internal const <b>DefaultRadius</b> = 0.25;</code></td>
</tr>
<tr><td colspan="2">
<p>
Default value for <a class="normal" href="CastleCameras.TCamera.html#Radius">TCamera.Radius</a>. Matches the default VRML/X3D NavigationInfo.avatarSize[0].</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="DefaultInput"></a><code>internal const <b>DefaultInput</b> = [ciNormal, ciMouseDragging, ci3dMouse];</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="BeginVisibleChangeSchedule"></a><code>procedure <b>BeginVisibleChangeSchedule</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Mechanism to schedule <a class="normal" href="CastleCameras.TCamera.html#VisibleChange">VisibleChange</a> calls.
<p>This mechanism allows to defer calling <a class="normal" href="CastleCameras.TCamera.html#VisibleChange">VisibleChange</a>. Idea: <code>BeginVisibleChangeSchedule</code> increases internal VisibleChangeSchedule counter, <a class="normal" href="CastleCameras.TCamera.html#EndVisibleChangeSchedule">EndVisibleChangeSchedule</a> decreases it and calls actual <a class="normal" href="CastleCameras.TCamera.html#VisibleChange">VisibleChange</a> if counter is zero and some <a class="normal" href="CastleCameras.TCamera.html#ScheduleVisibleChange">ScheduleVisibleChange</a> was called in between.
<p>When <a class="normal" href="CastleCameras.TCamera.html#ScheduleVisibleChange">ScheduleVisibleChange</a> is called when counter is zero, <a class="normal" href="CastleCameras.TCamera.html#VisibleChange">VisibleChange</a> is called immediately, so it's safe to always use <a class="normal" href="CastleCameras.TCamera.html#ScheduleVisibleChange">ScheduleVisibleChange</a> instead of direct <a class="normal" href="CastleCameras.TCamera.html#VisibleChange">VisibleChange</a> in this class.</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="ScheduleVisibleChange"></a><code>procedure <b>ScheduleVisibleChange</b>;</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="EndVisibleChangeSchedule"></a><code>procedure <b>EndVisibleChangeSchedule</b>;</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="SetInput"></a><code>procedure <b>SetInput</b>(const Value: <a href="CastleCameras.html#TCameraInputs">TCameraInputs</a>); 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="SetEnableDragging"></a><code>procedure <b>SetEnableDragging</b>(const Value: boolean); 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="GetIgnoreAllInputs"></a><code>function <b>GetIgnoreAllInputs</b>: boolean;</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="SetIgnoreAllInputs"></a><code>procedure <b>SetIgnoreAllInputs</b>(const Value: boolean);</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="SetProjectionMatrix"></a><code>procedure <b>SetProjectionMatrix</b>(const Value: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a>); 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="SetRadius"></a><code>procedure <b>SetRadius</b>(const Value: Single); 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="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="VisibleChange"></a><code>procedure <b>VisibleChange</b>; override;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called always when some visible part of this control changes. In the simplest case, this is used by the controls manager to know when we need to redraw the control.
<p>In case of the <a class="normal" href="CastleCameras.TCamera.html">TCamera</a> class, we assume that changes to the <a class="normal" href="CastleCameras.TCamera.html#Matrix">TCamera.Matrix</a>, and other properties (for example even changes to <a class="normal" href="CastleCameras.TWalkCamera.html#MoveSpeed">TWalkCamera.MoveSpeed</a>), are "visible", and they also result in this event.</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="Matrix"></a><code>function <b>Matrix</b>: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a>; virtual; abstract;</code></td>
</tr>
<tr><td colspan="2">
<p>
Current camera matrix. You should multiply every 3D point of your scene by this matrix, which usually simply means that you should do <code><a class="normal" href="CastleGLUtils.html#glLoadMatrix">glLoadMatrix</a></code> or <code><a class="normal" href="CastleGLUtils.html#glMultMatrix">glMultMatrix</a></code> of this matrix.</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="RotationMatrix"></a><code>function <b>RotationMatrix</b>: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a>; virtual; abstract;</code></td>
</tr>
<tr><td colspan="2">
<p>
Extract only rotation from your current camera <a class="normal" href="CastleCameras.TCamera.html#Matrix">Matrix</a>. This is useful for rendering skybox in 3D programs (e.g. for VRML/X3D Background node) and generally to transform directions between world and camera space.
<p>It's guaranteed that this is actually only 3x3 matrix, the 4th row and 4th column are all zero except the lowest right item which is 1.0.</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="GetView"></a><code>procedure <b>GetView</b>(out APos, ADir, AUp: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>); virtual; abstract;</code></td>
</tr>
<tr><td colspan="2">
<p>
Express current view as camera vectors: position, direction, up.
<p>Returned Dir and Up must be orthogonal. Returned Dir and Up and GravityUp are already normalized.</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="GetView"></a><code>procedure <b>GetView</b>(out APos, ADir, AUp, AGravityUp: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>); virtual; abstract;</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="GetPosition"></a><code>function <b>GetPosition</b>: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; virtual; abstract;</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="GetGravityUp"></a><code>function <b>GetGravityUp</b>: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; virtual; abstract;</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="SetView"></a><code>procedure <b>SetView</b>(const APos, ADir, AUp: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const AdjustUp: boolean = true); virtual; abstract;</code></td>
</tr>
<tr><td colspan="2">
<p>
Set camera view from vectors: position, direction, up.
<p>Direction, Up and GravityUp do not have to be normalized, we will normalize them internally if necessary. But make sure they are non-zero.
<p>We will automatically fix Direction and Up to be orthogonal, if necessary: when AdjustUp = <code>True</code> (the default) we will adjust the up vector (preserving the given direction value), otherwise we will adjust the direction (preserving the given up value).</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="SetView"></a><code>procedure <b>SetView</b>(const APos, ADir, AUp, AGravityUp: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const AdjustUp: boolean = true); virtual; abstract;</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="Ray"></a><code>procedure <b>Ray</b>(const WindowPosition: <a href="CastleVectors.html#TVector2Single">TVector2Single</a>; const Projection: <a href="CastleRays.TProjection.html">TProjection</a>; out RayOrigin, RayDirection: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Calculate a 3D ray picked by the WindowX, WindowY position on the window. Uses current Container, which means that you have to add this camera to <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Controls">TCastleWindowCustom.Controls</a> or <a class="normal" href="CastleControl.TCastleControlCustom.html#Controls">TCastleControlCustom.Controls</a> before using this method.
<p>Projection (read-only here) describe your projection, required for calculating the ray properly. Resulting RayDirection is always normalized.
<p>WindowPosition is given in the same style as <a class="normal" href="CastleUIControls.TUIContainer.html#MousePosition">TUIContainer.MousePosition</a>: (0, 0) is bottom-left.</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="MouseRay"></a><code>procedure <b>MouseRay</b>( const Projection: <a href="CastleRays.TProjection.html">TProjection</a>; out RayOrigin, RayDirection: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Calculate a ray picked by current mouse position on the window. Uses current Container (both to get it's size and to get current mouse position), which means that you have to add this camera to <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Controls">TCastleWindowCustom.Controls</a> or <a class="normal" href="CastleControl.TCastleControlCustom.html#Controls">TCastleControlCustom.Controls</a> before using this method.
<p> </p>
<h6 class="description_section">See also</h6>
<dl class="see_also">
<dt><a class="normal" href="CastleCameras.TCamera.html#Ray">Ray</a></dt>
<dd>Calculate a 3D ray picked by the WindowX, WindowY position on the window.</dd>
<dt><a class="normal" href="CastleCameras.TCamera.html#CustomRay">CustomRay</a></dt>
<dd>Calculate a ray picked by WindowPosition position on the viewport, assuming current viewport dimensions are as given.</dd>
</dl>
</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="CustomRay"></a><code>procedure <b>CustomRay</b>( const Viewport: <a href="CastleRectangles.TRectangle.html">TRectangle</a>; const WindowPosition: <a href="CastleVectors.html#TVector2Single">TVector2Single</a>; const Projection: <a href="CastleRays.TProjection.html">TProjection</a>; out RayOrigin, RayDirection: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Calculate a ray picked by WindowPosition position on the viewport, assuming current viewport dimensions are as given. This doesn't look at our container sizes at all.
<p>Projection (read-only here) describe projection, required for calculating the ray properly.
<p>Resulting RayDirection is always normalized.
<p>WindowPosition is given in the same style as <a class="normal" href="CastleUIControls.TUIContainer.html#MousePosition">TUIContainer.MousePosition</a>: (0, 0) is bottom-left.</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="Press"></a><code>function <b>Press</b>(const Event: <a href="CastleKeysMouse.TInputPressRelease.html">TInputPressRelease</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="Release"></a><code>function <b>Release</b>(const Event: <a href="CastleKeysMouse.TInputPressRelease.html">TInputPressRelease</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="AnimateTo"></a><code>procedure <b>AnimateTo</b>(OtherCamera: <a href="CastleCameras.TCamera.html">TCamera</a>; const Time: <a href="CastleTimeUtils.html#TFloatTime">TFloatTime</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Animate a camera smoothly into another camera settings. This will gradually change our settings (only the most important settings, that determine actual camera view, i.e. <a class="normal" href="CastleCameras.TCamera.html#Matrix">Matrix</a> result) into another camera.
<p>Current OtherCamera settings will be internally copied during this call. So you can even free OtherCamera instance immediately after calling this.
<p>When we're during camera animation, <a class="normal" href="CastleCameras.TCamera.html#Update">Update</a> doesn't do other stuff (e.g. gravity for <a class="normal" href="CastleCameras.TWalkCamera.html">TWalkCamera</a> doesn't work, rotating for <a class="normal" href="CastleCameras.TExamineCamera.html">TExamineCamera</a> doesn't work). This also means that the key/mouse controls of the camera do not work. Instead, we remember the source and target position (at the time <a class="normal" href="CastleCameras.TCamera.html#AnimateTo">AnimateTo</a> was called) of the camera, and smoothly interpolate camera parameters to match the target.
<p>Once the animation stops, <a class="normal" href="CastleCameras.TCamera.html#Update">Update</a> goes back to normal: gravity in <a class="normal" href="CastleCameras.TWalkCamera.html">TWalkCamera</a> works again, rotating in <a class="normal" href="CastleCameras.TExamineCamera.html">TExamineCamera</a> works again etc.
<p>Calling <a class="normal" href="CastleCameras.TCamera.html#AnimateTo">AnimateTo</a> while the previous animation didn't finish yet is OK. This simply cancels the previous animation, and starts the new animation from the current position.
<p><i>Descendants implementors notes:</i> In this class, almost everything is handled (through <a class="normal" href="CastleCameras.TCamera.html#GetView">GetView</a> / <a class="normal" href="CastleCameras.TCamera.html#SetView">SetView</a>). In descendants you have to only ignore key/mouse/Update events when IsAnimation is <code>True</code>. (Although each Update would override the view anyway, but for stability it's best to explicitly ignore them — you never know how often Update will be called.)
<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="AnimateTo"></a><code>procedure <b>AnimateTo</b>(const Pos, Dir, Up: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const Time: <a href="CastleTimeUtils.html#TFloatTime">TFloatTime</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="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Animation"></a><code>function <b>Animation</b>: boolean; 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="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetInitialView"></a><code>procedure <b>SetInitialView</b>( const AInitialPosition: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; AInitialDirection, AInitialUp: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>; const TransformCurrentCamera: boolean); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Set three initial camera vectors.
<p>AInitialDirection and AInitialUp will be automatically normalized. Corresponding properties (<a class="normal" href="CastleCameras.TCamera.html#InitialDirection">InitialDirection</a> and <a class="normal" href="CastleCameras.TCamera.html#InitialUp">InitialUp</a>) will always contain normalized values.
<p>AInitialUp will be also automatically corrected to be orthogonal to AInitialDirection. We will correct AInitialUp to make it orthogonal, but still preserving the plane they were indicating together with AInitialDirection. Do not ever give here AInitialUp that is parallel to AInitialDirection.
<p>If TransformCurrentCamera = <code>True</code>, then they will also try to change current camera relative to the initial vectors changes. This implements VRML/X3D desired behavior that "viewer position/orientation is conceptually a child of viewpoint position/orientation, and when viewpoint position/orientation changes, viewer should also change".</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="GoToInitial"></a><code>procedure <b>GoToInitial</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Jump to initial camera view (set by <a class="normal" href="CastleCameras.TCamera.html#SetInitialView">SetInitialView</a>).</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="GetNavigationType"></a><code>function <b>GetNavigationType</b>: <a href="CastleCameras.html#TNavigationType">TNavigationType</a>; virtual; abstract;</code></td>
</tr>
<tr><td colspan="2">
</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="IgnoreAllInputs"></a><code>property <b>IgnoreAllInputs</b>: boolean
read <a href="CastleCameras.TCamera.html#GetIgnoreAllInputs">GetIgnoreAllInputs</a> write <a href="CastleCameras.TCamera.html#SetIgnoreAllInputs">SetIgnoreAllInputs</a> default false; deprecated;</code></td>
</tr>
<tr><td colspan="2">
<p class="hint_directive">Warning: this symbol is deprecated.</p><p>
Deprecated, use more flexible <a class="normal" href="CastleCameras.TCamera.html#Input">Input</a> instead. <code><code>IgnoreAllInputs</code> := true</code> is equivalent to <code>Input := []</code>, <code><code>IgnoreAllInputs</code> := false</code> is equivalent to <code>Input := <a class="normal" href="CastleCameras.TCamera.html#DefaultInput">DefaultInput</a></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="Frustum"></a><code>property <b>Frustum</b>: <a href="CastleFrustum.TFrustum.html">TFrustum</a> read FFrustum;</code></td>
</tr>
<tr><td colspan="2">
<p>
The current camera (viewing frustum, based on <a class="normal" href="CastleCameras.TCamera.html#ProjectionMatrix">ProjectionMatrix</a> (set by you) and <a class="normal" href="CastleCameras.TCamera.html#Matrix">Matrix</a> (calculated here). This is recalculated whenever one of these two properties change. Be sure to set <a class="normal" href="CastleCameras.TCamera.html#ProjectionMatrix">ProjectionMatrix</a> before using this.</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="ProjectionMatrix"></a><code>property <b>ProjectionMatrix</b>: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a>
read FProjectionMatrix write <a href="CastleCameras.TCamera.html#SetProjectionMatrix">SetProjectionMatrix</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Projection matrix that you should pass here to have Frustum calculated for you.
<p>This is initially <a class="normal" href="CastleVectors.html#IdentityMatrix4Single">IdentityMatrix4Single</a>. This is not modified anywhere from this class. *You* should modify it, you should set it to projection matrix that you use, if you want to use Frustum value. This is used whenever Frustum is recalculated.</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="Radius"></a><code>property <b>Radius</b>: Single read FRadius write <a href="CastleCameras.TCamera.html#SetRadius">SetRadius</a> default <a href="CastleCameras.TCamera.html#DefaultRadius">DefaultRadius</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
The radius of a sphere around the camera that makes collisions with the world.
<p></p>
<ul class="paragraph_spacing">
<li><p>Collision detection routines use this.</p></li>
<li><p>It determines the projection near plane (that must be slightly smaller than this radius) for 3D rendering.</p></li>
<li><p> Walk camera uses this for automatically correcting PreferredHeight, otherwise weird things could happen if your avatar height is too small compared to camera radius. See <a class="normal" href="CastleCameras.html#CorrectPreferredHeight">CorrectPreferredHeight</a>.
<p>Especially useful if you let user change PreferredHeight at runtime by Input_IncreasePreferredHeight, Input_DecreasePreferredHeight.
<p>This is actually the whole use of <a class="normal" href="CastleCameras.TCamera.html#Radius">Radius</a> inside <a class="normal" href="CastleCameras.html">CastleCameras</a> unit and classes. But the code all around the engine also looks for this <a class="normal" href="CastleCameras.TCamera.html#Radius">Radius</a>, and the camera is a natural place to keep this information.</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="InitialPosition"></a><code>property <b>InitialPosition</b> : <a href="CastleVectors.html#TVector3Single">TVector3Single</a> read FInitialPosition;</code></td>
</tr>
<tr><td colspan="2">
<p>
Initial camera values.
<p><a class="normal" href="CastleCameras.TCamera.html#InitialDirection">InitialDirection</a> and <a class="normal" href="CastleCameras.TCamera.html#InitialUp">InitialUp</a> must be always normalized, and orthogonal.
<p>Default value of <code>InitialPosition</code> is (0, 0, 0), <a class="normal" href="CastleCameras.TCamera.html#InitialDirection">InitialDirection</a> is <a class="normal" href="CastleCameras.html#DefaultCameraDirection">DefaultCameraDirection</a> = (0, -1, 0), <a class="normal" href="CastleCameras.TCamera.html#InitialUp">InitialUp</a> is <a class="normal" href="CastleCameras.html#DefaultCameraUp">DefaultCameraUp</a> = (0, 1, 0).
<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="InitialDirection"></a><code>property <b>InitialDirection</b>: <a href="CastleVectors.html#TVector3Single">TVector3Single</a> read FInitialDirection;</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="InitialUp"></a><code>property <b>InitialUp</b> : <a href="CastleVectors.html#TVector3Single">TVector3Single</a> read FInitialUp;</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="EnableDragging"></a><code>property <b>EnableDragging</b>: boolean read FEnableDragging write <a href="CastleCameras.TCamera.html#SetEnableDragging">SetEnableDragging</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Is mouse dragging allowed by scene manager. This is an additional condition to enable mouse dragging, above the existing ciMouseDragging in Input. It is set internally by scene manager, to prevent camera navigation by dragging when we already drag a 3D item (like X3D TouchSensor).</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="Input"></a><code>property <b>Input</b>: <a href="CastleCameras.html#TCameraInputs">TCameraInputs</a> read FInput write <a href="CastleCameras.TCamera.html#SetInput">SetInput</a> default <a href="CastleCameras.TCamera.html#DefaultInput">DefaultInput</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Input methods available to user. See documentation of <a class="normal" href="CastleCameras.html#TCameraInput">TCameraInput</a> type for possible values and their meaning.
<p>To disable any user interaction with camera (for example, to implement X3D "NONE" navigation type) you can simply set this to empty.</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:09</em>
</span>
</td></tr></table></body></html>
|