1 /* StonerView: An eccentric visual toy.
2 Copyright 1998-2001 by Andrew Plotkin (erkyrath@eblong.com)
4 Permission to use, copy, modify, distribute, and sell this software and its
5 documentation for any purpose is hereby granted without fee, provided that
6 the above copyright notice appear in all copies and that both that
7 copyright notice and this permission notice appear in supporting
8 documentation. No representations are made about the suitability of this
9 software for any purpose. It is provided "as is" without express or
13 #ifndef __STONERVIEW_H__
14 # define __STONERVIEW_H__
17 # include <OpenGL/gl.h>
22 typedef struct stonerview_state stonerview_state;
24 #include "stonerview-osc.h"
25 #include "stonerview-move.h"
27 struct stonerview_state {
31 /* The list of polygons. This is filled in by move_increment(), and rendered
32 by perform_render(). */
36 /* A linked list of all osc_t objects created. New objects are added
37 to the end of the list, not the beginning. */
41 /* The polygons are controlled by four parameters. Each is represented by
42 an osc_t object, which is just something that returns a stream of numbers.
43 (Originally the name stood for "oscillator", but it does ever so much more
45 Imagine a cylinder with a vertical axis (along the Z axis), stretching
46 from Z=1 to Z=-1, and a radius of 1.
48 osc_t *theta; /* Angle around the axis. This is expressed in
49 hundredths of a degree, so it's actually 0 to 36000. */
50 osc_t *rad; /* Distance from the axis. This goes up to 1000,
51 but we actually allow negative distances -- that just
52 goes to the opposite side of the circle -- so the range
53 is really -1000 to 1000. */
54 osc_t *alti; /* Height (Z position). This goes from -1000 to 1000. */
55 osc_t *color; /* Consider this to be an angle of a circle going
56 around the color wheel. It's in tenths of a degree
57 (consistency is all I ask) so it ranges from 0 to 3600. */
60 #endif /* __STONERVIEW_H__ */