Skip to content

shapeworks::MeshCache

Thread safe cache for meshes index by shape. More...

#include <MeshCache.h>

Public Functions

Name
MeshCache()
void set_cache_enabled(bool enabled)
void set_memory_percent(int percent)
MeshHandle get_mesh(const MeshWorkItem & vector)
void insert_mesh(const MeshWorkItem & item, MeshHandle mesh)
void clear()

Detailed Description

class shapeworks::MeshCache;

Thread safe cache for meshes index by shape.

The MeshCache implements a std::map keyed by shape (list of points) with MeshHandle values. It is thread-safe and can be used from any thread.

Public Functions Documentation

function MeshCache

MeshCache()

function set_cache_enabled

inline void set_cache_enabled(
    bool enabled
)

function set_memory_percent

inline void set_memory_percent(
    int percent
)

function get_mesh

MeshHandle get_mesh(
    const MeshWorkItem & vector
)

function insert_mesh

void insert_mesh(
    const MeshWorkItem & item,
    MeshHandle mesh
)

function clear

void clear()

Updated on 2024-03-17 at 12:58:44 -0600