Mercurial > hg > Game > Cerium
view TaskManager/Test/test_render/SceneGraphArray.h @ 243:c4918a1fb6c9 draft
rm warning
author | e065746@localhost.localdomain |
---|---|
date | Sun, 31 May 2009 16:26:20 +0900 |
parents | e6eb4f8d6b0e |
children | b3fb0013e6b2 |
line wrap: on
line source
#ifndef INCUDED_SCENE_GRAPH_ARRAY #define INCUDED_SCENE_GRAPH_ARRAY #ifndef INCLUDED_SCENE_GRAPH # include "SceneGraph.h" #endif // 下ですぐ #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