Support Forum       Library Source       SourceForge Page       G3D Web Page     
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
G3D::Surface::Environment Class Reference

Per-frame, view-dependent lighting information. More...

Public Member Functions

 Environment ()
 
virtual ~Environment ()
 
const shared_ptr
< AmbientOcclusion
ambientOcclusion () const
 
virtual void getScreenTextures (shared_ptr< Texture > &color, shared_ptr< Texture > &depth, bool updateNow) const
 More efficient than calling screenColorTexture and screenDepthTexture independently when both are needed.
 
const shared_ptr< Lighting > & lighting () const
 
virtual const shared_ptr
< Texture > & 
screenColorTexture (bool updateNow) const
 An image of the color buffer.
 
virtual const shared_ptr
< Texture > & 
screenDepthTexture (bool updateNow) const
 Used for screen-space reflection and refraction effects.
 
void setData (const shared_ptr< Lighting > &lighting, const shared_ptr< AmbientOcclusion > ambientOcclusion, const shared_ptr< Texture > &sourceScreenColorTexture, const shared_ptr< Texture > &sourceScreenDepthTexture)
 

Protected Attributes

shared_ptr< AmbientOcclusionm_ambientOcclusion
 
shared_ptr< Texturem_copiedScreenColorTexture
 
shared_ptr< Texturem_copiedScreenDepthTexture
 
bool m_copiedScreenSinceLastSetData
 True if the screen textures have been copied since the last call to setData.
 
shared_ptr< Lightingm_lighting
 
shared_ptr< Texturem_sourceScreenColorTexture
 
shared_ptr< Texturem_sourceScreenDepthTexture
 

Detailed Description

Per-frame, view-dependent lighting information.

Constructor & Destructor Documentation

G3D::Surface::Environment::Environment ( )
inline
virtual G3D::Surface::Environment::~Environment ( )
inlinevirtual

Member Function Documentation

const shared_ptr<AmbientOcclusion> G3D::Surface::Environment::ambientOcclusion ( ) const
inline

Referenced by setData().

virtual void G3D::Surface::Environment::getScreenTextures ( shared_ptr< Texture > &  color,
shared_ptr< Texture > &  depth,
bool  updateNow 
) const
inlinevirtual

More efficient than calling screenColorTexture and screenDepthTexture independently when both are needed.

const shared_ptr<Lighting>& G3D::Surface::Environment::lighting ( ) const
inline

Referenced by setData().

virtual const shared_ptr<Texture>& G3D::Surface::Environment::screenColorTexture ( bool  updateNow) const
inlinevirtual

An image of the color buffer.

This is a copy of the previous buffer; it is never the Texture currently being rendered to.

Commonly used for screen-space reflection and refraction effects. This may be lazily computed on the first call.

Parameters
updateNowIf true, the texture is re-copied from the source to include objects that have been rendered since the previous call. If false, the implementation may choose whether to re-copy the data. The default implementation does not re-copy the texture unless this is the first call.
virtual const shared_ptr<Texture>& G3D::Surface::Environment::screenDepthTexture ( bool  updateNow) const
inlinevirtual

Used for screen-space reflection and refraction effects.

See Also
screenColorTexture
void G3D::Surface::Environment::setData ( const shared_ptr< Lighting > &  lighting,
const shared_ptr< AmbientOcclusion ambientOcclusion,
const shared_ptr< Texture > &  sourceScreenColorTexture,
const shared_ptr< Texture > &  sourceScreenDepthTexture 
)
inline

Member Data Documentation

shared_ptr<AmbientOcclusion> G3D::Surface::Environment::m_ambientOcclusion
protected

Referenced by ambientOcclusion(), and setData().

shared_ptr<Texture> G3D::Surface::Environment::m_copiedScreenColorTexture
protected
shared_ptr<Texture> G3D::Surface::Environment::m_copiedScreenDepthTexture
protected
bool G3D::Surface::Environment::m_copiedScreenSinceLastSetData
mutableprotected

True if the screen textures have been copied since the last call to setData.

Set to true in screenTexture() and screenDepthTexture().

shared_ptr<Lighting> G3D::Surface::Environment::m_lighting
protected

Referenced by lighting(), and setData().

shared_ptr<Texture> G3D::Surface::Environment::m_sourceScreenColorTexture
protected

Referenced by screenColorTexture(), and setData().

shared_ptr<Texture> G3D::Surface::Environment::m_sourceScreenDepthTexture
protected

Referenced by screenDepthTexture(), and setData().


documentation generated on Sat Jan 12 2013 22:49:57 using doxygen 1.8.2