00001
00002
00003
00004
00005 #if !defined ( _SHIP_RESOURCE_H_ )
00006 #define _SHIP_RESOURCE_H_
00007
00008 #include <string>
00009 #include "../GLee.h"
00010 #include "IResource.h"
00011
00012 class Model;
00013 class Cargo;
00014
00015 class ShipResource: public IResource {
00016 public:
00017 ShipResource(std::string name, std::string modelFileName, std::string textureName, float scale, int damage, unsigned int cargoSize, float mass, float sailArea, float drag, float rudderArea, float distToRudder);
00018 ~ShipResource();
00019
00020 std::string GetType();
00021
00022 void Load();
00023 void Unload();
00024
00025 void Draw();
00026
00027 int GetMaxDamage();
00028
00029 unsigned int GetCargoSize();
00030
00031 float GetMass();
00032 float GetSailArea();
00033 float GetDrag();
00034 float GetRudderArea();
00035 float GetDistToRudder();
00036 float GetMassMomentInertia();
00037
00038 static const std::string s_type;
00039
00040 private:
00041
00042 std::string m_name;
00043
00044
00045 std::string m_modelFileName;
00046 std::string m_textureName;
00047
00048
00049 Model *m_model;
00050
00051
00052 float m_scale;
00053
00054
00055 int m_maxDamage;
00056
00057
00058 float m_mass;
00059
00060
00061 float m_sailArea;
00062
00063
00064 float m_drag;
00065
00066
00067 float m_rudderArea;
00068 float m_distToRudder;
00069 float m_massMomentInertia;
00070
00071
00072 unsigned int m_cargoSize;
00073
00074 void CalcMassMomentInertia();
00075 };
00076
00077 #endif