Clean up some dependencies between scene, material, and color
This commit is contained in:
parent
48e35dfc81
commit
c3da70cdd9
4 changed files with 11 additions and 11 deletions
|
@ -46,12 +46,12 @@ private:
|
|||
// Diffuse parameters.
|
||||
DiffuseShaderModel mDiffuseModel;
|
||||
Double mDiffuseIntensity;
|
||||
Color mDiffuseColor;
|
||||
basics::Color mDiffuseColor;
|
||||
|
||||
// Specular parameters.
|
||||
SpecularShaderModel mSpecularModel;
|
||||
Double mSpecularIntensity;
|
||||
Color mSpecularColor;
|
||||
basics::Color mSpecularColor;
|
||||
};
|
||||
|
||||
} /* namespace charles */
|
||||
|
|
|
@ -10,10 +10,8 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "material.h"
|
||||
#include "material.hh"
|
||||
#include "stats.hh"
|
||||
#include "texture.h"
|
||||
#include "types.hh"
|
||||
#include "basics/basics.hh"
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "scene.hh"
|
||||
|
||||
#include "basics.h"
|
||||
#include "light.h"
|
||||
#include "light.hh"
|
||||
#include "log.hh"
|
||||
#include "object.hh"
|
||||
#include "writer.h"
|
||||
|
@ -23,6 +23,7 @@
|
|||
#include "logModule.hh"
|
||||
|
||||
|
||||
using charles::basics::Color;
|
||||
using charles::basics::Ray;
|
||||
using charles::basics::Vector4;
|
||||
|
||||
|
|
11
src/scene.hh
11
src/scene.hh
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "camera.hh"
|
||||
#include "light.hh"
|
||||
#include "lightPoint.hh"
|
||||
#include "object.hh"
|
||||
#include "stats.hh"
|
||||
#include "basics/basics.hh"
|
||||
|
@ -42,16 +43,16 @@ struct Scene
|
|||
|
||||
void Render();
|
||||
bool IsRendered() const;
|
||||
const Color* GetPixels() const;
|
||||
const basics::Color* GetPixels() const;
|
||||
|
||||
AmbientLight& GetAmbient();
|
||||
void AddObject(Object::Ptr obj);
|
||||
void AddLight(PointLight* light);
|
||||
|
||||
private:
|
||||
Color TraceRay(const basics::Ray &ray,
|
||||
const int depth = 0,
|
||||
const Double weight = 1.0);
|
||||
basics::Color TraceRay(const basics::Ray &ray,
|
||||
const int depth = 0,
|
||||
const Double weight = 1.0);
|
||||
|
||||
void LogCamera() const;
|
||||
void LogObjects() const;
|
||||
|
@ -78,7 +79,7 @@ private:
|
|||
|
||||
// Rendering output.
|
||||
bool mIsRendered;
|
||||
Color *mPixels;
|
||||
basics::Color *mPixels;
|
||||
};
|
||||
|
||||
} /* namespace charles */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue