blob: 002aad6008efd5813e7a76b1a43ab0c77d3904d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
;;;; protocol.lisp
(in-package #:wheelwork)
(defgeneric boot (app)
(:documentation "Specialized for each subclass of
APPLICATION. Responsble for setting the app up once the system
resoruces are avaialble."))
(defgeneric shutdown (app)
(:documentation "Specialzied for each subclass of
APPLICATION. Called just before cleanup.")
(:method ((any t)) nil))
(defgeneric cleanup (thing)
(:documentation "Clean up applications, textures, and other foreign
resources. Called after shutodown.")
(:method ((any t)) nil))
(defgeneric drop-unit (unit)
(:documentation "Removes a unit from a container."))
(defgeneric add-unit (container unit)
(:documentation "Adds a unit to a container, removing it from its
current container first, if necessary."))
(defgeneric render (thing)
(:documentation "Renders thing for visual display."))
(defgeneric model-matrix (thing)
(:documentation "Returns the model matrix for THING, representing
its position, scale, and orientation in the scene"))
(defgeneric ensure-loaded (asset)
(:documentation "Ensures that the asset is loaded into memory and
ready for use. Returns the asset."))
(defgeneric width (thing)
(:documentation "Returns the effective width, in screen coordinates, of the object in question"))
(defgeneric (setf width) (new-width thing)
(:documentation "Sets the effective width of thing to new-width."))
(defgeneric height (thing)
(:documentation "Returns effective height, in screen coordinates, of the object in question."))
(defgeneric (setf height) (new-height thing)
(:documentation "sets the effective height of thing to new-height"))
(defgeneric rotation (thing)
(:documentation "Rotational angle of thing in radians about its center."))
(defgeneric (setf rotation) (newval thing))
(defgeneric x (thing)
(:documentation "X position of the bottom left corner in scaled coordinates"))
(defgeneric (setf x) (newval thing))
(defgeneric y (thing)
(:documentation "Y position of bottom left corner in scaled coordinates"))
(defgeneric (setf y) (newval thing))
(defgeneric scale-x (thing)
(:documentation "Horizontal scale factor"))
(defgeneric (setf scale-x) (newvval thing))
(defgeneric scale-y (thing)
(:documentation "Vertical Scale Vactor"))
(defgeneric (setf scale-y) (newval thing))
(defgeneric get-rect (affine)
(:documentation "Returns a list of vectors representing the path of
the smallest rectangle that encloses the affine-unit. The rectangle
is scaled and rotated. These vectors have been made using 3D-VECTORS:VEC"))
|