Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added forgotten files

  • Loading branch information...
commit ea1c5df0c370ba37cda39c6a41a252311d91e551 1 parent b5df91e
Stefan Dyulgerov authored
9 test/irradiance/gx/gx_entity_world.cpp
View
@@ -0,0 +1,9 @@
+#include "precompiled.h"
+#include <gx/gx_entity_world.h>
+
+#include <sys/sys_base.h>
+
+namespace gx
+{
+
+}
38 test/irradiance/gx/gx_entity_world.h
View
@@ -0,0 +1,38 @@
+#ifndef __GX_ENTITY_WORLD_H__
+#define __GX_ENTITY_WORLD_H__
+
+#include <algorithm>
+#include <memory>
+#include <vector>
+
+#include <fnd/fnd_world.h>
+#include <gx/gx_entity.h>
+
+
+namespace gx
+{
+ //acts as a storage for entites
+ class entity_world : public fnd::world
+ {
+ public:
+
+ entity_world()
+ {
+ m_entities.reserve(4096);
+ }
+
+ void add_entity( std::shared_ptr< gx::entity> entity)
+ {
+ m_entities.push_back(entity);
+ }
+
+ void remove_entity( std::shared_ptr< gx::entity> entity )
+ {
+ m_entities.erase( std::remove( std::begin(m_entities), std::end(m_entities), entity) );
+ }
+
+ std::vector < std::shared_ptr< gx::entity> > m_entities;
+ };
+}
+
+#endif
Please sign in to comment.
Something went wrong with that request. Please try again.