Blender V2.61 - r43446
Typedefs | Functions

BLI_edgehash.h File Reference

A general unordered 2-int pair hash table ADT. More...

Go to the source code of this file.

Typedefs

typedef struct EdgeHash EdgeHash
typedef struct EdgeHashIterator EdgeHashIterator
typedef void(* EdgeHashFreeFP )(void *key)

Functions

EdgeHashBLI_edgehash_new (void)
void BLI_edgehash_free (EdgeHash *eh, EdgeHashFreeFP valfreefp)
void BLI_edgehash_insert (EdgeHash *eh, unsigned int v0, unsigned int v1, void *val)
void * BLI_edgehash_lookup (EdgeHash *eh, unsigned int v0, unsigned int v1)
void ** BLI_edgehash_lookup_p (EdgeHash *eh, unsigned int v0, unsigned int v1)
int BLI_edgehash_haskey (EdgeHash *eh, unsigned int v0, unsigned int v1)
int BLI_edgehash_size (EdgeHash *eh)
void BLI_edgehash_clear (EdgeHash *eh, EdgeHashFreeFP valfreefp)
EdgeHashIteratorBLI_edgehashIterator_new (EdgeHash *eh)
void BLI_edgehashIterator_free (EdgeHashIterator *ehi)
void BLI_edgehashIterator_getKey (EdgeHashIterator *ehi, unsigned int *v0_r, unsigned int *v1_r)
void * BLI_edgehashIterator_getValue (EdgeHashIterator *ehi)
void BLI_edgehashIterator_setValue (EdgeHashIterator *ehi, void *val)
void BLI_edgehashIterator_step (EdgeHashIterator *ehi)
int BLI_edgehashIterator_isDone (EdgeHashIterator *ehi)

Detailed Description

A general unordered 2-int pair hash table ADT.

Author:
Daniel Dunbar

Definition in file BLI_edgehash.h.


Typedef Documentation

typedef struct EdgeHash EdgeHash

Definition at line 39 of file BLI_edgehash.h.

typedef void(* EdgeHashFreeFP)(void *key)

Definition at line 42 of file BLI_edgehash.h.

Definition at line 40 of file BLI_edgehash.h.


Function Documentation

void BLI_edgehash_clear ( EdgeHash eh,
EdgeHashFreeFP  valfreefp 
)
void BLI_edgehash_free ( EdgeHash eh,
EdgeHashFreeFP  valfreefp 
)
int BLI_edgehash_haskey ( EdgeHash eh,
unsigned int  v0,
unsigned int  v1 
)
void BLI_edgehash_insert ( EdgeHash eh,
unsigned int  v0,
unsigned int  v1,
void *  val 
)
void* BLI_edgehash_lookup ( EdgeHash eh,
unsigned int  v0,
unsigned int  v1 
)
void** BLI_edgehash_lookup_p ( EdgeHash eh,
unsigned int  v0,
unsigned int  v1 
)
EdgeHash* BLI_edgehash_new ( void  )
int BLI_edgehash_size ( EdgeHash eh)

Definition at line 158 of file edgehash.c.

References EdgeHash::nentries.

Referenced by BKE_mesh_calc_edges(), and CDDM_calc_edges().

void BLI_edgehashIterator_free ( EdgeHashIterator ehi)
void BLI_edgehashIterator_getKey ( EdgeHashIterator ehi,
unsigned int *  v0_r,
unsigned int *  v1_r 
)
void* BLI_edgehashIterator_getValue ( EdgeHashIterator ehi)
int BLI_edgehashIterator_isDone ( EdgeHashIterator ehi)
EdgeHashIterator* BLI_edgehashIterator_new ( EdgeHash eh)

Create a new EdgeHashIterator. The hash table must not be mutated while the iterator is in use, and the iterator will step exactly BLI_edgehash_size(gh) times before becoming done.

Definition at line 203 of file edgehash.c.

References EdgeHash::buckets, EdgeHashIterator::curBucket, EdgeHashIterator::curEntry, EdgeHashIterator::eh, MEM_mallocN(), EdgeHash::nbuckets, and NULL.

Referenced by applyModifier(), BKE_mesh_calc_edges(), CDDM_calc_edges(), cutEdges(), dm_calc_normal(), EM_make_hq_normals(), and explodeMesh().

void BLI_edgehashIterator_setValue ( EdgeHashIterator ehi,
void *  val 
)

Definition at line 234 of file edgehash.c.

References EdgeHashIterator::curEntry, EdgeEntry::val, and simple_enum_gen::val.

Referenced by cutEdges(), and explodeMesh().

void BLI_edgehashIterator_step ( EdgeHashIterator ehi)