blast.obj

来自「Developing Games in Java 源代码」· OBJ 代码 · 共 37 行

OBJ
37
字号
# OBJ - Wavefront object file
# The javagamebook loader only understands these commands:
#   mtllib <filename>    - Load materials from an external .mtl
#                          file.
#   v <x> <y> <z>        - Define a vertex with floating-point
#                          coords (x,y,z).
#   f <v1> <v2> <v3> ... - Define a new face. a face is a flat,
#                          convex polygon with vertices in
#                          counter-clockwise order. Positive
#                          numbers indicate the index of the
#                          vertex that is defined in the file.
#                          Negative numbers indicate the vertex
#                          defined relative to last vertex read.
#                          For example, 1 indicates the first
#                          vertex in the file, -1 means the last
#                          vertex read, and -2 is the vertex
#                          before that.
#   g <name>             - Define a new group by name. The faces
#                          following are added to this group.
#   usemtl <name>        - Use the named material (loaded from a
#                          .mtl file) for the faces in this group.

# load materials
mtllib textures.mtl

# a simple pyramid
v  -6 -4 -4
v  6 -4 -4
v  0 -4 7
v  0 6 0

g blast
usemtl green
f 1 2 3
f 1 3 4
f 1 4 2
f 3 2 4

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?