Mercurial > hg > Members > kono > Cerium
view Renderer/Engine/SceneGraphArray.h @ 760:24a37fe8419a
first of all commit, not work Rendering/Test/create_task
author | hiroki |
---|---|
date | Thu, 04 Feb 2010 14:46:09 +0900 |
parents | 735f76483bb2 |
children |
line wrap: on
line source
#ifndef INCUDED_SCENE_GRAPH_ARRAY #define INCUDED_SCENE_GRAPH_ARRAY #include "SceneGraph.h" // 下ですぐ #undef してます #define MAX_SIZE 32 class SceneGraphArray { public: SceneGraph buf[MAX_SIZE]; int size; int pad[3]; SceneGraphArray(void) : size(0) {} /** * array の初期化 */ void init(void) { size = 0; } /** * buf から SceneGraph buffer を返す * * @retval SceneGraph if size < MAX_SIZE * @retval NULL if size >= MAX_SIZE */ SceneGraphPtr getNext(void) { if (size >= MAX_SIZE) { return NULL; } else { return &buf[size++]; } } }; typedef SceneGraphArray *SceneGraphArrayPtr; #undef MAX_SIZE #endif