HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_StencilUtils.h File Reference
+ Include dependency graph for GAS_StencilUtils.h:

Go to the source code of this file.

Macros

#define DECLARE_STENCIL_VARIABLES(dst)
 
#define CHECK_STENCIL_TILE(iterator)
 
#define CHECK_STENCIL_TILE_NOSKIP(iterator, skip_value)
 
#define CHECK_STENCIL_VOXEL(iterator)
 
#define CHECK_STENCIL_VOXEL_NOSKIP(iterator, skip_value)   skip_value = (!conststencil && stencilsampler.getValue(iterator) <= 0.5f);
 

Macro Definition Documentation

#define CHECK_STENCIL_TILE (   iterator)
Value:
if (stencil) \
{ \
conststencil = stencilsampler.isTileConstant(iterator, cstencilval); \
if (conststencil && cstencilval <= 0.5f) \
{ \
iterator.skipToEndOfTile(); \
continue; \
} \
}
GLfloat f
Definition: glcorearb.h:1926
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
GLint GLfloat GLint stencil
Definition: glcorearb.h:1278

This macro checks the stencil value in the current destination tile. If the stencil tile is constant and below the active threshold, the whole tile will be skipped.

Definition at line 52 of file GAS_StencilUtils.h.

#define CHECK_STENCIL_TILE_NOSKIP (   iterator,
  skip_value 
)
Value:
skip_value = false; \
{ \
conststencil = stencilsampler.isTileConstant(iterator, cstencilval); \
skip_value = (conststencil && cstencilval <= 0.5f); \
}
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
GLint GLfloat GLint stencil
Definition: glcorearb.h:1278

This macro checks the stencil value in the current destination tile. Whether the tile can be skipped is stored in skip_value, but iterator is left untouched.

Definition at line 66 of file GAS_StencilUtils.h.

#define CHECK_STENCIL_VOXEL (   iterator)
Value:
if (!conststencil && stencilsampler.getValue(iterator) <= 0.5f) \
continue;

This macro will check the stencil value for the current voxel and skip if it's not active.

Definition at line 76 of file GAS_StencilUtils.h.

#define CHECK_STENCIL_VOXEL_NOSKIP (   iterator,
  skip_value 
)    skip_value = (!conststencil && stencilsampler.getValue(iterator) <= 0.5f);

This macro will check the stencil value for the current voxel. Whether the voxel can be skipped is stored in skip_value, but iterator is left untouched.

Definition at line 83 of file GAS_StencilUtils.h.

#define DECLARE_STENCIL_VARIABLES (   dst)
Value:
float cstencilval = 1; \
bool conststencil = true; \
SIM_ScalarFieldSampler stencilsampler; \
stencilsampler.init(dst, stencil);
GLenum GLenum dst
Definition: glcorearb.h:1793
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
GLint GLfloat GLint stencil
Definition: glcorearb.h:1278

Declares the variables needed to check stencil values. These variables are updated and used by the subsequent macros.

Definition at line 42 of file GAS_StencilUtils.h.