home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / demos / gpc / objects / box.vrb next >
Encoding:
Text File  |  1991-02-13  |  3.5 KB  |  170 lines

  1. % @(#) box.vrb,v 1.1 90/06/12 16:45:08 howards Exp  %
  2.  
  3. %
  4. Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
  5.  
  6.                         All Rights Reserved
  7.  
  8. Permission to use, copy, modify, and distribute this software and its
  9. documentation for any purpose and without fee is hereby granted,
  10. provided that the above copyright notice appear in all copies and that
  11. both that copyright notice and this permission notice appear in
  12. supporting documentation, and that the names of Sun Microsystems,
  13. the X Consortium, and MIT not be used in advertising or publicity
  14. pertaining to distribution of the software without specific, written
  15. prior permission.
  16.  
  17. SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  18. INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
  19. SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
  20. DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  21. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  22. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  23. SOFTWARE.
  24. %
  25. read_geometry_file "cube.geo";
  26.  
  27. view_orientation3
  28. 1         % Store View Orientation matrix here     %
  29. 0 0 0     % View Reference Point (WC)             %
  30. 1 1 1     % View Plane Normal (WC)                 %
  31. 0 1 0     % View Up vector (WC)                     %
  32. ;
  33.  
  34. view_mapping3
  35. 2                % Store View Mapping matrix here    %
  36. -20 20 -20 20     % View Window in VRC                %
  37. perspective        % Projection type                    %
  38. 0 0 1000        % Projection Reference Point in VRC %
  39. 40                % Front Clipping Location (VRC)        %
  40. -40                % Back Clipping Location (VRC)        %
  41. ;
  42.  
  43. define_view_specification
  44. 1                % View Table entry ID                    %
  45. 1                % ID of stored view orientation matrix    %
  46. 2                % ID of stored view mapping matrix        %
  47. xy_clip         % Disable XY Clipping                    %
  48. front_clip         % Disable Front Clipping                %
  49. back_clip        % Disable Back Clipping                    %
  50. 0 1                % X extrema of view area                %
  51. 0 1                % Y extrema of view area                %
  52. ;
  53.  
  54. identity3 11;
  55.  
  56. rotate_xyz3 
  57. 21     % Target matrix table ID %
  58. 1     % X axis rotation in degrees %
  59. 0     % Y axis rotation in degrees %
  60. 0     % Z axis rotation in degrees %
  61. replace
  62. ;
  63.  
  64. rotate_xyz3 
  65. 22     % Target matrix table ID %
  66. 0     % X axis rotation in degrees %
  67. 1     % Y axis rotation in degrees %
  68. 0     % Z axis rotation in degrees %
  69. replace
  70. ;
  71.  
  72. rotate_xyz3 
  73. 23     % Target matrix table ID %
  74. 0     % X axis rotation in degrees %
  75. 0     % Y axis rotation in degrees %
  76. 1     % Z axis rotation in degrees %
  77. replace
  78. ;
  79.  
  80. rotate_xyz3 
  81. 24     % Target matrix table ID %
  82. 1     % X axis rotation in degrees %
  83. 1     % Y axis rotation in degrees %
  84. 1     % Z axis rotation in degrees %
  85. replace
  86. ;
  87.  
  88. scale3
  89. 31    % Target matrix table ID    %
  90. .5
  91. .5
  92. .5
  93. replace
  94. ;
  95.  
  96. scale3
  97. 32    % Target matrix table ID    %
  98. 2
  99. 2
  100. 2
  101. replace
  102. ;
  103. hlhs_removal hlhs_enable;
  104. %%
  105. %%
  106. begin_test 360;
  107.     active_view 1;
  108.     apply_to_global3 11;
  109.     execute_structure 1;
  110.  
  111.     concat_matrix3 21 11 preconcat; 
  112. end_test;
  113. %%
  114. %%
  115. begin_test 360;
  116.     active_view 1;
  117.     apply_to_global3 11;
  118.     execute_structure 1;
  119.  
  120.     concat_matrix3 22 11 preconcat; 
  121. end_test;
  122. %%
  123. %%
  124. begin_test 360;
  125.     active_view 1;
  126.     apply_to_global3 11;
  127.     execute_structure 1;
  128.  
  129.     concat_matrix3 23 11 preconcat; 
  130. end_test;
  131. %%
  132. %%
  133. begin_test 360;
  134.     active_view 1;
  135.     apply_to_global3 11;
  136.     execute_structure 1;
  137.  
  138.     concat_matrix3 24 11 preconcat; 
  139. end_test;
  140. %%
  141. %%
  142. begin_test 16;
  143.     active_view 1;
  144.     apply_to_global3 11;
  145.     execute_structure 1;
  146.  
  147.     concat_matrix3 31 11 preconcat; 
  148. end_test;
  149. %%
  150. %%
  151. begin_test 16;
  152.     active_view 1;
  153.     apply_to_global3 11;
  154.     execute_structure 1;
  155.  
  156.     concat_matrix3 32 11 preconcat; 
  157. end_test;
  158. %%
  159. %%
  160. %%
  161. interior_style solid;
  162.  
  163. begin_test 360;
  164.     active_view 1;
  165.     apply_to_global3 11;
  166.     execute_structure 1;
  167.  
  168.     concat_matrix3 21 11 preconcat; 
  169. end_test;
  170.