Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions

BLI_graph.h File Reference

#include "DNA_listBase.h"

Go to the source code of this file.

Classes

struct  BGraph
struct  BNode
struct  BArc
struct  BArcIterator
struct  RadialArc

Defines

#define SHAPE_RADIX   10
#define SYM_TOPOLOGICAL   1
#define SYM_PHYSICAL   2
#define SYM_AXIAL   4
#define SYM_RADIAL   8
#define SYM_SIDE_POSITIVE   1
#define SYM_SIDE_NEGATIVE   2
#define SYM_SIDE_RADIAL   3

Typedefs

typedef void(* FreeArc )(struct BArc *)
typedef void(* FreeNode )(struct BNode *)
typedef void(* RadialSymmetry )(struct BNode *root_node, struct RadialArc *ring, int total)
typedef void(* AxialSymmetry )(struct BNode *root_node, struct BNode *node1, struct BNode *node2, struct BArc *arc1, struct BArc *arc2)
typedef struct BGraph BGraph
typedef struct BNode BNode
typedef struct BArc BArc
typedef void *(* HeadFct )(void *iter)
typedef void *(* TailFct )(void *iter)
typedef void *(* PeekFct )(void *iter, int n)
typedef void *(* NextFct )(void *iter)
typedef void *(* NextNFct )(void *iter, int n)
typedef void *(* PreviousFct )(void *iter)
typedef int(* StoppedFct )(void *iter)
typedef struct BArcIterator BArcIterator
typedef struct RadialArc RadialArc

Functions

void * IT_head (void *iter)
void * IT_tail (void *iter)
void * IT_peek (void *iter, int n)
void * IT_next (void *iter)
void * IT_nextN (void *iter, int n)
void * IT_previous (void *iter)
int IT_stopped (void *iter)
BNodeBLI_otherNode (BArc *arc, BNode *node)
void BLI_freeNode (BGraph *graph, BNode *node)
void BLI_removeNode (BGraph *graph, BNode *node)
void BLI_removeArc (BGraph *graph, BArc *arc)
void BLI_flagNodes (BGraph *graph, int flag)
void BLI_flagArcs (BGraph *graph, int flag)
int BLI_hasAdjacencyList (BGraph *rg)
void BLI_buildAdjacencyList (BGraph *rg)
void BLI_rebuildAdjacencyList (BGraph *rg)
void BLI_rebuildAdjacencyListForNode (BGraph *rg, BNode *node)
void BLI_freeAdjacencyList (BGraph *rg)
int BLI_FlagSubgraphs (BGraph *graph)
void BLI_ReflagSubgraph (BGraph *graph, int old_subgraph, int new_subgraph)
int BLI_subtreeShape (BGraph *graph, BNode *node, BArc *rootArc, int include_root)
float BLI_subtreeLength (BNode *node)
void BLI_calcGraphLength (BGraph *graph)
void BLI_replaceNode (BGraph *graph, BNode *node_src, BNode *node_replaced)
void BLI_replaceNodeInArc (BGraph *graph, BArc *arc, BNode *node_src, BNode *node_replaced)
void BLI_removeDoubleNodes (BGraph *graph, float limit)
BNodeBLI_FindNodeByPosition (BGraph *graph, float *p, float limit)
BArcBLI_findConnectedArc (BGraph *graph, BArc *arc, BNode *v)
int BLI_isGraphCyclic (BGraph *graph)
void BLI_markdownSymmetry (BGraph *graph, BNode *root_node, float limit)
void BLI_mirrorAlongAxis (float v[3], float center[3], float axis[3])

Detailed Description

Definition in file BLI_graph.h.


Define Documentation

#define SHAPE_RADIX   10

Definition at line 127 of file BLI_graph.h.

Referenced by subtreeShape().

#define SYM_AXIAL   4

Definition at line 152 of file BLI_graph.h.

Referenced by RIG_printNode(), and testAxialSymmetry().

#define SYM_PHYSICAL   2

Definition at line 149 of file BLI_graph.h.

Referenced by testAxialSymmetry(), and testRadialSymmetry().

#define SYM_RADIAL   8

Definition at line 153 of file BLI_graph.h.

Referenced by RIG_printNode(), and testRadialSymmetry().

#define SYM_SIDE_NEGATIVE   2

Definition at line 159 of file BLI_graph.h.

Referenced by flagAxialSymmetry().

#define SYM_SIDE_POSITIVE   1

Definition at line 158 of file BLI_graph.h.

Referenced by flagAxialSymmetry().

#define SYM_SIDE_RADIAL   3

Definition at line 161 of file BLI_graph.h.

Referenced by testRadialSymmetry().

#define SYM_TOPOLOGICAL   1

Definition at line 148 of file BLI_graph.h.

Referenced by handleAxialSymmetry(), handleRadialSymmetry(), and RIG_printNode().


Typedef Documentation

typedef void(* AxialSymmetry)(struct BNode *root_node, struct BNode *node1, struct BNode *node2, struct BArc *arc1, struct BArc *arc2)

Definition at line 19 of file BLI_graph.h.

typedef struct BArc BArc
typedef struct BArcIterator BArcIterator
typedef struct BGraph BGraph
typedef struct BNode BNode
typedef void(* FreeArc)(struct BArc *)

Definition at line 16 of file BLI_graph.h.

typedef void(* FreeNode)(struct BNode *)

Definition at line 17 of file BLI_graph.h.

typedef void*(* HeadFct)(void *iter)

Definition at line 77 of file BLI_graph.h.

typedef void*(* NextFct)(void *iter)

Definition at line 80 of file BLI_graph.h.

typedef void*(* NextNFct)(void *iter, int n)

Definition at line 81 of file BLI_graph.h.

typedef void*(* PeekFct)(void *iter, int n)

Definition at line 79 of file BLI_graph.h.

typedef void*(* PreviousFct)(void *iter)

Definition at line 82 of file BLI_graph.h.

typedef struct RadialArc RadialArc
typedef void(* RadialSymmetry)(struct BNode *root_node, struct RadialArc *ring, int total)

Definition at line 18 of file BLI_graph.h.

typedef int(* StoppedFct)(void *iter)

Definition at line 83 of file BLI_graph.h.

typedef void*(* TailFct)(void *iter)

Definition at line 78 of file BLI_graph.h.


Function Documentation

void BLI_buildAdjacencyList ( BGraph rg)
void BLI_calcGraphLength ( BGraph graph)
BArc* BLI_findConnectedArc ( BGraph graph,
BArc arc,
BNode v 
)

Definition at line 414 of file graph.c.

References BGraph::arcs, ListBase::first, BArc::head, BArc::next, and BArc::tail.

Referenced by removeNormalNodes().

BNode* BLI_FindNodeByPosition ( BGraph graph,
float *  p,
float  limit 
)

Definition at line 283 of file graph.c.

References distance(), ListBase::first, len_v3v3(), BGraph::nodes, and NULL.

Referenced by RIG_removeUneededOffsets().

void BLI_flagArcs ( BGraph graph,
int  flag 
)

Definition at line 91 of file graph.c.

References BGraph::arcs, ListBase::first, BArc::flag, and BArc::next.

Referenced by BIF_flagMultiArcs(), and BLI_markdownSymmetry().

void BLI_flagNodes ( BGraph graph,
int  flag 
)
int BLI_FlagSubgraphs ( BGraph graph)
void BLI_freeAdjacencyList ( BGraph rg)

Definition at line 172 of file graph.c.

References BNode::arcs, ListBase::first, MEM_freeN(), BNode::next, BGraph::nodes, and NULL.

void BLI_freeNode ( BGraph graph,
BNode node 
)

Definition at line 47 of file graph.c.

References BNode::arcs, BGraph::free_node, and MEM_freeN().

Referenced by BLI_removeNode(), REEB_freeGraph(), and RIG_freeRigGraph().

int BLI_hasAdjacencyList ( BGraph rg)

Definition at line 186 of file graph.c.

References BNode::arcs, ListBase::first, BNode::next, BGraph::nodes, and NULL.

Referenced by BLI_FlagSubgraphs().

int BLI_isGraphCyclic ( BGraph graph)
void BLI_markdownSymmetry ( BGraph graph,
BNode root_node,
float  limit 
)
void BLI_mirrorAlongAxis ( float  v[3],
float  center[3],
float  axis[3] 
)
BNode* BLI_otherNode ( BArc arc,
BNode node 
)
void BLI_rebuildAdjacencyList ( BGraph rg)
void BLI_rebuildAdjacencyListForNode ( BGraph rg,
BNode node 
)
void BLI_ReflagSubgraph ( BGraph graph,
int  old_subgraph,
int  new_subgraph 
)

Definition at line 346 of file graph.c.

References ListBase::first, BNode::flag, BNode::next, and BGraph::nodes.

Referenced by joinSubgraphsEnds().

void BLI_removeArc ( BGraph graph,
BArc arc 
)

Definition at line 71 of file graph.c.

References BGraph::arcs, BLI_freelinkN(), and BGraph::free_arc.

Referenced by RIG_joinArcs().

void BLI_removeDoubleNodes ( BGraph graph,
float  limit 
)
void BLI_removeNode ( BGraph graph,
BNode node 
)
void BLI_replaceNode ( BGraph graph,
BNode node_src,
BNode node_replaced 
)
void BLI_replaceNodeInArc ( BGraph graph,
BArc arc,
BNode node_src,
BNode node_replaced 
)
float BLI_subtreeLength ( BNode node)
int BLI_subtreeShape ( BGraph graph,
BNode node,
BArc rootArc,
int  include_root 
)
void* IT_head ( void *  iter)

Definition at line 1095 of file graph.c.

References BArcIterator::head.

Referenced by subdivideArcBy().

void* IT_next ( void *  iter)
void* IT_nextN ( void *  iter,
int  n 
)

Definition at line 1131 of file graph.c.

References BArcIterator::nextN.

void* IT_peek ( void *  iter,
int  n 
)
void* IT_previous ( void *  iter)

Definition at line 1137 of file graph.c.

References BArcIterator::previous.

int IT_stopped ( void *  iter)

Definition at line 1143 of file graph.c.

References BArcIterator::stopped.

Referenced by ExtendArcBuckets().

void* IT_tail ( void *  iter)

Definition at line 1101 of file graph.c.

References BArcIterator::tail.