19 _z_near( 0.2 ), _z_far( 40.0 ),
20 _vert_fov( 70 ), _horiz_fov( 70 ),
44 glMatrixMode (GL_MODELVIEW);
47 glRotatef( -
_pitch, 1.0, 0.0, 0.0 );
48 glRotatef( -
_yaw, 0.0, 0.0, 1.0 );
50 glTranslatef( -
_x, -
_y, -
_z );
58 glMatrixMode (GL_PROJECTION);
71 glMatrixMode (GL_MODELVIEW);
112 glMatrixMode (GL_MODELVIEW);
115 glRotatef( -
_pitch, 1.0, 0.0, 0.0 );
116 glRotatef( -
_yaw, 0.0, 0.0, 1.0 );
118 glTranslatef( -
_x, -
_y, 0.0 );
125 glMatrixMode (GL_PROJECTION);
128 glOrtho( -_pixels_width/2.0 / _scale, _pixels_width/2.0 / _scale,
129 -_pixels_height/2.0 / _scale, _pixels_height/2.0 / _scale,
130 _y_min * _scale * 2, _y_max * _scale * 2 );
132 glMatrixMode (GL_MODELVIEW);
137 _pixels_width = pixels_width;
138 _pixels_height = pixels_height;
160 _x += cos( yaw ) *
x;
161 _y += -sin( yaw ) *
x;
163 _x += sin( yaw ) *
y;
164 _y += cos( yaw ) *
y;
170 double to_scale = -
scale;
171 const double old_scale = _scale;
174 double factor = 1.0 + fabs( to_scale ) / 25;
177 else if( factor > 2.5 )
181 shift_x = shift_x / w - 0.5;
182 shift_y = shift_y / h - 0.5;
185 shift_x *= factor - 1.0;
186 shift_y *= factor - 1.0;
191 move( shift_x * w, - shift_y * h );
200 move( - shift_x * w / old_scale * _scale,
201 shift_y * h / old_scale * _scale );
void Save(Worldfile *wf, int sec)
The Stage library uses its own namespace.
virtual void SetProjection(void) const
void Load(Worldfile *wf, int sec)
void forward(double amount)
int ReadTuple(const int entity, const char *name, const unsigned int first, const unsigned int num, const char *format,...)
void Save(Worldfile *wf, int sec)
void WriteTuple(const int entity, const char *name, const unsigned int first, const unsigned int count, const char *format,...)
virtual void Draw() const
void WriteFloat(int entity, const char *name, double value)
virtual void SetProjection(void) const
void strafe(double amount)
double ReadFloat(int entity, const char *name, double value)
void Load(Worldfile *wf, int sec)
virtual void Draw(void) const
void setPitch(double pitch)
void move(double x, double y, double z)
void move(double x, double y)