Parent Directory
|
Revision Log
added libnytrengine. buildable
#ifndef _nytr_Environment_h_
#define _nytr_Environment_h_
#include "rndrcmn.h"
#include "SampleValue.h"
namespace nytr
{
//! environment interface
/*!
Environment class handles estimation of radiance from non-hit rays.
*/
class Environment
{
public:
//! D-tor
virtual ~Environment();
//! handle background
virtual void handleBackground(SampleValue* pVal, const FVector3& vDir) = 0;
};
class Texture;
class EMMapping;
//! environment map impl.
class EnvironmentMap : public Environment
{
public:
//! C-tor
/*!
@param pTex
environment map texture.
the texture should be binded to Scene class
@param spEMM
environment map mapping (made shared_ptr because it can be shared with IBL classes)
*/
EnvironmentMap(Texture* pTex, boost::shared_ptr<EMMapping> spEMM);
//! D-tor
virtual ~EnvironmentMap();
void handleBackground(SampleValue* pVal, const FVector3& vDir);
// ------ accessor methods ------
const Texture* getpTexture() const
{
return m_pTexture;
}
Texture* getpTexture()
{
return m_pTexture;
}
const boost::shared_ptr<EMMapping>& getspEMM() const
{
return m_spEMM;
}
boost::shared_ptr<EMMapping>& getspEMM()
{
return m_spEMM;
}
private:
//! environment map texture
Texture* m_pTexture;
//! environment map mapping info.
boost::shared_ptr<EMMapping> m_spEMM;
};
} // end of namespace nytr
#endif // _nytr_Environment_h_
| admin | ViewVC Help |
| Powered by ViewVC 1.0.5 |