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__
18 #endif /* HAVE_CONFIG_H */
26 #endif /* HAVE_JWZGLES */
28 typedef struct stonerview_state stonerview_state;
30 #include "stonerview-osc.h"
31 #include "stonerview-move.h"
33 struct stonerview_state {
38 /* The list of polygons. This is filled in by move_increment(), and rendered
39 by perform_render(). */
41 stonerview_elem_t *elist;
43 /* A linked list of all osc_t objects created. New objects are added
44 to the end of the list, not the beginning. */
48 /* The polygons are controlled by four parameters. Each is represented by
49 an osc_t object, which is just something that returns a stream of numbers.
50 (Originally the name stood for "oscillator", but it does ever so much more
52 Imagine a cylinder with a vertical axis (along the Z axis), stretching
53 from Z=1 to Z=-1, and a radius of 1.
55 osc_t *theta; /* Angle around the axis. This is expressed in
56 hundredths of a degree, so it's actually 0 to 36000. */
57 osc_t *rad; /* Distance from the axis. This goes up to 1000,
58 but we actually allow negative distances -- that just
59 goes to the opposite side of the circle -- so the range
60 is really -1000 to 1000. */
61 osc_t *alti; /* Height (Z position). This goes from -1000 to 1000. */
62 osc_t *color; /* Consider this to be an angle of a circle going
63 around the color wheel. It's in tenths of a degree
64 (consistency is all I ask) so it ranges from 0 to 3600. */
67 #endif /* __STONERVIEW_H__ */