Commit 5c9eeedf authored by axel's avatar axel

ajout des ficgiers LrScene.h et .cpp (1ere version - non terminees)

parent 816cc8ae
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
/*****************************************************************************
* class LrScene (body) *
* *
* Ray Tracing Project - Master 1 (2007/2008) *
* UFR Sciences Fondamentales et Appliquées de l'Université de Poitiers *
* author : J.Francois, M.Nauge, A.Richard, H.Souchaud, E.Vershuur *
* creation : Friday, March 7 2008 (3/7/2008) *
*****************************************************************************/
#include "LrScene.h"
/*---------------------------------------------------------------------------*
* constructors and destructor *
*---------------------------------------------------------------------------*/
LrScene::LrScene()
:
m_image(),
m_camera()
{
}
LrScene::LrScene(const LrScene &source)
:
m_image(source.m_image),
m_camera(source.m_camera)
{
}
LrScene* LrScene::clone() const
{
return new LrScene(*this);
}
LrScene::LrScene(LrImage &image, LrCamera &camera)
:
m_image(image),
m_camera(camera)
{
}
LrScene::~LrScene()
{
}
/*---------------------------------------------------------------------------*
* assignement operator(s) *
*---------------------------------------------------------------------------*/
LrScene& LrScene::operator = (const LrScene &source)
{
if (this == &source)
return *this;
m_image = source.m_image;
m_camera = source.m_camera;
return *this;
}
/*---------------------------------------------------------------------------*
* accessors *
*---------------------------------------------------------------------------*/
LrImage LrScene::getImage() const
{
return m_image;
}
void LrScene::setDirection(const LrImage &image)
{
m_image = image;
}
LrCamera LrScene::getCamera() const
{
return m_camera;
}
void LrScene::setCamera(const LrCamera &camera)
{
m_camera = camera;
}
/*****************************************************************************
* class LrScene (specification) *
* *
* Ray Tracing Project - Master 1 (2007/2008) *
* UFR Sciences Fondamentales et Appliquées de l'Université de Poitiers *
* author : J.Francois, M.Nauge, A.Richard, H.Souchaud, E.Vershuur *
* creation : Friday, March 7 2008 (3/7/2008) *
*****************************************************************************/
/**
* @brief Abstract class to generate a rendered image.
* @file LrScene.h
* @author J.Francois, M.Nauge, A.Richard, H.Souchaud, E.Vershuur
*/
#ifndef LRSCENE_H
#define LRSCENE_H
#include "LrCamera"
#include "LrImage"
/**
* This class is an abstract class to generate rendering scenes.
* Their daughter's classes are used differents rendered techniques
* like ray tracing or radiosity
* @brief Abstract class to generate a rendered image.
*/
class LrScene
{
public :
/**
* @brief LrScene default constructor.
*/
LrScene();
/**
* @brief LrScene copy constructor.
* @param source LrScene object reference.
*/
LrScene(const LrScene &source);
/**
* @brief LrScene clone.
* @return LrScene object.
*/
LrScene * clone() const;
/**
* @brief LrScene personnal constructor
* @param image LrImage object reference.
* @param camera LrCamera object reference.
*/
LrScene(LrImage &image, LrCamera &camera);
/**
* @brief LrScene destructor
*/
virtual ~LrScene();
/**
* @brief assignement operator(s)
*/
LrScene & operator = (const LrScene &source);
/**
* @brief accessors
*/
LrImage getImage() const;
void setImage(const LrImage &image);
LrCamera getCamera() const;
void setCamera(const LrCamera &camera);
/**
* @brief abstract method to generate image
* @param image LrImage object reference.
* @param camera LrCamera object reference.
*/
void generateImage(LrImage &image, const LrCamera &camera)=0;
private :
LrImage m_image;
LrCamera m_camera;
};
#endif
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment