Changes between Version 4 and Version 5 of ossimPlanetAPI
- Timestamp:
- Feb 4, 2008, 11:25:38 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ossimPlanetAPI
v4 v5 430 430 '''ossimPlanet_setProjectionMatrixAsRowOrderedArray''' assumes a 4x4 array or 16 consecutive values. The values are stored row ordered. This means that the first 4 values are for the first row and the second four values are for the second row, ... etc. 431 431 432 {{{ 432 433 /** 433 434 * @param state The state to modify. … … 436 437 OSSIMPLANET_DLL void ossimPlanet_setProjectionMatrixAsRowOrderedArray(ossimPlanet_StatePtr state, 437 438 double* m); 439 }}} 438 440 439 441 '''ossimPlanet_setProjectionMatrix''' will set the projection matrix to the passed in values. Note m00 - m03 identifies the first row of the matrix, then the next is the second row, ... etc. 440 442 443 {{{ 441 444 /** 442 445 * @param state The state to modify the view orientation matrix. … … 464 467 double m20, double m21, double m22, double m23, 465 468 double m30, double m31, double m32, double m33); 469 }}} 466 470 467 471 468 472 '''ossimPlanet_setViewMatrixAsLlhHprRelativeTangent''' will allow one to pass in the lat, lon height and the euler angles to define the view matrix. The Euler angles are relative to the tangent plane at the given lat lon position. Note: this is for the camera and the Z-Axis is the plumb/Nadir axis. This means that a heading, pitch and roll of all zero degrees will have the eye looking straight down. Note: all lat lon values are assumed to be relative to the WGS84 ellipsoid. 469 473 474 {{{ 470 475 /** 471 476 * @param state The state to modify. … … 484 489 double pitch, 485 490 double roll); 491 }}} 486 492 487 493 '''ossimPlanet_setViewMatrixAsLlhHprAbsolute''' will allow one to pass in the lat, lon height and the euler angles to define the view matrix. The Euler angles are not relative to the tangent plane at the given lat lon position but instead the unit axis is used as the base for the camera and the Z-Axis is the plumb/Nadir axis. Note: all lat lon values are assumed to be relative to the WGS84 ellipsoid. 488 494 489 495 490 /**496 {{{ /** 491 497 * @param state The state to modify. 492 498 * @param lat The latitude of the view camera in degrees. … … 504 510 double pitch, 505 511 double roll); 506 512 }}} 513 507 514 '''ossimPlanet_setViewMatrixAsRowOrderedArray''' will set the matrix to the passed in row ordered array. 508 515 509 /**516 {{{ /** 510 517 * @param state The state to modify the view orientation matrix. 511 518 * @param m Row ordered view matrix. … … 514 521 const double *m); 515 522 523 }}} 516 524 517 525 '''ossimPlanet_setViewMatrix''' will set the matrix to the passed in values. Note m00 - m03 identifies the first row of the matrix, then the next is the second row, ... etc. 518 526 527 {{{ 519 528 /** 520 529 * … … 543 552 double m20, double m21, double m22, double m23, 544 553 double m30, double m31, double m32, double m33); 554 }}} 545 555 546 556 '''ossimPlanet_setViewport''' will allow you to set the viewport dimensions. 547 557 558 {{{ 548 559 /** 549 560 * @param state The state to modify the viewport definitions. … … 559 570 int w, 560 571 int h); 572 }}} 561 573 562 574 '''ossimPlanet_setViewportClearColor''' will clear the viewport with the passed in color. 563 575 576 {{{ 564 577 /** 565 578 * @param state The state information to modify the clear color. … … 574 587 float blue, 575 588 float alpha); 589 }}} 576 590 577 591 === Rendering Interface === … … 583 597 '''ossimPlanet_renderFrame''' is the main rendering step. This will render 1 frame. 584 598 599 {{{ 585 600 /** 586 601 * @param state The state to modify. … … 589 604 */ 590 605 OSSIMPLANET_DLL ossimPlanet_BOOL ossimPlanet_renderFrame(ossimPlanet_StatePtr state); 606 }}} 591 607 592 608 '''ossimPlanet_renderFramePreserveState''' is the main rendering step. This will render 1 frame and preserve the state. This will call osismPlanet_pushState before rendering and ossimPlanet_popState after rendering and will preserve gl attributes, View, Projection and Texture matrices. 593 609 610 {{{ 594 611 /** 595 612 * @param state The state to modify. … … 598 615 */ 599 616 OSSIMPLANET_DLL ossimPlanet_BOOL ossimPlanet_renderFramePreserveState(ossimPlanet_StatePtr state); 617 }}} 600 618 601 619 602 620 '''ossimPlanet_needsRendering''' is used determine if another frame is required to be rendered. Call this to determine if you need to call ossimPlanet_renderFrame. 603 621 622 {{{ 604 623 /** 605 624 * Example use: … … 615 634 */ 616 635 OSSIMPLANET_DLL ossimPlanet_BOOL ossimPlanet_needsRendering(ossimPlanet_StatePtr state); 636 }}} 617 637 618 638 === Layer interface === … … 621 641 '''ossimPlanet_addLayer''' adds a layer to planet. the layer type is used in the ossimPlanetLayerRegistry to construct a layer of the passed layerType. The receiverName is used to set the receiver name of the layer created so action messages can be routed to it. 622 642 643 {{{ 623 644 /** 624 645 * @param state The state to modify. … … 639 660 ossimPlanet_ConstStringType description, 640 661 ossimPlanet_ConstStringType receiverPathName); 662 }}} 641 663 642 664 '''ossimPlanet_getNumberOfLayers''' Allows one access to the number of layers currently defined for your state. 643 665 666 {{{ 644 667 /** 645 668 * @param state The state to use. … … 648 671 */ 649 672 OSSIMPLANET_DLL ossimPlanet_SizeType ossimPlanet_getNumberOfLayers(ossimPlanet_StatePtr state); 673 }}} 650 674 651 675 652 676 '''ossimPlanet_getIndexOfLayerGivenPtr''' Allows one to get the layer index of the passed in layer. 653 677 678 {{{ 654 679 /** 655 680 * @param state The state to use. … … 660 685 OSSIMPLANET_DLL ossimPlanet_IndexType ossimPlanet_getIndexOfLayerGivenPtr(ossimPlanet_StatePtr state, 661 686 ossimPlanet_LayerPtr layerPtr); 687 }}} 662 688 663 689 '''ossimPlanet_getLayerGivenIndex''' Allows one to get the layer pointer from the passed in index. 690 {{{ 664 691 /** 665 692 * @param state The state to use. … … 670 697 OSSIMPLANET_DLL ossimPlanet_LayerPtr ossimPlanet_getLayerGivenIndex(ossimPlanet_StatePtr state, 671 698 ossimPlanet_IndexType idx); 699 }}} 672 700 673 701 '''ossimPlanet_getLayerGivenId''' Will return the native layer pointer given the id 674 /** 702 {{{ 703 /** 675 704 * @param state The state to use. 676 705 * @param idThe id of the layer to search. … … 680 709 OSSIMPLANET_DLL ossimPlanet_LayerPtr ossimPlanet_getLayerGivenId(ossimPlanet_StatePtr state, 681 710 ossimPlanet_ConstStringType id); 711 }}} 682 712 683 713 '''ossimPlanet_getLayerName''' returns the layer name. 684 714 715 {{{ 685 716 /** 686 717 * @param state The state to use. … … 690 721 */ 691 722 OSSIMPLANET_DLL ossimPlanet_ConstStringType ossimPlanet_getLayerName(ossimPlanet_LayerPtr layer); 723 }}} 692 724 693 725 '''ossimPlanet_setLayerName''' allows one to set the layer name. 694 726 727 {{{ 695 728 /** 696 729 * @param layer The layer to set. … … 699 732 OSSIMPLANET_DLL void ossimPlanet_setLayerName(ossimPlanet_LayerPtr layer, 700 733 ossimPlanet_ConstStringType name); 734 }}} 701 735 702 736 '''ossimPlanet_getLayerId''' returns the layer id. 703 737 738 {{{ 704 739 /** 705 740 * @param state The state to use. … … 709 744 */ 710 745 OSSIMPLANET_DLL ossimPlanet_ConstStringType ossimPlanet_getLayerId(ossimPlanet_LayerPtr layer); 746 }}} 711 747 712 748 '''ossimPlanet_setLayerId''' Allows one to set the layer id. 713 749 750 {{{ 714 751 /** 715 752 * @param layer The layer to set. … … 718 755 OSSIMPLANET_DLL void ossimPlanet_setLayerId(ossimPlanet_LayerPtr layer, 719 756 ossimPlanet_ConstStringType id); 757 }}} 720 758 721 759 '''ossimPlanet_getLayerDescription''' returns the layer description. 722 760 761 {{{ 723 762 /** 724 763 * @param state The state to use. … … 728 767 */ 729 768 OSSIMPLANET_DLL ossimPlanet_ConstStringType ossimPlanet_getLayerDescription(ossimPlanet_LayerPtr layer); 769 }}} 730 770 731 771 '''ossimPlanet_setLayerDescription''' Allows one to set the layer description. 732 772 773 {{{ 733 774 /** 734 775 * @param layer The layer to set. … … 737 778 OSSIMPLANET_DLL void ossimPlanet_setLayerDescription(ossimPlanet_LayerPtr layer, 738 779 ossimPlanet_ConstStringType description); 780 }}} 739 781 740 782 '''ossimPlanet_getLayerReceverPathName''' Returns the layer's receiver path name 741 783 784 {{{ 742 785 /** 743 786 * @param state The state to use. … … 747 790 */ 748 791 OSSIMPLANET_DLL ossimPlanet_ConstStringType ossimPlanet_getLayerReceverPathName(ossimPlanet_LayerPtr layer); 792 }}} 749 793 750 794 '''ossimPlanet_setLayerReceiverPathName''' Allows one to change/set the layer receiver path name. 795 {{{ 751 796 /** 752 797 * @param layer The layer to set. … … 755 800 OSSIMPLANET_DLL void ossimPlanet_setLayerReceiverPathName(ossimPlanet_LayerPtr layer, 756 801 ossimPlanet_ConstStringType receiverPathName); 802 }}} 757 803 758 804 == Action / Router and Receiver Command Reference == … … 762 808 '''ossimPlanet_routeActionForm1''' This will use ossimPlanet's Action router to route the message to the destination. For example: lets say we have a receiver name as foo and we have an action called bar and it takes a single string as an argument then call ossimPlanet_routeActionForm1(":foo bar MySingleString"). This will route a action "bar" to the receiver "foo" and has 1 argument MySingleString. 763 809 810 {{{ 764 811 /** 765 812 * @param action 766 813 */ 767 814 OSSIMPLANET_DLL void ossimPlanet_routeActionForm1(ossimPlanet_ConstStringType completeAction); 815 }}} 768 816 769 817 770 818 '''ossimPlanet_routeActionForm2''' Is a utility call that is the same as ossimPlanet_routeActionForm1 but will do the concatenation of the target, action, and arg parameters into a single composite action. ossimPlanet_routeActionForm2(":foo", "bar", "MySingleString") will perform the same action as Form1 above. 819 {{{ 771 820 /** 772 821 * @param action … … 775 824 ossimPlanet_ConstStringType action, 776 825 ossimPlanet_ConstStringType arg); 826 }}} 777 827 778 828 '''ossimPlanet_postActionForm1''' will use ossimPlanet's Action router to route the message to the destination. The post call will instead add the action to a thread queue and route in the background without the caller having to wait for completion. This is equivalent to ossimPlanet_routeActionForm1 above but will instead just add to thread queue for later processing. 779 829 830 {{{ 780 831 /** 781 832 * @param action 782 833 */ 783 834 OSSIMPLANET_DLL void ossimPlanet_postActionForm1(ossimPlanet_ConstStringType completeAction); 835 }}} 784 836 785 837 '''ossimPlanet_postActionForm2''' will use ossimPlanet's Action router to route the message to the destination. The post call will instead add the action to a thread queue and route in the background without the caller having to wait for completion. This is equivalent to ossimPlanet_routeActionForm2 above but will instead just add to thread queue for later processing. 786 838 839 {{{ 787 840 /** 788 841 * @param target The target receiver path name. … … 793 846 ossimPlanet_ConstStringType action, 794 847 ossimPlanet_ConstStringType arg); 848 }}} 795 849 === ossimPlanetLand Receiver Commands === 796 850 797 851 '''add''' takes any number of arguments and can be of the form: 798 852 799 * {Image {Parent {Name <name>} {Id <id>}} {Name <name>} {Id <id>} {Description <description>} {Filename <file>}}853 * {Image {Parent {Name <name>} {Id <id>}} {Name <name>} {Id <id>} {Description <description>} {Filename <file>}} 800 854 This is the Image object definition and supplies all parameters for initialization. For the {Image ..} you can give it a name, Id and a description. The accessor in this example is a Filename type. Future accessor types will be given such as Wms. The {Parent ...} object is used to identify the Parent you wish to add the layer to If this is not specified then the root Layer of the reference set is used as the parent. You must call add {ImageGroup {...}} to create a group before adding to it any children This basically allows you to group Image types into a common group. Note, the name id and description are optional but if you want to later do a remove you might want to specify at least one or both name and id for the image being added. 801 * {ImageGroup {Parent {Name <name>} {Id <id>}} {Name <name>} {Id <id>} {Description <description>} }855 * {ImageGroup {Parent {Name <name>} {Id <id>}} {Name <name>} {Id <id>} {Description <description>} } 802 856 Allows one to create a group and give it a name id and description.<br> 803 857 <br> 804 858 '''remove''' takes any number of arguments and can be of the form: 805 *{Image {Name <name>} {Id <id>}}859 * {Image {Name <name>} {Id <id>}} 806 860 This form is used to also delete layers of type ImageGroup. For image groups you still use {Image and not {ImageGroup for the removal. 807 861