#ifndef __C_CUBE_SCENE_NODE_H_INCLUDED__
#define __C_CUBE_SCENE_NODE_H_INCLUDED__
#include "IMeshSceneNode.h"
#include "SMesh.h"
namespace irr
{
namespace scene
{
class CCubeSceneNode : public IMeshSceneNode
{
public:
CCubeSceneNode(f32 size, ISceneNode* parent, ISceneManager* mgr, s32 id,
const core::vector3df& position = core::vector3df(0,0,0),
const core::vector3df& rotation = core::vector3df(0,0,0),
const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f));
virtual ~CCubeSceneNode();
virtual void OnRegisterSceneNode();
virtual void render();
virtual const core::aabbox3d<f32>& getBoundingBox() const;
virtual video::SMaterial& getMaterial(u32 i);
virtual u32 getMaterialCount() const;
virtual ESCENE_NODE_TYPE getType() const { return ESNT_CUBE; }
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
virtual void setMesh(IMesh* mesh) {}
virtual IMesh* getMesh(void) { return Mesh; }
virtual void setReadOnlyMaterials(bool readonly) {}
virtual bool isReadOnlyMaterials() const { return false; }
private:
void setSize();
IMesh* Mesh;
f32 Size;
};
}
}
#endif