ผลต่างระหว่างรุ่นของ "RDHR Project"

จาก Theory Wiki
ไปยังการนำทาง ไปยังการค้นหา
แถว 1: แถว 1:
 
== Grammar for Scene Description Language ==
 
== Grammar for Scene Description Language ==
 
  <scene> ::= <camera> <colors> <lights> <objects>
 
  <scene> ::= <camera> <colors> <lights> <objects>
+
 
 
  <camera> ::= camera {  
 
  <camera> ::= camera {  
 
                 eye <three-floats>
 
                 eye <three-floats>
แถว 8: แถว 8:
 
                 fov <float>
 
                 fov <float>
 
               }
 
               }
 
+
 
  <colors> ::= colors {
 
  <colors> ::= colors {
 
               <color-binding-list>
 
               <color-binding-list>
 
             }
 
             }
 
+
 
  <color-binding-list> ::= <color-name> = <rgb> <color-binding-list> |
 
  <color-binding-list> ::= <color-name> = <rgb> <color-binding-list> |
 
                           __empty-string__
 
                           __empty-string__
 
+
 
  <color-name> ::= $<name>
 
  <color-name> ::= $<name>
 
+
 
  <lights> ::= lights {
 
  <lights> ::= lights {
 
                 <light-binding-list>
 
                 <light-binding-list>
 
               }
 
               }
 
+
 
  <light-binding-list> ::= <light-name> = <light-specification> <light-binding-list> |
 
  <light-binding-list> ::= <light-name> = <light-specification> <light-binding-list> |
 
                           __empty-string__
 
                           __empty-string__
 
+
 
  <light-name> ::= @<name>
 
  <light-name> ::= @<name>
 
   
 
   
 
  <light-specification> ::= <diffuse-light>
 
  <light-specification> ::= <diffuse-light>
 
+
 
  <light> ::= <light-name> | <light-specification> | no_emission
 
  <light> ::= <light-name> | <light-specification> | no_emission
 
+
 
  <diffuse-light> ::= diffuse_light {
 
  <diffuse-light> ::= diffuse_light {
 
                       <color>
 
                       <color>
 
                     }
 
                     }
 
+
 
  <color> ::= <color-name> | <rgb>
 
  <color> ::= <color-name> | <rgb>
 
+
 
  <rgb> ::= rgb <three-floats>
 
  <rgb> ::= rgb <three-floats>
 
+
 
  <three-floats> ::= <float> <float> <float>
 
  <three-floats> ::= <float> <float> <float>
 
+
 
  <objects> ::= <object> <objects> |
 
  <objects> ::= <object> <objects> |
 
               __empty-string__
 
               __empty-string__
แถว 51: แถว 51:
 
               <light>
 
               <light>
 
             }
 
             }
 
+
 
  <triangle> ::= triangle {
 
  <triangle> ::= triangle {
 
                   <three-floats>
 
                   <three-floats>
แถว 59: แถว 59:
 
                   <light>
 
                   <light>
 
                 }
 
                 }
 
+
 
  <transform> ::= transform {
 
  <transform> ::= transform {
 
                   <transform-list>
 
                   <transform-list>
 
                   <objects>
 
                   <objects>
 
                 }
 
                 }
 
+
 
  <transform-list> ::= <one-transform> <transform-list> |
 
  <transform-list> ::= <one-transform> <transform-list> |
 
                       __empty-string__
 
                       __empty-string__
แถว 81: แถว 81:
 
                     scale_z <float>  
 
                     scale_z <float>  
 
                     <matrix>
 
                     <matrix>
 
+
 
  <matrix> ::= matrix {
 
  <matrix> ::= matrix {
 
                 <sixteen-floats>
 
                 <sixteen-floats>
 
               }
 
               }

รุ่นแก้ไขเมื่อ 06:32, 1 กุมภาพันธ์ 2551

Grammar for Scene Description Language

<scene> ::= <camera> <colors> <lights> <objects>
 
<camera> ::= camera { 
               eye <three-floats>
               at <three-floats>
               up <three-floats>
               fov <float>
             }

<colors> ::= colors {
              <color-binding-list>
            }

<color-binding-list> ::= <color-name> = <rgb> <color-binding-list> |
                         __empty-string__

<color-name> ::= $<name>

<lights> ::= lights {
               <light-binding-list>
             }

<light-binding-list> ::= <light-name> = <light-specification> <light-binding-list> |
                         __empty-string__

<light-name> ::= @<name>

<light-specification> ::= <diffuse-light>

<light> ::= <light-name> | <light-specification> | no_emission

<diffuse-light> ::= diffuse_light {
                      <color>
                    }

<color> ::= <color-name> | <rgb>

<rgb> ::= rgb <three-floats>

<three-floats> ::= <float> <float> <float>

<objects> ::= <object> <objects> |
              __empty-string__

<object> ::= <mesh> | <triangle> | <transform>

<mesh> ::= mesh {
             file <quoted-string>
             <color>
             <light>
           }

<triangle> ::= triangle {
                 <three-floats>
                 <three-floats>
                 <three-floats>
                 <color>
                 <light>
               }

<transform> ::= transform {
                  <transform-list>
                  <objects>
                }

<transform-list> ::= <one-transform> <transform-list> |
                     __empty-string__

<one-transform> ::= translate <three-floats> |
                    translate_x <float> |
                    translate_y <float> |
                    translate_z <float> |
                    rotate <three-floats> <float> |
                    rotate_x <float> |
                    rotate_y <float> |
                    rotate_z <float> |
                    scale <three-floats> |
                    scale_x <float> |
                    scale_y <float> |
                    scale_z <float> 
                    <matrix>

<matrix> ::= matrix {
               <sixteen-floats>
             }