ผลต่างระหว่างรุ่นของ "RDHR Project"
ไปยังการนำทาง
ไปยังการค้นหา
Cardcaptor (คุย | มีส่วนร่วม) (สร้างหน้าใหม่: == Grammar for Scene Description Language ==) |
Cardcaptor (คุย | มีส่วนร่วม) |
||
| แถว 1: | แถว 1: | ||
== Grammar for Scene Description Language == | == 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> | ||
| + | } | ||
รุ่นแก้ไขเมื่อ 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>
}