2010-06-03 20:44:55 +02:00
|
|
|
#ifndef _GAME_RENDER_CELL_H
|
|
|
|
#define _GAME_RENDER_CELL_H
|
|
|
|
|
2010-06-12 13:34:15 +02:00
|
|
|
#include <string>
|
2010-06-09 20:46:14 +02:00
|
|
|
|
2010-06-12 13:34:15 +02:00
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
class CellRef;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace ESMS
|
|
|
|
{
|
|
|
|
class CellStore;
|
|
|
|
}
|
2010-06-03 20:44:55 +02:00
|
|
|
|
2010-06-08 13:53:34 +02:00
|
|
|
namespace MWRender
|
2010-06-03 20:44:55 +02:00
|
|
|
{
|
2010-06-12 13:01:20 +02:00
|
|
|
/// Base class for cell render, that implements inserting references into a cell in a
|
|
|
|
/// cell type- and render-engine-independent way.
|
2010-06-07 00:33:45 +02:00
|
|
|
|
2010-06-03 20:44:55 +02:00
|
|
|
class CellRender
|
|
|
|
{
|
|
|
|
public:
|
2010-06-12 13:01:20 +02:00
|
|
|
CellRender() {}
|
|
|
|
virtual ~CellRender() {}
|
2010-06-07 00:33:45 +02:00
|
|
|
|
2010-06-12 13:01:20 +02:00
|
|
|
/// start inserting a new reference.
|
2010-06-12 13:34:15 +02:00
|
|
|
virtual void insertBegin (const ESM::CellRef &ref) = 0;
|
2010-06-07 00:33:45 +02:00
|
|
|
|
2010-06-12 13:01:20 +02:00
|
|
|
/// insert a mesh related to the most recent insertBegin call.
|
|
|
|
virtual void insertMesh(const std::string &mesh) = 0;
|
|
|
|
|
2010-06-12 13:34:15 +02:00
|
|
|
/// insert a light related to the most recent insertBegin call.
|
|
|
|
virtual void insertLight(float r, float g, float b, float radius) = 0;
|
|
|
|
|
2010-06-12 13:01:20 +02:00
|
|
|
/// finish inserting a new reference and return a handle to it.
|
|
|
|
virtual std::string insertEnd() = 0;
|
|
|
|
|
|
|
|
void insertCell(const ESMS::CellStore &cell);
|
2010-06-03 20:44:55 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|