#include "stdafx.h"
#include "Global.h"
#include "GameObject3D.h"
#include "PlayerCraft.h"

//#include <fstream>

// jet:
#ifndef USE_LIGHT_GRAPHICS                    // use simple models for faster loading during development
const float PlayerCraft::SCALE_FACTOR                          = 0.001f;      
const float PlayerCraft::CALIBRATION_ANGLE_PLAYER_X            = -180.0f;       // grund-rotation des models
const float PlayerCraft::CALIBRATION_ANGLE_PLAYER_Y            = 0.0f;         // grund-rotation des models
const float PlayerCraft::CALIBRATION_ANGLE_PLAYER_Z            = 90.0f;        // grund-rotation des models
const float PlayerCraft::MODIFICATOR_SHINIESS				   = 1.0f;
const float PlayerCraft::MODIFICATOR_SPECULAR_STRENGTH		   = 20.0f;
const D3DCOLOR PlayerCraft::MODIFIER_AMBIENT_LIGHT			   = D3DCOLOR_XRGB(100,100,100); // D3DCOLOR_XRGB(100,100,100);
#else

// airplane2.x:
const float PlayerCraft::SCALE_FACTOR                          = 1.0f;             // airplane2.x       
const float PlayerCraft::CALIBRATION_ANGLE_PLAYER_X            = 90.0f;       // grund-rotation des models
const float PlayerCraft::CALIBRATION_ANGLE_PLAYER_Y            = 180.0f;         // grund-rotation des models
const float PlayerCraft::CALIBRATION_ANGLE_PLAYER_Z            = 0.0f;        // grund-rotation des models
const float PlayerCraft::MODIFICATOR_SHINIESS				   = 1.0f;
const float PlayerCraft::MODIFICATOR_SPECULAR_STRENGTH		   = 1.0f;
const D3DCOLOR PlayerCraft::MODIFIER_AMBIENT_LIGHT			   = D3DCOLOR_XRGB(255,255,255);

#endif 

PlayerCraft::PlayerCraft(void)
{
    Initialize();    
}

PlayerCraft::~PlayerCraft(void)
{
}

PlayerCraft::PlayerCraft(LPCTSTR file, LPCTSTR path, float calibrationAngleX, float calibrationAngleY, float calibrationAngleZ): GameObject3D(file, path, calibrationAngleX, calibrationAngleY, calibrationAngleZ)
{
    Initialize();
}


void PlayerCraft::Initialize()
{
    m_ScaleFactorX = PlayerCraft::SCALE_FACTOR;
    m_ScaleFactorY = PlayerCraft::SCALE_FACTOR;
    m_ScaleFactorZ = PlayerCraft::SCALE_FACTOR;
    InitializeBoundingBoxByModel();
}
