class Cloud : public GModule

Class Cloud

Inheritance:


Public Methods

Cloud ()
Constructor
virtual void draw_graphics (void)
Set environmental drawing variables and calls main draw routine.
virtual void init_graphics (void)
If not already called, initialize menu.
virtual void kill_graphics (void)
If memory lock has been set, free it.
virtual void preinit_graphics (void)
Initialize memory lock for cloud.
virtual void update_graphics (void)
Look at each currently active wave and adjust particles according to values of current sounds

Private Methods

void feed_cloud (double prorate, double color_val, double rotate_val, double rotate_val2, double scale_val, double size_val, double x_val, double y_val, double z_val)
New sound parameters are gathered in update_graphics and then passed to feed_cloud where the corresponding graphical attributes are assigned to the cloud particles
void relax_cloud ()
If no waves are active, relax the cloud by spinning it down and blanking out the particles
void render_cloud (void)
For each particle in the cloud, render that particle
void render_particle (long i)
Draw an individual particle of the cloud
void set_center (double xval, double yval, double zval, int xflag, int yflag, int zflag)
Calculate and set the cloud's center
void set_color (double val, long i, int flag)
Calculate and set a particle's color
void set_importance (double val, int flag)
Calculate the number of particles to be affected by a particular change in sound
void set_particle_size (double val, long i, int flag)
Calculate and set the size of a particular particle
void set_rotate (double val, long i, int flag)
Calculate and set the x rotation for a particle
void set_rotate2 (double val, long i, int flag)
Calculate and set the y rotation for a particle
void set_scaling (double val, long i, int flag)
Calculate and set a particle's position in relation to the cloud's center

Inherited from GModule:


Documentation

Class Cloud. Class Cloud is a child of the class GModule. It is one of currently three graphical representations which maps sound parameters to visual parameters.
Cloud()
Constructor. Set up initial cloud. Assign default values to state variables.

virtual void preinit_graphics(void)
Initialize memory lock for cloud.

virtual void init_graphics(void)
If not already called, initialize menu.

virtual void draw_graphics(void)
Set environmental drawing variables and calls main draw routine.

virtual void update_graphics(void)
Look at each currently active wave and adjust particles according to values of current sounds

virtual void kill_graphics(void)
If memory lock has been set, free it.

void render_particle(long i)
Draw an individual particle of the cloud
Parameters:
i - Index for particle in the cloud (mass) to be drawn

void render_cloud(void)
For each particle in the cloud, render that particle. Called from draw_graphics.
See Also:
render_particle
draw_graphics

void feed_cloud(double prorate, double color_val, double rotate_val, double rotate_val2, double scale_val, double size_val, double x_val, double y_val, double z_val)
New sound parameters are gathered in update_graphics and then passed to feed_cloud where the corresponding graphical attributes are assigned to the cloud particles
Parameters:
prorate - Value to calculate which particles are affected.
color_val - Value to calculate particle color.
rotate_val - Value to calculate x axis rotation.
rotate_val2 - Value to calculate y axis rotaiton.
scale_val - Value to calculate cloud density.
size_val - Value to calculate partilcle size.
x_val - Value to calculate x coordinate.
y_val - Value to calculate y coordinate.
z_val - Value to calcualte z coordinate.
See Also:
update_graphics

void relax_cloud()
If no waves are active, relax the cloud by spinning it down and blanking out the particles. Called from feed_cloud.

void set_color(double val, long i, int flag)
Calculate and set a particle's color. Called from feed_cloud.
Parameters:
val - Value to set color
i - Index to particle
flag - True if color gets set with val. Otherwise use a default.
See Also:
feed_cloud

void set_center(double xval, double yval, double zval, int xflag, int yflag, int zflag)
Calculate and set the cloud's center. Called from feed_cloud.
Parameters:
xval - Value to calculate x coordinate.
yval - Value to calculate y coordinate.
zval - Value to calculate z coordinate.
xflag - True if xval will be used. Otherwise use a default.
yflag - True if yval will be used. Otherwise use a default.
zflag - True if zval will be used. Otherwise use a default.
See Also:
feed_cloud

void set_scaling(double val, long i, int flag)
Calculate and set a particle's position in relation to the cloud's center. Called from feed_cloud.
Parameters:
val - Value to calculate scale value.
i - Index to particle.
flag - True if val will be used. Otherwise use a default.
See Also:
feed_cloud

void set_importance(double val, int flag)
Calculate the number of particles to be affected by a particular change in sound. Called from feed_cloud.
Parameters:
val - Value to calculate importance.
flag - True if val will be used. Otherwise use a default.
See Also:
feed_cloud

void set_particle_size(double val, long i, int flag)
Calculate and set the size of a particular particle. Called from feed_cloud.
Parameters:
val - Value to calculate size.
i - Index to particle.
flag - True if val will be used. Otherwise use a default.
See Also:
feed_cloud

void set_rotate(double val, long i, int flag)
Calculate and set the x rotation for a particle. Called from feed_cloud.
Parameters:
val - Value to calculate rotation.
i - Index to particle.
flag - True if val will be used. Otherwise use a default.
See Also:
feed_cloud

void set_rotate2(double val, long i, int flag)
Calculate and set the y rotation for a particle. Called from feed_cloud.
Parameters:
val - Value to calculate rotation.
i - Index to particle.
flag - True if val will be used. Otherwise use a default.
See Also:
feed_cloud


This class has no child classes.

alphabetic index hierarchy of classes


M4cave Sound Visualization

Contacts

M4cave Reference Manual
Help With Doc++

generated by doc++