ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/xyz2pov/src/xyz2pov.c
(Generate patch)

Comparing trunk/xyz2pov/src/xyz2pov.c (file contents):
Revision 864 by gezelter, Tue Nov 18 17:04:25 2003 UTC vs.
Revision 1095 by mmeineke, Mon Apr 5 19:34:21 2004 UTC

# Line 1 | Line 1
1 + #define _FILE_OFFSET_BITS 64
2 +
3   #include <stdio.h>
4   #include <stdlib.h>
5   #include <string.h>
# Line 711 | Line 713 | int main(argc, argv)
713              "#declare cameraLookY = sysCenterY;\n"
714              "#declare cameraLookZ = sysCenterZ;\n"
715              "\n"
716 +            "#declare rotatePointX = cameraLookX;\n"
717 +            "#declare rotatePointY = cameraLookY;\n"
718 +            "#declare rotatePointZ = cameraLookZ;\n"
719 +            "\n"
720              "#declare cameraX = cameraLookX;\n"
721              "#declare cameraY = cameraLookY;\n"
722              "#declare cameraZ = cameraLookZ - zoom;\n"
# Line 810 | Line 816 | int main(argc, argv)
816              "  #local pHx = boxCenterX + bx1 + bx2 + bx3 - bcx;\n"
817              "  #local pHy = boxCenterY + by1 + by2 + by3 - bcy;\n"
818              "  #local pHz = boxCenterZ + bz1 + bz2 + bz3 - bcz;\n"
819 +            "\n"
820 +            "  #if(ROTATE)\n"
821 +            "    #local pAx_new = rotatePointX + A11 * (pAx-rotatePointX) + A12 * (pAy-rotatePointY) + A13 * (pAz-rotatePointZ);\n"
822 +            "    #local pAy_new = rotatePointY + A21 * (pAx-rotatePointX) + A22 * (pAy-rotatePointY) + A23 * (pAz-rotatePointZ);\n"
823 +            "    #local pAz_new = rotatePointZ + A31 * (pAx-rotatePointX) + A32 * (pAy-rotatePointY) + A33 * (pAz-rotatePointZ);\n"
824 +            "\n"
825 +            "    #local pBx_new = rotatePointX + A11 * (pBx-rotatePointX) + A12 * (pBy-rotatePointY) + A13 * (pBz-rotatePointZ);\n"
826 +            "    #local pBy_new = rotatePointY + A21 * (pBx-rotatePointX) + A22 * (pBy-rotatePointY) + A23 * (pBz-rotatePointZ);\n"
827 +            "    #local pBz_new = rotatePointZ + A31 * (pBx-rotatePointX) + A32 * (pBy-rotatePointY) + A33 * (pBz-rotatePointZ);\n"
828 +            "\n"
829 +            "    #local pCx_new = rotatePointX + A11 * (pCx-rotatePointX) + A12 * (pCy-rotatePointY) + A13 * (pCz-rotatePointZ);\n"
830 +            "    #local pCy_new = rotatePointY + A21 * (pCx-rotatePointX) + A22 * (pCy-rotatePointY) + A23 * (pCz-rotatePointZ);\n"
831 +            "    #local pCz_new = rotatePointZ + A31 * (pCx-rotatePointX) + A32 * (pCy-rotatePointY) + A33 * (pCz-rotatePointZ);\n"
832 +            "\n"
833 +            "    #local pDx_new = rotatePointX + A11 * (pDx-rotatePointX) + A12 * (pDy-rotatePointY) + A13 * (pDz-rotatePointZ);\n"
834 +            "    #local pDy_new = rotatePointY + A21 * (pDx-rotatePointX) + A22 * (pDy-rotatePointY) + A23 * (pDz-rotatePointZ);\n"
835 +            "    #local pDz_new = rotatePointZ + A31 * (pDx-rotatePointX) + A32 * (pDy-rotatePointY) + A33 * (pDz-rotatePointZ);\n"
836 +            "\n"
837 +            "    #local pEx_new = rotatePointX + A11 * (pEx-rotatePointX) + A12 * (pEy-rotatePointY) + A13 * (pEz-rotatePointZ);\n"
838 +            "    #local pEy_new = rotatePointY + A21 * (pEx-rotatePointX) + A22 * (pEy-rotatePointY) + A23 * (pEz-rotatePointZ);\n"
839 +            "    #local pEz_new = rotatePointZ + A31 * (pEx-rotatePointX) + A32 * (pEy-rotatePointY) + A33 * (pEz-rotatePointZ);\n"
840              "\n"
841 +            "    #local pFx_new = rotatePointX + A11 * (pFx-rotatePointX) + A12 * (pFy-rotatePointY) + A13 * (pFz-rotatePointZ);\n"
842 +            "    #local pFy_new = rotatePointY + A21 * (pFx-rotatePointX) + A22 * (pFy-rotatePointY) + A23 * (pFz-rotatePointZ);\n"
843 +            "    #local pFz_new = rotatePointZ + A31 * (pFx-rotatePointX) + A32 * (pFy-rotatePointY) + A33 * (pFz-rotatePointZ);\n"
844 +            "\n"
845 +            "    #local pGx_new = rotatePointX + A11 * (pGx-rotatePointX) + A12 * (pGy-rotatePointY) + A13 * (pGz-rotatePointZ);\n"
846 +            "    #local pGy_new = rotatePointY + A21 * (pGx-rotatePointX) + A22 * (pGy-rotatePointY) + A23 * (pGz-rotatePointZ);\n"
847 +            "    #local pGz_new = rotatePointZ + A31 * (pGx-rotatePointX) + A32 * (pGy-rotatePointY) + A33 * (pGz-rotatePointZ);\n"
848 +            "\n"
849 +            "    #local pHx_new = rotatePointX + A11 * (pHx-rotatePointX) + A12 * (pHy-rotatePointY) + A13 * (pHz-rotatePointZ);\n"
850 +            "    #local pHy_new = rotatePointY + A21 * (pHx-rotatePointX) + A22 * (pHy-rotatePointY) + A23 * (pHz-rotatePointZ);\n"
851 +            "    #local pHz_new = rotatePointZ + A31 * (pHx-rotatePointX) + A32 * (pHy-rotatePointY) + A33 * (pHz-rotatePointZ);\n"
852 +            "\n"
853 +            "  #else\n"
854 +            "    #local pAx_new = pAx;"
855 +            "    #local pAy_new = pAy;"
856 +            "    #local pAz_new = pAz;"
857 +            "\n"
858 +            "    #local pBx_new = pBx;"
859 +            "    #local pBy_new = pBy;"
860 +            "    #local pBz_new = pBz;"
861 +            "\n"
862 +            "    #local pCx_new = pCx;"
863 +            "    #local pCy_new = pCy;"
864 +            "    #local pCz_new = pCz;"
865 +            "\n"
866 +            "    #local pDx_new = pDx;"
867 +            "    #local pDy_new = pDy;"
868 +            "    #local pDz_new = pDz;"
869 +            "\n"
870 +            "    #local pEx_new = pEx;"
871 +            "    #local pEy_new = pEy;"
872 +            "    #local pEz_new = pEz;"
873 +            "\n"
874 +            "    #local pFx_new = pFx;"
875 +            "    #local pFy_new = pFy;"
876 +            "    #local pFz_new = pFz;"
877 +            "\n"
878 +            "    #local pGx_new = pGx;"
879 +            "    #local pGy_new = pGy;"
880 +            "    #local pGz_new = pGz;"
881 +            "\n"
882 +            "    #local pHx_new = pHx;"
883 +            "    #local pHy_new = pHy;"
884 +            "    #local pHz_new = pHz;"
885 +            "\n"
886 +            "  #end\n"
887 +            "  #local pAx = pAx_new;"
888 +            "  #local pAy = pAy_new;"
889 +            "  #local pAz = pAz_new;"
890 +            "\n"                    
891 +            "  #local pBx = pBx_new;"
892 +            "  #local pBy = pBy_new;"
893 +            "  #local pBz = pBz_new;"
894 +            "\n"                    
895 +            "  #local pCx = pCx_new;"
896 +            "  #local pCy = pCy_new;"
897 +            "  #local pCz = pCz_new;"
898 +            "\n"                    
899 +            "  #local pDx = pDx_new;"
900 +            "  #local pDy = pDy_new;"
901 +            "  #local pDz = pDz_new;"
902 +            "\n"                    
903 +            "  #local pEx = pEx_new;"
904 +            "  #local pEy = pEy_new;"
905 +            "  #local pEz = pEz_new;"
906 +            "\n"                    
907 +            "  #local pFx = pFx_new;"
908 +            "  #local pFy = pFy_new;"
909 +            "  #local pFz = pFz_new;"
910 +            "\n"                    
911 +            "  #local pGx = pGx_new;"
912 +            "  #local pGy = pGy_new;"
913 +            "  #local pGz = pGz_new;"
914 +            "\n"                    
915 +            "  #local pHx = pHx_new;"
916 +            "  #local pHy = pHy_new;"
917 +            "  #local pHz = pHz_new;"
918 +            "\n"
919              "  #local colorR = 0.90;\n"
920              "  #local colorG = 0.91;\n"
921              "  #local colorB = 0.98;\n"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines