TDME2 1.9.121
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
EnvironmentMappingRenderer Class Referencefinal

Environment mapping. More...

#include <tdme/engine/subsystems/environmentmapping/EnvironmentMappingRenderer.h>

Collaboration diagram for EnvironmentMappingRenderer:
Collaboration graph

Public Member Functions

 EnvironmentMappingRenderer (Engine *engine, int32_t width, int32_t height)
 Public constructor. More...
 
 ~EnvironmentMappingRenderer ()
 Destructor. More...
 
int32_t getWidth ()
 
int32_t getHeight ()
 
int32_t getRenderPassMask ()
 
void setRenderPassMask (int32_t renderPassMask)
 Set up render pass mask. More...
 
int64_t getTimeRenderUpdateFrequency ()
 
void setTimeRenderUpdateFrequency (int64_t frequency)
 Set up render update time frequency. More...
 
int32_t getCubeMapTextureId ()
 

Private Member Functions

void initialize ()
 Init frame buffer. More...
 
void reshape (int32_t width, int32_t height)
 Reshape frame buffers. More...
 
void dispose ()
 Disposes this shadow mapping. More...
 
void render (const Vector3 &position)
 Renders given objects in to environment cube map. More...
 

Private Attributes

Engineengine { nullptr }
 
Cameracamera { nullptr }
 
int width { -1 }
 
int height { -1 }
 
array< Vector3, 6 > forwardVectors
 
array< Vector3, 6 > sideVectors
 
array< array< FrameBuffer *, 6 >, 2 > frameBuffers
 
array< int32_t, 2 > cubeMapTextureIds { 0, 0 }
 
int64_t timeRenderLast { -1LL }
 
int reflectionCubeMapTextureIdx { 0 }
 
int renderCubeMapTextureIdx { 0 }
 
int64_t timeRenderUpdateFrequency { 100LL }
 
int32_t renderPassMask { Entity::RENDERPASS_ALL - Entity::RENDERPASS_WATER }
 
Engine::DecomposedEntities visibleDecomposedEntities
 

Static Private Attributes

static STATIC_DLL_IMPEXT GeometryBuffergeometryBuffer = nullptr
 

Friends

class tdme::engine::EnvironmentMapping
 

Detailed Description

Environment mapping.

Author
Andreas Drewke
Version
$Id$

Definition at line 30 of file EnvironmentMappingRenderer.h.

Constructor & Destructor Documentation

◆ EnvironmentMappingRenderer()

EnvironmentMappingRenderer ( Engine engine,
int32_t  width,
int32_t  height 
)

Public constructor.

Parameters
engineengine
widthwidth
heightheight

Definition at line 52 of file EnvironmentMappingRenderer.cpp.

◆ ~EnvironmentMappingRenderer()

Destructor.

Definition at line 96 of file EnvironmentMappingRenderer.cpp.

Member Function Documentation

◆ dispose()

void dispose ( )
private

Disposes this shadow mapping.

Definition at line 127 of file EnvironmentMappingRenderer.cpp.

◆ getCubeMapTextureId()

int32_t getCubeMapTextureId ( )
inline
Returns
cube map texture id

Definition at line 138 of file EnvironmentMappingRenderer.h.

◆ getHeight()

int32_t getHeight ( )
inline
Returns
height

Definition at line 101 of file EnvironmentMappingRenderer.h.

◆ getRenderPassMask()

int32_t getRenderPassMask ( )
inline
Returns
render pass mask

Definition at line 108 of file EnvironmentMappingRenderer.h.

◆ getTimeRenderUpdateFrequency()

int64_t getTimeRenderUpdateFrequency ( )
inline
Returns
render update time frequency in milliseconds

Definition at line 123 of file EnvironmentMappingRenderer.h.

◆ getWidth()

int32_t getWidth ( )
inline
Returns
width

Definition at line 94 of file EnvironmentMappingRenderer.h.

◆ initialize()

void initialize ( )
private

Init frame buffer.

Definition at line 100 of file EnvironmentMappingRenderer.cpp.

◆ render()

void render ( const Vector3 position)
private

Renders given objects in to environment cube map.

Parameters
positionposition

Definition at line 138 of file EnvironmentMappingRenderer.cpp.

◆ reshape()

void reshape ( int32_t  width,
int32_t  height 
)
private

Reshape frame buffers.

Parameters
widthwidth
heightheight

Definition at line 123 of file EnvironmentMappingRenderer.cpp.

◆ setRenderPassMask()

void setRenderPassMask ( int32_t  renderPassMask)
inline

Set up render pass mask.

Parameters
renderPassMaskrender pass mask

Definition at line 116 of file EnvironmentMappingRenderer.h.

◆ setTimeRenderUpdateFrequency()

void setTimeRenderUpdateFrequency ( int64_t  frequency)
inline

Set up render update time frequency.

Parameters
frequencyfrequency in milliseconds

Definition at line 131 of file EnvironmentMappingRenderer.h.

Friends And Related Function Documentation

◆ tdme::engine::EnvironmentMapping

friend class tdme::engine::EnvironmentMapping
friend

Definition at line 32 of file EnvironmentMappingRenderer.h.

Member Data Documentation

◆ camera

Camera* camera { nullptr }
private

Definition at line 36 of file EnvironmentMappingRenderer.h.

◆ cubeMapTextureIds

array<int32_t, 2> cubeMapTextureIds { 0, 0 }
private

Definition at line 45 of file EnvironmentMappingRenderer.h.

◆ engine

Engine* engine { nullptr }
private

Definition at line 35 of file EnvironmentMappingRenderer.h.

◆ forwardVectors

array<Vector3, 6> forwardVectors
private

Definition at line 39 of file EnvironmentMappingRenderer.h.

◆ frameBuffers

array<array<FrameBuffer*, 6>, 2> frameBuffers
private
Initial value:
{{
{{ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }},
{{ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }}
}}

Definition at line 41 of file EnvironmentMappingRenderer.h.

◆ geometryBuffer

GeometryBuffer * geometryBuffer = nullptr
staticprivate

Definition at line 49 of file EnvironmentMappingRenderer.h.

◆ height

int height { -1 }
private

Definition at line 38 of file EnvironmentMappingRenderer.h.

◆ reflectionCubeMapTextureIdx

int reflectionCubeMapTextureIdx { 0 }
private

Definition at line 47 of file EnvironmentMappingRenderer.h.

◆ renderCubeMapTextureIdx

int renderCubeMapTextureIdx { 0 }
private

Definition at line 48 of file EnvironmentMappingRenderer.h.

◆ renderPassMask

int32_t renderPassMask { Entity::RENDERPASS_ALL - Entity::RENDERPASS_WATER }
private

Definition at line 51 of file EnvironmentMappingRenderer.h.

◆ sideVectors

array<Vector3, 6> sideVectors
private

Definition at line 40 of file EnvironmentMappingRenderer.h.

◆ timeRenderLast

int64_t timeRenderLast { -1LL }
private

Definition at line 46 of file EnvironmentMappingRenderer.h.

◆ timeRenderUpdateFrequency

int64_t timeRenderUpdateFrequency { 100LL }
private

Definition at line 50 of file EnvironmentMappingRenderer.h.

◆ visibleDecomposedEntities

Engine::DecomposedEntities visibleDecomposedEntities
private

Definition at line 52 of file EnvironmentMappingRenderer.h.

◆ width

int width { -1 }
private

Definition at line 37 of file EnvironmentMappingRenderer.h.


The documentation for this class was generated from the following files: