Game Development Reference
In-Depth Information
12. Add the trajectory control points for each base curve:
Curve FBaseCurve[4];
};
13. The following are the parameters for the guiding curves. The number of screen units
(in normalized coordinates) between the sequential control points:
const float c_PointStep = 0.2f;
14. The empirical tweaking parameter for the quad points, speed:
const float c_ControlExp = 0.001f;
15. The height of the image, which means the distance between the lower and upper
curves, thickness, and slope of the curve:
const float c_Height = 4.0f
const float c_Elevation = 2.0f;
const float c_Slope = 0.3f;
16. The symmetric displacement of curve peaks, exponential falloff, and main coeficient:
const float c_PeakOffset = 3.0f;
const float c_FlowExp = 0.01f;
const float c_FlowMult = 4.0f;
17. The clFlowFlinger class holds the dynamic state of the selector:
class clFlowFlinger: public iObject
{
public:
clFlowFlinger()
: FPressed( false ), FValue( 0.0f ), FVelocity( 0.0f ) {}
virtual ~clFlowFlinger() {}
18. Decide what to do on the selection—return true if the selection is complete, or
false otherwise:
virtual bool HandleSelection( float mx, float my )
{ return false; }
19. Update the animation and handle touches:
void Update( float DeltaTime );
void OnTouch( bool KeyState );
…
};
 
Search WWH ::




Custom Search