fart/main/Scene.h
Josh Holtrop dad8497bf4 multisampling working
git-svn-id: svn://anubis/fart/trunk@46 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-01-25 23:01:46 +00:00

47 lines
1.0 KiB
C++
Executable File

#ifndef SCENE_H
#define SCENE_H SCENE_H
#include <string>
#include <map>
#include <vector>
#include "util/Ray.h"
#include "shapes/Shape.h"
class Scene
{
public:
Scene(std::map<std::string, const char *> options,
const char * filename);
~Scene();
void render();
private:
/* private methods */
void load(const char * filename);
void renderPixel(int x, int y, unsigned char * pixel);
Vector traceRay(const Ray & ray);
/* rendering parameters */
int m_width;
int m_height;
int m_multisample_level;
std::string m_output_file_name;
bool m_verbose;
double m_vfov;
/* private data */
std::vector<Shape *> m_shapes;
Transform m_transform;
double m_view_plane_dist;
int m_multisample_level_squared;
double m_sample_span;
double m_half_sample_span;
/* framebuffer */
unsigned char * m_data;
};
#endif