]> gitweb.factorcode.org Git - factor.git/blob - extra/game/models/obj/obj-docs.factor
factor: clean up whitespace in -docs files
[factor.git] / extra / game / models / obj / obj-docs.factor
1 ! Copyright (C) 2010 Erik Charlebois
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs game.models.obj.private help.markup help.syntax
4 io.pathnames kernel sequences strings ;
5 IN: game.models.obj
6
7 ABOUT: "game.models.obj"
8
9 ARTICLE: "game.models.obj" "Conversion of Wavefront OBJ assets"
10 "The " { $vocab-link "game.models.obj" } " vocabulary implements words for converting Wavefront OBJ assets to data suitable for use with OpenGL." ;
11
12 HELP: material
13 { $class-description "Tuple describing the GPU state that needs to be applied prior to rendering geometry tagged with this material." } ;
14
15 HELP: cm
16 { $values { "current-material" material } }
17 { $description "Convenience word for accessing the current material while parsing primitives." } ;
18
19 HELP: md
20 { $values { "material-dictionary" assoc } }
21 { $description "Convenience word for accessing the material dictionary while parsing primitives. " } ;
22
23 HELP: strings>numbers
24 { $values { "strings" sequence } { "numbers" sequence } }
25 { $description "Convert a sequence of strings to a sequence of numbers." } ;
26
27 HELP: strings>faces
28 { $values { "strings" sequence } { "faces" sequence } }
29 { $description "Convert a sequence of '/'-delimited strings into a sequence of sequences of numbers. Each number is an index into the vertex, texture or normal tables, respectively." } ;
30
31 HELP: split-string
32 { $values { "string" string } { "strings" sequence } }
33 { $description "Split the given string on whitespace." } ;
34
35 HELP: line>mtl
36 { $values { "line" string } }
37 { $description "Process a line from a material file within the current parsing context." } ;
38
39 HELP: read-mtl
40 { $values { "file" pathname } { "material-dictionary" assoc } }
41 { $description "Read the specified material file and generate a material dictionary keyed by material name." } ;
42
43 HELP: obj-vertex-format
44 { $class-description "Vertex format used for rendering OBJ geometry." } ;
45
46 HELP: triangle>aos
47 { $values { "x" sequence } { "y" sequence } }
48 { $description "Convert a sequence of vertex, texture and normal indices into a sequence of vertex, texture and normal values." } ;
49
50 HELP: quad>aos
51 { $values { "x" sequence } { "y" sequence } { "z" sequence } }
52 { $description "Convert a sequence of vertex, texture and normal indices into two sequences of vertex, texture and normal values. This splits a quad into two triangles." } ;
53
54 HELP: face>aos
55 { $values { "x" sequence } { "y" sequence } }
56 { $description "Convert a face line to a sequence of vertex attributes." } ;
57
58 HELP: push*
59 { $values { "elt" object } { "seq" sequence } }
60 { $description "Push the value onto the sequence, keeping the sequence on the stack." } ;
61
62 HELP: push-current-model
63 { $description "Push the current model being built onto the models list and initialize a fresh empty model." } ;
64
65 HELP: line>obj
66 { $values { "line" string } }
67 { $description "Process a line from the object file within the current parsing context." } ;