Extracted RayCastingResult header to speed-up compiling

This commit is contained in:
Michaël Lemaire 2015-10-16 00:28:07 +02:00
parent e81487ae08
commit ac1b6a909b
12 changed files with 43 additions and 13 deletions

View file

@ -7,6 +7,7 @@
#include "OpenGLWater.h" #include "OpenGLWater.h"
#include "OpenGLTerrain.h" #include "OpenGLTerrain.h"
#include "CloudsRenderer.h" #include "CloudsRenderer.h"
#include "Color.h"
#include "Scenery.h" #include "Scenery.h"
#include "LightingManager.h" #include "LightingManager.h"
#include "GodRaysSampler.h" #include "GodRaysSampler.h"

View file

@ -2,6 +2,7 @@
#include "SoftwareRenderer.h" #include "SoftwareRenderer.h"
#include "FluidMediumInterface.h" #include "FluidMediumInterface.h"
#include "Color.h"
FluidMediumManager::FluidMediumManager(SoftwareRenderer* renderer): FluidMediumManager::FluidMediumManager(SoftwareRenderer* renderer):
renderer(renderer) renderer(renderer)

View file

@ -3,19 +3,10 @@
#include "software_global.h" #include "software_global.h"
#include "Color.h"
#include "Vector3.h"
namespace paysages { namespace paysages {
namespace software { namespace software {
typedef struct typedef RayCastingResult (*FuncGeneralCastRay)(SoftwareRenderer* renderer, const Vector3 &start, const Vector3 &direction);
{
int hit;
Color hit_color;
Vector3 hit_location;
} RayCastingResult;
typedef RayCastingResult (*FuncGeneralCastRay)(SoftwareRenderer* renderer, Vector3 start, Vector3 direction);
class SOFTWARESHARED_EXPORT RayCastingManager class SOFTWARESHARED_EXPORT RayCastingManager
{ {

View file

@ -0,0 +1,6 @@
#include "RayCastingResult.h"
RayCastingResult::RayCastingResult()
{
hit = false;
}

View file

@ -0,0 +1,25 @@
#ifndef RAYCASTINGRESULT_H
#define RAYCASTINGRESULT_H
#include "software_global.h"
#include "Color.h"
#include "Vector3.h"
namespace paysages {
namespace software {
class SOFTWARESHARED_EXPORT RayCastingResult
{
public:
RayCastingResult();
bool hit;
Color hit_color;
Vector3 hit_location;
};
}
}
#endif // RAYCASTINGRESULT_H

View file

@ -21,6 +21,7 @@
#include "GodRaysResult.h" #include "GodRaysResult.h"
#include "System.h" #include "System.h"
#include "Thread.h" #include "Thread.h"
#include "RayCastingResult.h"
SoftwareRenderer::SoftwareRenderer(Scenery* scenery): SoftwareRenderer::SoftwareRenderer(Scenery* scenery):
scenery(scenery) scenery(scenery)

View file

@ -3,8 +3,6 @@
#include "software_global.h" #include "software_global.h"
#include "RayCastingManager.h"
namespace paysages { namespace paysages {
namespace software { namespace software {

View file

@ -6,6 +6,7 @@
#include "TexturesRenderer.h" #include "TexturesRenderer.h"
#include "LightComponent.h" #include "LightComponent.h"
#include "TerrainRayWalker.h" #include "TerrainRayWalker.h"
#include "RayCastingResult.h"
TerrainRenderer::TerrainRenderer(SoftwareRenderer* parent): TerrainRenderer::TerrainRenderer(SoftwareRenderer* parent):
parent(parent) parent(parent)

View file

@ -5,7 +5,7 @@
#include "LightFilter.h" #include "LightFilter.h"
#include "RayCastingManager.h" #include "Vector3.h"
#include "Color.h" #include "Color.h"
namespace paysages { namespace paysages {

View file

@ -9,6 +9,7 @@
#include "SurfaceMaterial.h" #include "SurfaceMaterial.h"
#include "NoiseFunctionSimplex.h" #include "NoiseFunctionSimplex.h"
#include "FloatNode.h" #include "FloatNode.h"
#include "RayCastingResult.h"
WaterRenderer::WaterRenderer(SoftwareRenderer* parent): WaterRenderer::WaterRenderer(SoftwareRenderer* parent):
parent(parent) parent(parent)

View file

@ -53,6 +53,7 @@ SOURCES += SoftwareRenderer.cpp \
clouds/CloudModelCumuloNimbus.cpp \ clouds/CloudModelCumuloNimbus.cpp \
RenderProgress.cpp \ RenderProgress.cpp \
LightSource.cpp \ LightSource.cpp \
RayCastingResult.cpp \
GodRaysSampler.cpp \ GodRaysSampler.cpp \
GodRaysResult.cpp GodRaysResult.cpp
@ -97,6 +98,7 @@ HEADERS += SoftwareRenderer.h\
clouds/CloudModelCumuloNimbus.h \ clouds/CloudModelCumuloNimbus.h \
RenderProgress.h \ RenderProgress.h \
LightSource.h \ LightSource.h \
RayCastingResult.h \
GodRaysSampler.h \ GodRaysSampler.h \
GodRaysResult.h GodRaysResult.h

View file

@ -45,6 +45,9 @@ namespace software {
class LightComponent; class LightComponent;
class LightSource; class LightSource;
class RayCastingManager;
class RayCastingResult;
class NightSky; class NightSky;
class TerrainRayWalker; class TerrainRayWalker;