1 \title{Surgical Strike The Language}
4 \documentclass[12pt]{article}
11 This document defines the syntax of Surgical Strike, a simple (non-Turing-complete) programming language for creating 3D graphics.
15 \subsection{incoming!}
19 This keyword must appear once and only once at the start of the program.
21 \subsection{camouflage}
23 \texttt{camouflage ``filename''}
25 Load the specified 3D model file to be inserted when ``deliver'' is called
27 In the current implementation, this can be any model format supported by OpenSceneGraph.
33 Add the current payload (the model loaded by ``load'' textured with the bitmap loaded by ``camouflage'') to the theater.
39 Pop the current transformation matrix from the save stack.
43 \texttt{codeword name}
45 Start defining a new codeword with the given name.
47 This name must be unique within the .strike file.
49 It must start with a letter from a-z, and can contain only letters from a-z and numbers from 0-9.
51 Codewords cannot contain definitions for other codewords, but may contain calls to them.
55 \texttt{payload ``filename''}
57 Load the specified 2D bitmap image file to be mapped on to the current model when ``deliver'' is called
59 In the current implementation, this can be any 2D bitmap format supported by OpenSceneGraph.
63 \texttt{manouver radius lambda phi}
65 radius is the radius from the current origin, in multiples of the (approximate) bounding sphere of the payload.
67 lambda is longitude around the current origin, in degrees.
69 phi is latitude around the current origin, in degrees.
75 Push the current transformation matrix onto the save stack.
81 x is added to rotation around the x axis.
83 y is added to rotation around the y axis.
85 z is added to rotation around the z axis.
91 x is added to the scale of units along the x axis.
93 y is added to the scale of units along the y axis.
95 z is added to the scale of units along the z axis.
101 Finish defining the codeword that began being defined with ``codeword''.
103 \section{Defining Codewords}
105 Codeword definitions have the following form:
114 This creates a codeword named ``klin'' that moves 45 degrees and then adds an instance of the current model to the theater.
116 \section{Executing Codewords}
118 Codeword invocations must have one of the following forms:
124 This will execute the previously defined codeword ``klin''.
130 This will execute the previously defined codeword ``klin'' 12 times.