More About GameDev-VMK012-Jump.

- I think we should extend the interface of Camera class with these setters:

`class Camera {`

...

public:

void SetX(float x) { m_position.x = x; }

void SetY(float y) { m_position.y = -y; }

void SetZ(float z) { m_position.z = z; }

...

};

SetY() is especially heavily used. I appreciate the code

**Set( GetX(), newY, GetZ() )** in Player() but simple

**SetY( newY )** is just better.

- Here is the initialization of "m_fJumpK" member in Player::Jump( ) :

**m_jumpK = 4.0F * m_jumpHeight / ( m_jumpLen * m_jumpLen );**and the use in Player::Update( float time ) :

**Set(GetX(), â€“m_jumpK * x0 * x0 + m_jumpY0, GetZ());**Obviously we can move a negation (

â€“) to the initialization stage:

**m_jumpK = â€“4.0F * m_jumpHeight / ( m_jumpLen * m_jumpLen );**Then the use is:

**Set(GetX(), m_jumpK * x0 * x0 + m_jumpY0, GetZ());**Not too much, only one float-point negation, but though.

Additionally, combining with newlly added SetY() weâ€™ve got:

` const float x0 = time - m_jumpX0;`

SetY( m_jumpK * x0 * x0 + m_jumpY0 );

That's all. Just for fun, I've deduced the coefficients of jumping trajectory, or more exactly OY-projection function, from generic quadric equation { a*x^2 + b*x + c }, trying to optimize something. I've figured out that what we have in GameEndgine is the most optimal, since any displacement of parabola along 0X-axe or rising it (both to get rid of some extra calculations), inevitably emit additional linear term, which means one extra multiplication during the cycle.