2019-01-18 21:26:42 +01:00
|
|
|
#pragma once
|
2019-01-18 15:55:06 +01:00
|
|
|
#include "model.hpp"
|
2014-01-31 08:23:00 +13:00
|
|
|
|
2019-01-18 17:04:17 +01:00
|
|
|
class Q3BSPModel : public Model {
|
|
|
|
|
public:
|
2019-01-18 21:26:42 +01:00
|
|
|
Q3BSPModel(const std::string& f, float gamma_adj);
|
2019-01-18 17:04:17 +01:00
|
|
|
Q3BSPModel(const Q3BSPModel& m);
|
2014-01-31 08:23:00 +13:00
|
|
|
~Q3BSPModel();
|
|
|
|
|
|
|
|
|
|
//Entity interface
|
2019-01-18 17:04:17 +01:00
|
|
|
Entity* clone()
|
|
|
|
|
{
|
|
|
|
|
return new Q3BSPModel(*this);
|
|
|
|
|
}
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
//Object interface
|
2019-01-18 17:04:17 +01:00
|
|
|
virtual bool collide(const Line& line, float radius, Collision* curr_coll, const Transform& t);
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
//Model interface
|
2019-01-18 17:04:17 +01:00
|
|
|
Q3BSPModel* getBSPModel()
|
|
|
|
|
{
|
|
|
|
|
return this;
|
|
|
|
|
}
|
2014-01-31 08:23:00 +13:00
|
|
|
|
2019-01-18 17:04:17 +01:00
|
|
|
bool render(const RenderContext& rc);
|
2014-01-31 08:23:00 +13:00
|
|
|
|
2019-01-18 17:04:17 +01:00
|
|
|
void setAmbient(const Vector& t);
|
|
|
|
|
void setLighting(bool use_lmap);
|
2014-01-31 08:23:00 +13:00
|
|
|
|
2019-01-18 17:04:17 +01:00
|
|
|
bool isValid() const;
|
2014-01-31 08:23:00 +13:00
|
|
|
|
2019-01-18 17:04:17 +01:00
|
|
|
private:
|
2014-01-31 08:23:00 +13:00
|
|
|
struct Rep;
|
2019-01-18 17:04:17 +01:00
|
|
|
Rep* rep;
|
2014-01-31 08:23:00 +13:00
|
|
|
};
|