以下のような感じで良いのでしょうか?
//- 以下、テストコード ("SimpleModel.mqo"を使用) -//
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
{
const float rot_rate = DX_PI_F * 2.0f / 60.0f;
const float move_rate = 5.0f;
const float limit_rotx = DX_PI_F / 180.0f * 67.5f;
const float max_range = 2000.0f;
const float min_range = 800.0f;
ChangeWindowMode( TRUE );
SetWindowText( "DxLib:" DXLIB_VERSION_STR );
if ( DxLib_Init( ) == -1 ) return -1;
int white = GetColor( 255, 255, 255 );
int mh = MV1LoadModel( "SimpleModel.mqo" );
SetDrawScreen( DX_SCREEN_BACK );
float rotx = 0, roty = 0, range = min_range;
while ( ProcessMessage( ) == 0 && CheckHitKey( KEY_INPUT_ESCAPE ) == 0 ) {
ClearDrawScreen( );
if ( CheckHitKey( KEY_INPUT_UP ) ) rotx -= rot_rate;
if ( CheckHitKey( KEY_INPUT_DOWN ) ) rotx += rot_rate;
if ( CheckHitKey( KEY_INPUT_LEFT ) ) roty += rot_rate;
if ( CheckHitKey( KEY_INPUT_RIGHT ) ) roty -= rot_rate;
if ( CheckHitKey( KEY_INPUT_Z ) ) range -= move_rate;
if ( CheckHitKey( KEY_INPUT_X ) ) range += move_rate;
if ( rotx > limit_rotx ) rotx = limit_rotx;
if ( rotx < -limit_rotx ) rotx = -limit_rotx;
if ( range > max_range ) range = max_range;
if ( range < min_range ) range = min_range;
VECTOR tempvec = VTransform( VGet( 0, 0, range ), MMult( MGetRotX( rotx ), MGetRotY( roty ) ) );
SetCameraPositionAndTarget_UpVecY( tempvec, VGet( 0, 0, 0 ) );
DrawLine3D( VGet( 0.0f, 0.0f, 0.0f ), VGet( 1000.0f, 0.0f, 0.0f ), GetColor( 255, 0, 0 ) );
DrawLine3D( VGet( 0.0f, 0.0f, 0.0f ), VGet( 0.0f, 1000.0f, 0.0f ), GetColor( 0, 255, 0 ) );
DrawLine3D( VGet( 0.0f, 0.0f, 0.0f ), VGet( 0.0f, 0.0f, 1000.0f ), GetColor( 0, 0, 255 ) );
MV1DrawModel( mh );
ScreenFlip( );
}
DxLib_End( );
return 0;
}