#ifndef __C_BILLBOARD_SCENE_NODE_H_INCLUDED__
#define __C_BILLBOARD_SCENE_NODE_H_INCLUDED__
#include "IBillboardSceneNode.h"
#include "S3DVertex.h"
namespace irr
{
namespace scene
{
class CBillboardSceneNode : virtual public IBillboardSceneNode
{
public:
CBillboardSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
const core::vector3df& position, const core::dimension2d<f32>& size,
video::SColor colorTop=video::SColor(0xFFFFFFFF),video::SColor colorBottom=video::SColor(0xFFFFFFFF));
virtual void OnRegisterSceneNode();
virtual void render();
virtual const core::aabbox3d<f32>& getBoundingBox() const;
virtual void setSize(const core::dimension2d<f32>& size);
virtual const core::dimension2d<f32>& getSize() const;
virtual video::SMaterial& getMaterial(u32 i);
virtual u32 getMaterialCount() const;
virtual void setColor(const video::SColor & overallColor);
virtual void setColor(const video::SColor & topColor, const video::SColor & bottomColor);
virtual void getColor(video::SColor& topColor, video::SColor& bottomColor) const;
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
virtual ESCENE_NODE_TYPE getType() const { return ESNT_BILLBOARD; }
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
private:
core::dimension2d<f32> Size;
core::aabbox3d<f32> BBox;
video::SMaterial Material;
video::S3DVertex vertices[4];
u16 indices[6];
};
}
}
#endif