Starting to work on the World Optimiser sequence.

This commit is contained in:
Godzil
2020-03-11 09:09:30 +00:00
parent 441d758845
commit 3a2d21b787
4 changed files with 712 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
#include <ray.h>
#include <stdio.h>
#include <group.h>
#include <worldoptimiser.h>
#ifdef ENABLE_LUA_SUPPORT
extern "C" {
@@ -64,6 +65,8 @@ public:
Intersect intersect(Ray r);
void finalise(WorldOptimiser &opt);
void dumpMe(FILE *fp);
};

View File

@@ -9,12 +9,27 @@
#ifndef DORAYME_WORLDOPTIMISER_H
#define DORAYME_WORLDOPTIMISER_H
#include <group.h>
/* World Optimiser subclasses will created move objcet around to try to optimise the parsing of the world.
* This class is abstract to we can implement different type and change at runtime or build time
*/
class WorldOptimiser
{
public:
virtual void run(Group *root) = 0;
};
class NoWorldOptimisation : public WorldOptimiser
{
public:
void run(Group *root) {};
};
class OctreeOptimisation : public WorldOptimiser
{
public:
void run(Group *root) {};
};
#endif /* DORAYME_WORLDOPTIMISER_H */