The SMovementInfo structure

SMovementInfo structure holds information such as movement speed, rotation speed and few other items related to view/object movement controlled from the keyboard. By providing your own SMovementInfo structure to the COpenGL::SetMovementInfo method, you can customize speed of pan and rotation controlled by keyboard.

The SMovementInfo structure is declared as follows:

typedef struct
{
  float  PanSpeed[ 3 ];
  float  RotateSpeed[ 3 ];
  float  SpeedUpFactor;
  float  SlowDownFactor;
  // ClassGL is filling the values below ...
  float  PanVector[ 3 ];
  float  RotateVector[ 3 ];
} SMovementInfo;
PanSpeed

Specifies pan speed vector. This speed vector is applied to pan vector while panning scene or object using keyboard. Default value is { 1.0f, 1.0f, 1.0f }.

RotateSpeed Specifies rotate speed vector. This speed vector is applied to rotate vector while rotating scene or object using keyboard. Default value is { 22.5f, 22.5f, 22.5f }.
SpeedUpFactor

Specifies speed up factor which is applied to pan or rotation when SpeedUpModifierKey key specified by SControlInfo structure is down. Default value is 5.0f.

SlowDownFactor

Specifies slow down factor which is applied to pan or rotation when SlowDownModifierKey key specified by SControlInfo structure is down. Default value is 5.0f.

PanVector

It is not recommended to use this item. ClassGL puts here information about pressed down pan keys in form of 1.0f “flags”. This represents current pan direction vector on which the PanSpeed and frame speed (in animation mode) will be applied. Default value is { 0.0f, 0.0f, 0.0f }

RotateVector

It is not recommended to use this item. ClassGL puts here information about pressed down rotate keys in form of 1.0f “flags”. This represents current rotation vector on which the RotateSpeed and frame speed (in animation mode) will be applied. Default value is { 0.0f, 0.0f, 0.0f }.

In animation mode, the PanSpeed and RotateSpeed item of this structure represent speed in the current OpenGL units per second, which will be applied on PanVector and RotateVector of this structure. The PanVector and RotateVector items are set internally by ClassGL reflecting key strokes from the current Control Info settings.

Teoretically it is possible to disable ClassGL’s controlling of the panning and rotation through keyboard by setting control info of the COpenGL object to NULL, and to set PanVector and RotateVector yourself. By this way you can control scene (or selected object) panning and rotation through these variables and let ClassGL do the panning and rotation during DrawBegin call (in animation mode). However the recommended way is to implement such custom navigation control through user (yourself) defined structures and to use LookAt, SetEyePoint or other navigation method of the COpenGL object to navigate through scene or move objects.