Wind
Class : windBox.h
Made By : Craig
Uses : None (Physics)
Complexity : LOW
This effect is used by other classes to simulate wind.
Of the eight effects, the complexity of the windBox class is the lowest. However, this is not entirely intentional. The windbox was to be used on both the Snow and Rain classes, but because of the difference in the two, the windBox was used to only store box and wind values. Most calculations are done now in EffectMath and in each Snow and Rain class, increasing their complexity.
Wind boxes must be created prior to adding them to rain or snow boxes. They are initialized with :
windBox w = new windBox (vector3f position, vector3f dimension, vector3f velocity);
The constructor asks the user to supply a position and dimensions, using the box model, and a wind velocity. Wind is not drawn, but added to the Rain and Snow classes. This is done with
rain -> setWind(w) or snow -> setWind(w)
The velocity values are moderately sensitive, so values > 1 will yield fast-moving wind and generate a line-stretching in the rain.
Thoughts : This class yielded impressive results. The wind box used the approximation described earlier with regards to physics, and I beleive this effect is near-realistic.