All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
KernelBatchDispatcher Class Reference

Subdivision refinement encapsulation layer. More...

#include <kernelBatchDispatcher.h>

Static Public Member Functions

template<class CONTROLLER , class CONTEXT >
static void Apply (CONTROLLER *controller, CONTEXT *context, KernelBatchVector const &batches, int maxlevel)
 Launches the processing of a vector of kernel batches this is a convenient API for controllers which don't have any user defined kernels. More...
 

Static Protected Member Functions

template<class CONTROLLER , class CONTEXT >
static bool ApplyKernel (CONTROLLER *controller, CONTEXT *context, KernelBatch const &batch)
 Launches the processing of a kernel batch returns true if the batch is handled, otherwise returns false (i.e. user defined kernel) More...
 

Detailed Description

Subdivision refinement encapsulation layer.

The kernel dispatcher allows client code to customize parts or the entire computation process. This pattern aims at hiding the logic specific to the subdivision algorithms and expose a simplified access to minimalistic compute kernels. By default, meshes revert to a default dispatcher that implements single-threaded CPU kernels.

  • derive a dispatcher class from this one
  • override the virtual functions
  • pass the derived dispatcher to the factory (one instance can be shared by many meshes)

Note : the caller is responsible for deleting a custom dispatcher

Definition at line 54 of file kernelBatchDispatcher.h.

Member Function Documentation

void Apply ( CONTROLLER *  controller,
CONTEXT *  context,
KernelBatchVector const &  batches,
int  maxlevel 
)
static

Launches the processing of a vector of kernel batches this is a convenient API for controllers which don't have any user defined kernels.

Parameters
controllerrefinement controller implementation (vertex array)
contextrefinement context implementation (subdivision tables) passed to the controller.
batchesbatches of kernels that need to be processed
maxlevelprocess vertex batches up to this level

Definition at line 129 of file kernelBatchDispatcher.h.

bool ApplyKernel ( CONTROLLER *  controller,
CONTEXT *  context,
KernelBatch const &  batch 
)
staticprotected

Launches the processing of a kernel batch returns true if the batch is handled, otherwise returns false (i.e. user defined kernel)

Parameters
controllerrefinement controller implementation
contextrefinement context implementation
batcha batch of kernel that need to be processed

Definition at line 104 of file kernelBatchDispatcher.h.


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