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
|
<!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: X3DFields: Class TX3DField</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="TX3DField"></a><h1 class="cio">Class TX3DField</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>Fields</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="X3DFields.html">X3DFields</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TX3DField = class(<a class="normal" href="X3DFields.TX3DFieldOrEvent.html">TX3DFieldOrEvent</a>)</code></p>
<h2 class="description">Description</h2>
<p>
Base class for all VRML/X3D fields.
<p>Common notes for all descendants: most of them expose field or property "Value", this is (surprise, surprise!) the value of the field. Many of them also expose DefaultValue and DefaultValueExists fields/properties, these should be the default VRML value for this field. You can even change DefaultValue after the object is created.
<p>Most of descendants include constructor that initializes both DefaultValue and Value to the same thing, as this is what you usually want.
<p>Some notes about <code>Assign</code> method (inherited from TPersistent and overridied appropriately in <code>TX3DField</code> descendants):
<p></p>
<ol class="paragraph_spacing">
<li value="1"><p>There are some exceptions, but usually assignment is possible only when source and destination field classes are equal.</p></li>
<li value="2"><p>Assignment (by <code>Assign</code>, inherited from TPersistent) tries to copy everything: name (with alternative names), default value, <a class="normal" href="X3DFields.TX3DFieldOrEvent.html#IsClauseNames">IsClauseNames</a>, <a class="normal" href="X3DFields.TX3DField.html#ValueFromIsClause">ValueFromIsClause</a>, Exposed, and of course current value.
<p>Exceptions are things related to hierarchy of containers: <a class="normal" href="X3DFields.TX3DFieldOrEvent.html#ParentNode">ParentNode</a>, <a class="normal" href="X3DFields.TX3DFieldOrEvent.html#ParentInterfaceDeclaration">ParentInterfaceDeclaration</a>. Also <a class="normal" href="X3DFields.TX3DField.html#ExposedEventsLinked">ExposedEventsLinked</a>.
<p>If you want to copy only the current value, use <a class="normal" href="X3DFields.TX3DField.html#AssignValue">AssignValue</a> (or <a class="normal" href="X3DFields.TX3DField.html#AssignLerp">AssignLerp</a>, where available).</p></li>
</ol>
<p></p>
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TPersistent</li>
<li class="ancestor"><a class="normal" href="CastleInterfaces.TNonRefCountedInterfacedPersistent.html">TNonRefCountedInterfacedPersistent</a></li>
<li class="ancestor"><a class="normal" href="X3DFields.TX3DFileItem.html">TX3DFileItem</a></li>
<li class="ancestor"><a class="normal" href="X3DFields.TX3DFieldOrEvent.html">TX3DFieldOrEvent</a></li>
<li class="thisitem">TX3DField</li></ul><h2 class="overview">Overview</h2>
<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="X3DFields.TX3DField.html#SaveToStreamValue">SaveToStreamValue</a></b>(Writer: <a href="X3DFields.TX3DWriter.html">TX3DWriter</a>); virtual; abstract;</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="X3DFields.TX3DField.html#SaveToXmlValue">SaveToXmlValue</a></b>: <a href="X3DFields.html#TSaveToXmlMethod">TSaveToXmlMethod</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="X3DFields.TX3DField.html#VRMLFieldAssignCommon">VRMLFieldAssignCommon</a></b>(Source: <a href="X3DFields.TX3DField.html">TX3DField</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>procedure <b><a href="X3DFields.TX3DField.html#AssignValueRaiseInvalidClass">AssignValueRaiseInvalidClass</a></b>(Source: <a href="X3DFields.TX3DField.html">TX3DField</a>);</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>class function <b><a href="X3DFields.TX3DField.html#ExposedEventsFieldClass">ExposedEventsFieldClass</a></b>: <a href="X3DFields.html#TX3DFieldClass">TX3DFieldClass</a>; 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="X3DFields.TX3DField.html#ExposedEventReceive">ExposedEventReceive</a></b>(Event: <a href="X3DFields.TX3DEvent.html">TX3DEvent</a>; Value: <a href="X3DFields.TX3DField.html">TX3DField</a>; const Time: <a href="X3DTime.TX3DTime.html">TX3DTime</a>); 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>constructor <b><a href="X3DFields.TX3DField.html#Create">Create</a></b>(AParentNode: <a href="X3DFields.TX3DFileItem.html">TX3DFileItem</a>; const AName: string);</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="X3DFields.TX3DField.html#CreateUndefined">CreateUndefined</a></b>(AParentNode: <a href="X3DFields.TX3DFileItem.html">TX3DFileItem</a>; const AName: string; const AExposed: 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>destructor <b><a href="X3DFields.TX3DField.html#Destroy">Destroy</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="X3DFields.TX3DField.html#Parse">Parse</a></b>(Lexer: <a href="X3DLexer.TX3DLexer.html">TX3DLexer</a>; Reader: <a href="X3DFields.TX3DReader.html">TX3DReader</a>; IsClauseAllowed: boolean);</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="X3DFields.TX3DField.html#ParseValue">ParseValue</a></b>(Lexer: <a href="X3DLexer.TX3DLexer.html">TX3DLexer</a>; Reader: <a href="X3DFields.TX3DReader.html">TX3DReader</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="X3DFields.TX3DField.html#ParseXMLAttributeLexer">ParseXMLAttributeLexer</a></b>(Lexer: <a href="X3DLexer.TX3DLexer.html">TX3DLexer</a>; Reader: <a href="X3DFields.TX3DReader.html">TX3DReader</a>); 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="X3DFields.TX3DField.html#ParseXMLAttribute">ParseXMLAttribute</a></b>(const AttributeValue: string; Reader: <a href="X3DFields.TX3DReader.html">TX3DReader</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="X3DFields.TX3DField.html#ParseXMLElement">ParseXMLElement</a></b>(Element: TDOMElement; Reader: <a href="X3DFields.TX3DReader.html">TX3DReader</a>); 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="X3DFields.TX3DField.html#FieldSaveToStream">FieldSaveToStream</a></b>(Writer: <a href="X3DFields.TX3DWriter.html">TX3DWriter</a>; FieldSaveWhenDefault: boolean = false; XmlAvoidSavingNameBeforeValue: boolean = false);</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="X3DFields.TX3DField.html#SaveToStream">SaveToStream</a></b>(Writer: <a href="X3DFields.TX3DWriter.html">TX3DWriter</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>function <b><a href="X3DFields.TX3DField.html#SaveToXml">SaveToXml</a></b>: <a href="X3DFields.html#TSaveToXmlMethod">TSaveToXmlMethod</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="X3DFields.TX3DField.html#EqualsDefaultValue">EqualsDefaultValue</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>function <b><a href="X3DFields.TX3DField.html#Equals">Equals</a></b>(SecondValue: <a href="X3DFields.TX3DField.html">TX3DField</a>; const EqualityEpsilon: Double): boolean; virtual; reintroduce;</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="X3DFields.TX3DField.html#FastEqualsValue">FastEqualsValue</a></b>(SecondValue: <a href="X3DFields.TX3DField.html">TX3DField</a>): 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>function <b><a href="X3DFields.TX3DField.html#EventIn">EventIn</a></b>: <a href="X3DFields.TX3DEvent.html">TX3DEvent</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="X3DFields.TX3DField.html#EventOut">EventOut</a></b>: <a href="X3DFields.TX3DEvent.html">TX3DEvent</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>class function <b><a href="X3DFields.TX3DField.html#TypeName">TypeName</a></b>: string; 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>class function <b><a href="X3DFields.TX3DField.html#CreateEvent">CreateEvent</a></b>(const AParentNode: <a href="X3DFields.TX3DFileItem.html">TX3DFileItem</a>; const AName: string; const AInEvent: boolean): <a href="X3DFields.TX3DEvent.html">TX3DEvent</a>; 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="X3DFields.TX3DField.html#AssignValue">AssignValue</a></b>(Source: <a href="X3DFields.TX3DField.html">TX3DField</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="X3DFields.TX3DField.html#AssignDefaultValueFromValue">AssignDefaultValueFromValue</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>procedure <b><a href="X3DFields.TX3DField.html#AssignLerp">AssignLerp</a></b>(const A: Double; Value1, Value2: <a href="X3DFields.TX3DField.html">TX3DField</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>function <b><a href="X3DFields.TX3DField.html#CanAssignLerp">CanAssignLerp</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="X3DFields.TX3DField.html#AddAlternativeName">AddAlternativeName</a></b>(const AlternativeName: string; VrmlMajorVersion: Integer); 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="X3DFields.TX3DField.html#Changed">Changed</a></b>;</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="X3DFields.TX3DField.html#ExecuteChanges">ExecuteChanges</a></b>: <a href="X3DFields.html#TX3DChanges">TX3DChanges</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="X3DFields.TX3DField.html#Send">Send</a></b>(Value: <a href="X3DFields.TX3DField.html">TX3DField</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>function <b><a href="X3DFields.TX3DField.html#OnReceive">OnReceive</a></b>: <a href="X3DFields.TX3DEventReceiveList.html">TX3DEventReceiveList</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="X3DFields.TX3DField.html#ValueFromIsClause">ValueFromIsClause</a></b>: boolean
read FValueFromIsClause write FValueFromIsClause;</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="X3DFields.TX3DField.html#Exposed">Exposed</a></b>: boolean read FExposed write SetExposed default true;</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="X3DFields.TX3DField.html#ExposedEvents">ExposedEvents</a></b> [InEvent:boolean]: <a href="X3DFields.TX3DEvent.html">TX3DEvent</a>
read GetExposedEvents;</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="X3DFields.TX3DField.html#ExposedEventsLinked">ExposedEventsLinked</a></b>: boolean
read FExposedEventsLinked write SetExposedEventsLinked
default true;</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="X3DFields.TX3DField.html#ChangesAlways">ChangesAlways</a></b>: <a href="X3DFields.html#TX3DChanges">TX3DChanges</a> read FChangesAlways write FChangesAlways;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<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="SaveToStreamValue"></a><code>procedure <b>SaveToStreamValue</b>(Writer: <a href="X3DFields.TX3DWriter.html">TX3DWriter</a>); virtual; abstract;</code></td>
</tr>
<tr><td colspan="2">
<p>
Save field value to a stream. Must be overriden for each specific field.
<p>For classic encoding, <a class="normal" href="X3DFields.TX3DField.html#FieldSaveToStream">FieldSaveToStream</a> and <a class="normal" href="X3DFields.TX3DField.html#SaveToStream">SaveToStream</a> write Indent, Name, ' ', then call <code>SaveToStreamValue</code>, then write <a class="normal" href="CastleUtils.html#NL">NL</a>.
<p>IS clauses are not saved by <a class="normal" href="X3DFields.TX3DField.html#FieldSaveToStream">FieldSaveToStream</a> or <a class="normal" href="X3DFields.TX3DField.html#SaveToStream">SaveToStream</a>. (They must be saved specially, by <a class="normal" href="X3DFields.TX3DFieldOrEvent.html#SaveToStreamClassicIsClauses">SaveToStreamClassicIsClauses</a> or special XML output.) <a class="normal" href="X3DFields.TX3DField.html#SaveToStream">SaveToStream</a> still checks <a class="normal" href="X3DFields.TX3DField.html#ValueFromIsClause">ValueFromIsClause</a>, if <a class="normal" href="X3DFields.TX3DField.html#ValueFromIsClause">ValueFromIsClause</a> we will not call <code>SaveToStreamValue</code>. So when overriding <code>SaveToStreamValue</code>, you can safely assume that <a class="normal" href="X3DFields.TX3DField.html#ValueFromIsClause">ValueFromIsClause</a> is <code>False</code>.</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="SaveToXmlValue"></a><code>function <b>SaveToXmlValue</b>: <a href="X3DFields.html#TSaveToXmlMethod">TSaveToXmlMethod</a>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Save method of <a class="normal" href="X3DFields.TX3DField.html#SaveToStreamValue">SaveToStreamValue</a>. May assume things that <a class="normal" href="X3DFields.TX3DField.html#SaveToStreamValue">SaveToStreamValue</a> may issume, for example: if this is used at all, then at least field value is not default (so there is a need to write this field) and such.</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="VRMLFieldAssignCommon"></a><code>procedure <b>VRMLFieldAssignCommon</b>(Source: <a href="X3DFields.TX3DField.html">TX3DField</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Call this inside overriden Assign methods. I don't want to place this inside TX3DField.Assign, since I want "inherited" in Assign methods to cause exception.</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="AssignValueRaiseInvalidClass"></a><code>procedure <b>AssignValueRaiseInvalidClass</b>(Source: <a href="X3DFields.TX3DField.html">TX3DField</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="ExposedEventsFieldClass"></a><code>class function <b>ExposedEventsFieldClass</b>: <a href="X3DFields.html#TX3DFieldClass">TX3DFieldClass</a>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Class of the fields allowed in the exposed events of this field. This should usually be using ClassType of this object, and this is the default implementation of this method in <a class="normal" href="X3DFields.TX3DField.html">TX3DField</a>.
<p>You can override this to return some ancestor (from which, and to which, you can assign) if your <a class="normal" href="X3DFields.TX3DField.html">TX3DField</a> descendant doesn't change how the <code>Assign</code> method works. E.g. <a class="normal" href="X3DNodes.TSFTextureUpdate.html">TSFTextureUpdate</a> class, that wants to be fully compatible with normal <a class="normal" href="X3DFields.TSFString.html">TSFString</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="ExposedEventReceive"></a><code>procedure <b>ExposedEventReceive</b>(Event: <a href="X3DFields.TX3DEvent.html">TX3DEvent</a>; Value: <a href="X3DFields.TX3DField.html">TX3DField</a>; const Time: <a href="X3DTime.TX3DTime.html">TX3DTime</a>); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Handle exposed input event. In <a class="normal" href="X3DFields.TX3DField.html">TX3DField</a> class, this does everything usually needed — assigns value, sends an output event, notifies <a class="normal" href="X3DFields.TX3DField.html#Changed">Changed</a>.
<p>You can override this for some special purposes. For special needs, you do not even need to call <code>inherited</code> in overriden versions. This is suitable e.g. for cases when TimeSensor.set_startTime or such must be ignored.</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="Create"></a><code>constructor <b>Create</b>(AParentNode: <a href="X3DFields.TX3DFileItem.html">TX3DFileItem</a>; const AName: string);</code></td>
</tr>
<tr><td colspan="2">
<p>
Normal constructor.
<p><i>Descendants implementors notes:</i> when implementing constructors in descendants, remember that Create in this class actually just calls <a class="normal" href="X3DFields.TX3DField.html#CreateUndefined">CreateUndefined</a>, and <a class="normal" href="X3DFields.TX3DField.html#CreateUndefined">CreateUndefined</a> is virtual. So when calling <code>inherited Create</code>, be aware that actually you may be calling your own overriden <a class="normal" href="X3DFields.TX3DField.html#CreateUndefined">CreateUndefined</a>.
<p>In fact, in descendants you should focus on moving all the work to <a class="normal" href="X3DFields.TX3DField.html#CreateUndefined">CreateUndefined</a> constructor. The Create constructor should be just a comfortable extension of <a class="normal" href="X3DFields.TX3DField.html#CreateUndefined">CreateUndefined</a>, that does the same and addiionally gets parameters that specify default field 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="CreateUndefined"></a><code>constructor <b>CreateUndefined</b>(AParentNode: <a href="X3DFields.TX3DFileItem.html">TX3DFileItem</a>; const AName: string; const AExposed: boolean); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Virtual constructor, that you can use to construct field instance when field class is known only at runtime.
<p>The idea is that in some cases, you need to create fields using variable like FieldClass: <a class="normal" href="X3DFields.html#TX3DFieldClass">TX3DFieldClass</a>. See e.g. <a class="normal" href="X3DNodes.TX3DInterfaceDeclaration.html">TX3DInterfaceDeclaration</a>, VRML 2.0 feature that simply requires this ability, also implementation of TX3DSimpleMultField.Parse and <a class="normal" href="X3DFields.TX3DSimpleMultField.html#CreateItemBeforeParse">TX3DSimpleMultField.CreateItemBeforeParse</a>.
<p>Later you can initialize such instance from string using it's Parse method.
<p>Note that some exceptional fields simply cannot work when initialized by this constructor: these are SFEnum and SFBitMask fields. They simply need to know their <a class="normal" href="X3DFields.TSFEnum.html#EnumNames">TSFEnum.EnumNames</a>, or <a class="normal" href="X3DFields.TSFBitMask.html#FlagNames">TSFBitMask.FlagNames</a> + <a class="normal" href="X3DFields.TSFBitMask.html#NoneString">TSFBitMask.NoneString</a> + <a class="normal" href="X3DFields.TSFBitMask.html#AllString">TSFBitMask.AllString</a> before they can be parsed. I guess that's one of the reasons why these field types were entirely removed from VRML 2.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="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="Parse"></a><code>procedure <b>Parse</b>(Lexer: <a href="X3DLexer.TX3DLexer.html">TX3DLexer</a>; Reader: <a href="X3DFields.TX3DReader.html">TX3DReader</a>; IsClauseAllowed: boolean);</code></td>
</tr>
<tr><td colspan="2">
<p>
Parse inits properties from Lexer.
<p>In this class, Parse only appends to <a class="normal" href="X3DFields.TX3DFieldOrEvent.html#IsClauseNames">IsClauseNames</a>: if we stand on "IS" clause (see VRML 2.0 spec about "IS" clause) and IsClauseAllowed then we append specified identifier to <a class="normal" href="X3DFields.TX3DFieldOrEvent.html#IsClauseNames">IsClauseNames</a>.
<p>If "IS" clause not found, we call <a class="normal" href="X3DFields.TX3DField.html#ParseValue">ParseValue</a> which should actually parse field's value. Descendants should override <a class="normal" href="X3DFields.TX3DField.html#ParseValue">ParseValue</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="ParseValue"></a><code>procedure <b>ParseValue</b>(Lexer: <a href="X3DLexer.TX3DLexer.html">TX3DLexer</a>; Reader: <a href="X3DFields.TX3DReader.html">TX3DReader</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="ParseXMLAttributeLexer"></a><code>procedure <b>ParseXMLAttributeLexer</b>(Lexer: <a href="X3DLexer.TX3DLexer.html">TX3DLexer</a>; Reader: <a href="X3DFields.TX3DReader.html">TX3DReader</a>); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Parse field value from X3D XML encoded attribute using a Lexer. Attributes in X3D are generally encoded such that normal <code><a class="normal" href="X3DFields.TX3DField.html#ParseValue">ParseValue</a>(Lexer, nil)</code> call is appropriate, so this is done in this class.</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="ParseXMLAttribute"></a><code>procedure <b>ParseXMLAttribute</b>(const AttributeValue: string; Reader: <a href="X3DFields.TX3DReader.html">TX3DReader</a>); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Parse field value from X3D XML encoded attribute.
<p>Implementation in this class creates a Lexer to parse the string, and calls <a class="normal" href="X3DFields.TX3DField.html#ParseXMLAttributeLexer">ParseXMLAttributeLexer</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="ParseXMLElement"></a><code>procedure <b>ParseXMLElement</b>(Element: TDOMElement; Reader: <a href="X3DFields.TX3DReader.html">TX3DReader</a>); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Parse field's value from XML Element children. This is used to read SFNode / MFNode field value inside <field> (for interface declaration default field value) and <fieldValue> inside <ProtoInstance>.</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="FieldSaveToStream"></a><code>procedure <b>FieldSaveToStream</b>(Writer: <a href="X3DFields.TX3DWriter.html">TX3DWriter</a>; FieldSaveWhenDefault: boolean = false; XmlAvoidSavingNameBeforeValue: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
<p>
Save the field to the stream. Field name (if set, omitted if empty) and value are saved. Unless the current field value equals default value and FieldSaveWhenDefault is <code>False</code> (default), then nothing is saved.
<p>IS clauses are not saved here (because they often have to be treated specially anyway, for XML encoding, for prototype declarations etc.).</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="SaveToStream"></a><code>procedure <b>SaveToStream</b>(Writer: <a href="X3DFields.TX3DWriter.html">TX3DWriter</a>); override;</code></td>
</tr>
<tr><td colspan="2">
<p>
Save the field to the stream.
<p>This simply calls <a class="normal" href="X3DFields.TX3DField.html#FieldSaveToStream">FieldSaveToStream</a>(Writer). See <a class="normal" href="X3DFields.TX3DField.html#FieldSaveToStream">FieldSaveToStream</a> for more comments and when you need control over FieldSaveWhenDefault behavior.
<p>It doesn't actually save anything if field value is defined and equals default 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="SaveToXml"></a><code>function <b>SaveToXml</b>: <a href="X3DFields.html#TSaveToXmlMethod">TSaveToXmlMethod</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="EqualsDefaultValue"></a><code>function <b>EqualsDefaultValue</b>: boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Zwraca zawsze false w tej klasie. Mozesz to przedefiniowac w podklasach aby <a class="normal" href="X3DFields.TX3DField.html#SaveToStream">SaveToStream</a> nie zapisywalo do strumienia pol o wartosci domyslnej.</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="Equals"></a><code>function <b>Equals</b>(SecondValue: <a href="X3DFields.TX3DField.html">TX3DField</a>; const EqualityEpsilon: Double): boolean; virtual; reintroduce;</code></td>
</tr>
<tr><td colspan="2">
<p>
<code>True</code> if the SecondValue object has exactly the same type and properties. For this class, this returns just (SecondValue.Name = Name).
<p>All descendants (that add some property that should be compared) should override this like
<p></p>
<pre class="longcode">
Result := (<span class="pascal_keyword">inherited</span> Equals(SecondValue, EqualityEpsilon)) <span class="pascal_keyword">and</span>
(SecondValue <span class="pascal_keyword">is</span> TMyType) <span class="pascal_keyword">and</span>
(TMyType(SecondValue)<span class="pascal_float">.</span>MyProperty = MyProperty);
</pre>
<p>
<p>For varius floating-point fields in this unit: we compare each float using EqualityEpsilon, i.e. if the difference is < EqualityEpsilon then the floats are assumed equal. Pass EqualityEpsilon = 0.0 to perform *exact* comparison (this case will be optimized in implementation, by using routines like CompareMem instead of comparing float-by-float).
<p>Note that this *doesn't* compare the default values of two fields instances. This compares only the current values of two fields instances, and eventually some other properties that affect parsing (like names for <a class="normal" href="X3DFields.TSFEnum.html">TSFEnum</a> and <a class="normal" href="X3DFields.TSFBitMask.html">TSFBitMask</a>) or allowed future values (like <a class="normal" href="X3DFields.TSFFloat.html#MustBeNonnegative">TSFFloat.MustBeNonnegative</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="FastEqualsValue"></a><code>function <b>FastEqualsValue</b>(SecondValue: <a href="X3DFields.TX3DField.html">TX3DField</a>): boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Compare value of this field, with other field, fast.
<p>This compares only the values of the fields, not other properties (it doesn't care about names of the fields or such, or default values; only current values). In other words, it compares only the things copied by <a class="normal" href="X3DFields.TX3DField.html#AssignValue">AssignValue</a>.
<p>This tries to compare very fast, which means that for large (multi-valued) fields it may give up and answer <code>False</code> even when they are in fact equal. So this is usable only for optimization purposes: when it answers <code>True</code>, it is <code>True</code>. When it answers <code>False</code>, it actually doesn't know.
<p>Default implementation in this class (<code>TX3DField</code>) just returns <code>False</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="EventIn"></a><code>function <b>EventIn</b>: <a href="X3DFields.TX3DEvent.html">TX3DEvent</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Exposed events of this field. <code>Nil</code> if this field is not exposed. <code>EventIn</code> is always equivalent to <a class="normal" href="X3DFields.TX3DField.html#ExposedEvents">ExposedEvents</a>[true], <a class="normal" href="X3DFields.TX3DField.html#EventOut">EventOut</a> is always equivalent to <a class="normal" href="X3DFields.TX3DField.html#ExposedEvents">ExposedEvents</a>[false]. </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="EventOut"></a><code>function <b>EventOut</b>: <a href="X3DFields.TX3DEvent.html">TX3DEvent</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="TypeName"></a><code>class function <b>TypeName</b>: string; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Field type name in VRML/X3D. As for VRML/X3D interface declaration statements. In base <a class="normal" href="X3DFields.TX3DField.html">TX3DField</a> class, this teturns <code>XFAny</code> (name indicating any type, used by instantreality and us).</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="CreateEvent"></a><code>class function <b>CreateEvent</b>(const AParentNode: <a href="X3DFields.TX3DFileItem.html">TX3DFileItem</a>; const AName: string; const AInEvent: boolean): <a href="X3DFields.TX3DEvent.html">TX3DEvent</a>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Create <a class="normal" href="X3DFields.TX3DEvent.html">TX3DEvent</a> descendant suitable as exposed event for this field.</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="AssignValue"></a><code>procedure <b>AssignValue</b>(Source: <a href="X3DFields.TX3DField.html">TX3DField</a>); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Copies the current field value. Contrary to TPersistent.Assign, this doesn't copy the rest of properties.
<p>After setting, our <a class="normal" href="X3DFields.TX3DField.html#ValueFromIsClause">ValueFromIsClause</a> is always changed to <code>False</code>. You can manually change it to <code>True</code>, if this copy indeed was done following "IS" clause.
<p>
<p>
<p><i>Descendants implementors notes</i>:
<p>In this class, implementation takes care of setting our <a class="normal" href="X3DFields.TX3DField.html#ValueFromIsClause">ValueFromIsClause</a> to <code>False</code>. In descendants, you should do like
<p></p>
<pre class="longcode">
<span class="pascal_keyword">if</span> Source <span class="pascal_keyword">is</span> <appropriate <span class="pascal_keyword">class</span>> <span class="pascal_keyword">then</span>
<span class="pascal_keyword">begin</span>
<span class="pascal_keyword">inherited</span>;
Value := Source.value;
<span class="pascal_keyword">end</span> <span class="pascal_keyword">else</span>
AssignValueRaiseInvalidClass(Source);
</pre>
<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="X3DFields.EX3DFieldAssignInvalidClass.html">EX3DFieldAssignInvalidClass</a></dt>
<dd>Usually it's required the Source class to be equal to our class, if Source classes cannot be assigned we raise EX3DFieldCannotAssignClass.</dd>
<dt><a class="normal" href="X3DFields.EX3DFieldAssign.html">EX3DFieldAssign</a></dt>
<dd>Raised in case of any field assignment problem. It's guaranteed that in case of such problem, our value will not be modified before raising the exception.
<p><a class="normal" href="X3DFields.EX3DFieldAssignInvalidClass.html">EX3DFieldAssignInvalidClass</a> inherits from <a class="normal" href="X3DFields.EX3DFieldAssign.html">EX3DFieldAssign</a>, so actually <a class="normal" href="X3DFields.EX3DFieldAssignInvalidClass.html">EX3DFieldAssignInvalidClass</a> is just a special case of this exceptiion.</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="AssignDefaultValueFromValue"></a><code>procedure <b>AssignDefaultValueFromValue</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Set field's default value from the current value.
<p>Note that for now this doesn't guarantee that every possible field's value can be stored as default value. In case of trouble, it will silently record "no default is known" information, so e.g. <a class="normal" href="X3DFields.TX3DField.html#EqualsDefaultValue">EqualsDefaultValue</a> will always return <code>False</code>. Our default value mechanisms are sometimes limited, not every value can be a default value. For example, for multiple-valued nodes, we usually cannot save arrays longer than one as default value. This is not a problem, since X3D specification doesn't specify too long default values. But it may be a problem for prototypes, since then user can assign any value as default value. May be corrected in the future.</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="AssignLerp"></a><code>procedure <b>AssignLerp</b>(const A: Double; Value1, Value2: <a href="X3DFields.TX3DField.html">TX3DField</a>); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Assigns value to this node calculated from linear interpolation between two given nodes Value1, Value2. Just like other lerp functions in our units (like <a class="normal" href="CastleVectors.html#Lerp">CastleVectors.Lerp</a>).
<p>Like <a class="normal" href="X3DFields.TX3DField.html#AssignValue">AssignValue</a>, this copies only the current value. All other properties (like Name, <a class="normal" href="X3DFields.TX3DFieldOrEvent.html#IsClauseNames">IsClauseNames</a>, <a class="normal" href="X3DFields.TX3DField.html#ValueFromIsClause">ValueFromIsClause</a>, default value) are untouched.
<p>There are some special precautions for this:
<p></p>
<ul class="paragraph_spacing">
<li><p>First of all, <code>AssignLerp</code> is defined only for fields where <a class="normal" href="X3DFields.TX3DField.html#CanAssignLerp">CanAssignLerp</a> returns <code>True</code>, so always check <a class="normal" href="X3DFields.TX3DField.html#CanAssignLerp">CanAssignLerp</a> first. All float-based VRML fields should have this implemented.</p></li>
<li><p>Use this only if Value1 and Value2 are equal or descendant of target (Self) class.</p></li>
<li><p>For multiple-value fields, counts of Value1 and Value2 must be equal, or <a class="normal" href="X3DFields.EX3DMultFieldDifferentCount.html">EX3DMultFieldDifferentCount</a> will be raised.</p></li>
</ul>
<p>
<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="X3DFields.EX3DMultFieldDifferentCount.html">EX3DMultFieldDifferentCount</a></dt>
<dd>When field is multiple-value VRML field and Value1.Count <> Value2.Count.</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="CanAssignLerp"></a><code>function <b>CanAssignLerp</b>: boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Is <a class="normal" href="X3DFields.TX3DField.html#AssignLerp">AssignLerp</a> usable on this field type?</p>
<p>
<p><i>Descendants implementors notes</i>: In this class, this always returns <code>False</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="AddAlternativeName"></a><code>procedure <b>AddAlternativeName</b>(const AlternativeName: string; VrmlMajorVersion: Integer); 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="Changed"></a><code>procedure <b>Changed</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Notify ParentNode.Scene that the value of this field changed.</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="ExecuteChanges"></a><code>function <b>ExecuteChanges</b>: <a href="X3DFields.html#TX3DChanges">TX3DChanges</a>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
What happens when the value of this field changes. This is called, exactly once, by <a class="normal" href="CastleSceneCore.TCastleSceneCore.html#ChangedField">TCastleSceneCore.ChangedField</a> to determine what must be done when we know that value of this field changed.
<p>In overridden descendants, this can also do something immediately. Overriding this is similar to registering your callback in <a class="normal" href="X3DFields.TX3DField.html#OnReceive">OnReceive</a> list, with two benefits:
<p></p>
<ol class="paragraph_spacing">
<li value="1"><p>This method may be not called (although no guarantees) when the actual field value did not change. In contrast, the <a class="normal" href="X3DFields.TX3DField.html#OnReceive">OnReceive</a> event is always fired, even when you send the same value to an exposed field, because VRML/X3D events and routes must be fired anyway.</p></li>
<li value="2"><p>This is useful also for fields that are not exposed, and can be changed only by ObjectPascal code.</p></li>
</ol>
<p>
<p>So overridding this is closer to "do something when field value changes" than registering callback in <a class="normal" href="X3DFields.TX3DField.html#OnReceive">OnReceive</a> list.</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="Send"></a><code>procedure <b>Send</b>(Value: <a href="X3DFields.TX3DField.html">TX3DField</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Set the value of the field, notifying the scenes and events engine. This sets the value of this field in the nicest possible way for any possible <a class="normal" href="CastleSceneCore.TCastleSceneCore.html">TCastleSceneCore</a> (with events on or off) containing the node with this field.
<p>Precise specification:
<p></p>
<ul class="paragraph_spacing">
<li><p>If this is an exposed field and we have events engine working:
<p>We will send this value through it's input event. In this case, this is equivalent to doing <code>EventIn.Send(Value, Scene.Time)</code>. The scenes (including events engine) will be notified correctly by exposed events handler already.</p></li>
<li><p>Otherwise, we will just set the fields value. And then notify the scenes (including events engine).</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="OnReceive"></a><code>function <b>OnReceive</b>: <a href="X3DFields.TX3DEventReceiveList.html">TX3DEventReceiveList</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Notifications when exposed field received new value through VRML/X3D event. Only for exposed fields (<code>Nil</code> for not exposed fields). This is simply a shortcut for <code>EventOut.OnReceive</code>, see <a class="normal" href="X3DFields.TX3DEvent.html#OnReceive">TX3DEvent.OnReceive</a> for details how does this work.
<p>Note that this observes the "out" event (not the "in" event). This way you know inside the handler that the field value is already changed as appropriate. Inside "in" event handlers, you would not know this (it would depend on the order in which handlers are run, one "in" handler sets the field value).
<p>Note that "out" event handlers are executed before Scene is notified about the field value change (before <a class="normal" href="CastleSceneCore.TCastleSceneCore.html#ChangedField">TCastleSceneCore.ChangedField</a> is called). This is also usually exactly what you want — you can change the scene graph inside the event handler (for example, load something on Inline.load or Inline.url changes), and let the <a class="normal" href="X3DFields.TX3DField.html#ChangesAlways">TX3DField.ChangesAlways</a> cause appropriate action on this change.</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="ValueFromIsClause"></a><code>property <b>ValueFromIsClause</b>: boolean
read FValueFromIsClause write FValueFromIsClause;</code></td>
</tr>
<tr><td colspan="2">
<p>
Does current field value came from expanding "IS" clause. If yes, then saving this field to stream will only save it's "IS" clauses, never saving actual 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="Exposed"></a><code>property <b>Exposed</b>: boolean read FExposed write SetExposed default true;</code></td>
</tr>
<tr><td colspan="2">
<p>
Does this field generate/accept events, that is an "exposedField" (in VRML 2.0) or "inputOutput" (in X3D).</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="ExposedEvents"></a><code>property <b>ExposedEvents</b> [InEvent:boolean]: <a href="X3DFields.TX3DEvent.html">TX3DEvent</a>
read GetExposedEvents;</code></td>
</tr>
<tr><td colspan="2">
<p>
These are the set_xxx and xxx_changed events exposed by this field. <code>Nil</code> if Exposed is <code>False</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="ExposedEventsLinked"></a><code>property <b>ExposedEventsLinked</b>: boolean
read FExposedEventsLinked write SetExposedEventsLinked
default true;</code></td>
</tr>
<tr><td colspan="2">
<p>
When <code>True</code> (default) we will automatically handle exposed events behavior. This means that we will listen on <a class="normal" href="X3DFields.TX3DField.html#EventIn">EventIn</a>, and when something will be received we will set current field's value and produce appropriate <a class="normal" href="X3DFields.TX3DField.html#EventOut">EventOut</a>.
<p>You almost certainly want to leave this as <code>True</code> in all typical situations, as it takes care of implementing required exposed events behavior.
<p>That said, in special cases you may decide to break 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="ChangesAlways"></a><code>property <b>ChangesAlways</b>: <a href="X3DFields.html#TX3DChanges">TX3DChanges</a> read FChangesAlways write FChangesAlways;</code></td>
</tr>
<tr><td colspan="2">
<p>
What always happens when the value of this field changes.
<p>This is included in the <a class="normal" href="X3DFields.TX3DField.html#ExecuteChanges">ExecuteChanges</a> method result. So instead of using this property, you could always override <a class="normal" href="X3DFields.TX3DField.html#ExecuteChanges">ExecuteChanges</a> method. But often it's easier to use the property.
<p>By default this is an empty set. This is suitable for things that aren't *directly* an actual content (but only an intermediate value to change other stuff). This includes all metadata fields and nodes, all fields in event utilities, Script node, interpolators...
<p>See <a class="normal" href="X3DFields.html#TX3DChange">TX3DChange</a> for possible values.</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:13</em>
</span>
</td></tr></table></body></html>
|