54 lines
1.0 KiB
C++
54 lines
1.0 KiB
C++
/* -----------------------------------------------------------------------------
|
|
GSFramework
|
|
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
|
------------------------------------------------------------------------------*/
|
|
|
|
|
|
#ifndef __NRENDERPRIMITIVE__
|
|
#define __NRENDERPRIMITIVE__
|
|
|
|
|
|
#include "core/render_data.h"
|
|
|
|
|
|
namespace GS {
|
|
namespace Core
|
|
{
|
|
class Item;
|
|
class Emitter;
|
|
struct Patch;
|
|
}
|
|
namespace Render {
|
|
|
|
/// Render primitive.
|
|
struct Primitive
|
|
{
|
|
enum Type
|
|
{
|
|
Type_Geometry = 0,
|
|
Type_Emitter,
|
|
Type_TerrainPatch
|
|
};
|
|
|
|
Type type;
|
|
|
|
const Core::Item *item;
|
|
sGeometry geometry;
|
|
|
|
union
|
|
{
|
|
Core::Emitter *emitter;
|
|
Core::Patch *patch;
|
|
};
|
|
|
|
Primitive(Geometry *g, const Core::Item *i, float) : type(Type_Geometry), item(i), geometry(g), emitter(0) {}
|
|
Primitive(Core::Patch *p, const Core::Item *i, float) : type(Type_TerrainPatch), item(i), patch(p) {}
|
|
Primitive(Core::Emitter *e, const Core::Item *i, float) : type(Type_Emitter), item(i), emitter(e) {}
|
|
};
|
|
|
|
} // Render
|
|
} // GS
|
|
|
|
|
|
#endif // __NRENDERPRIMITIVE__
|