PatchCacheLine Class Reference

Low-level cache for radiosity renderer. More...

#include <PatchCacheLine.h>

Collaboration diagram for PatchCacheLine:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PatchCacheLine (PatchRandomAccessEnumerator *patchEnumerator, float ffTreshold)
void addPatch (int srcPatch, float formFactor)
 Add patch to cache-line (and save form factor of pair of patches).
Color totalRadiosity ()
 
Returns:
Return radiosity summarized from all patches saved in cache-line.

size_t itemCount ()
 Return total count of patch saved in cache-line.

Static Public Member Functions

static size_t itemSize ()
 Return raw allocation size of one cache item.

Detailed Description

Low-level cache for radiosity renderer.

The one and only communication way between RadiosityRenderer and FormFactorEngine classes.

Definition at line 21 of file PatchCacheLine.h.


Constructor & Destructor Documentation

PatchCacheLine::PatchCacheLine ( PatchRandomAccessEnumerator patchEnumerator,
float  ffTreshold 
)

Parameters:
patchEnumerator Shared instance of PatchRandomAccessEnumerator.
ffTreshold Pair of patches with smaller form factor than formFactorTreshold will be ignored.


Member Function Documentation

void PatchCacheLine::addPatch ( int  srcPatch,
float  formFactor 
)

Add patch to cache-line (and save form factor of pair of patches).

Parameters:
srcPatch Source patch from a pair of patches.
formFactor Form factor of a pair of patches.
Note:
There is no need to specify destination patch, because destination patch is cache-line specific.

Color PatchCacheLine::totalRadiosity (  ) 

Returns:
Return radiosity summarized from all patches saved in cache-line.

This computation respectes cached form factor for each patch.

size_t PatchCacheLine::itemCount (  ) 

Return total count of patch saved in cache-line.

static size_t PatchCacheLine::itemSize (  )  [inline, static]

Return raw allocation size of one cache item.

Definition at line 51 of file PatchCacheLine.h.


The documentation for this class was generated from the following file:
Generated on Thu Dec 6 19:33:12 2007 for Radiosity Renderer and Visualizer by  doxygen 1.5.2