Blender V2.61 - r43446
Functions

graph.c File Reference

#include <float.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "BLI_graph.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Functions

static void testRadialSymmetry (BGraph *graph, BNode *root_node, RadialArc *ring, int total, float axis[3], float limit, int group)
static void handleAxialSymmetry (BGraph *graph, BNode *root_node, int depth, float axis[3], float limit)
static void testAxialSymmetry (BGraph *graph, BNode *root_node, BNode *node1, BNode *node2, BArc *arc1, BArc *arc2, float axis[3], float limit, int group)
static void flagAxialSymmetry (BNode *root_node, BNode *end_node, BArc *arc, int group)
void BLI_freeNode (BGraph *graph, BNode *node)
void BLI_removeNode (BGraph *graph, BNode *node)
BNodeBLI_otherNode (BArc *arc, BNode *node)
void BLI_removeArc (BGraph *graph, BArc *arc)
void BLI_flagNodes (BGraph *graph, int flag)
void BLI_flagArcs (BGraph *graph, int flag)
static void addArcToNodeAdjacencyList (BNode *node, BArc *arc)
void BLI_buildAdjacencyList (BGraph *graph)
void BLI_rebuildAdjacencyListForNode (BGraph *graph, BNode *node)
void BLI_freeAdjacencyList (BGraph *graph)
int BLI_hasAdjacencyList (BGraph *graph)
void BLI_replaceNodeInArc (BGraph *graph, BArc *arc, BNode *node_src, BNode *node_replaced)
void BLI_replaceNode (BGraph *graph, BNode *node_src, BNode *node_replaced)
void BLI_removeDoubleNodes (BGraph *graph, float limit)
BNodeBLI_FindNodeByPosition (BGraph *graph, float *p, float limit)
static void flagSubgraph (BNode *node, int subgraph)
int BLI_FlagSubgraphs (BGraph *graph)
void BLI_ReflagSubgraph (BGraph *graph, int old_subgraph, int new_subgraph)
static int detectCycle (BNode *node, BArc *src_arc)
int BLI_isGraphCyclic (BGraph *graph)
BArcBLI_findConnectedArc (BGraph *graph, BArc *arc, BNode *v)
static int subtreeShape (BNode *node, BArc *rootArc, int include_root)
int BLI_subtreeShape (BGraph *graph, BNode *node, BArc *rootArc, int include_root)
float BLI_subtreeLength (BNode *node)
void BLI_calcGraphLength (BGraph *graph)
static void markdownSymmetryArc (BGraph *graph, BArc *arc, BNode *node, int level, float limit)
void BLI_mirrorAlongAxis (float v[3], float center[3], float axis[3])
static void handleRadialSymmetry (BGraph *graph, BNode *root_node, int depth, float axis[3], float limit)
static void markdownSecondarySymmetry (BGraph *graph, BNode *node, int depth, int level, float limit)
void BLI_markdownSymmetry (BGraph *graph, BNode *root_node, float limit)
void * IT_head (void *arg)
void * IT_tail (void *arg)
void * IT_peek (void *arg, int n)
void * IT_next (void *arg)
void * IT_nextN (void *arg, int n)
void * IT_previous (void *arg)
int IT_stopped (void *arg)

Detailed Description

Definition in file graph.c.


Function Documentation

static void addArcToNodeAdjacencyList ( BNode node,
BArc arc 
) [static]

Definition at line 101 of file graph.c.

References BNode::arcs, and BNode::flag.

Referenced by BLI_buildAdjacencyList(), and BLI_rebuildAdjacencyListForNode().

void BLI_buildAdjacencyList ( BGraph graph)
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 graph)

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 graph)

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_rebuildAdjacencyListForNode ( BGraph graph,
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 
)
static int detectCycle ( BNode node,
BArc src_arc 
) [static]

Definition at line 361 of file graph.c.

References BNode::arcs, BLI_otherNode(), BNode::degree, BNode::flag, and i.

Referenced by BLI_isGraphCyclic().

static void flagAxialSymmetry ( BNode root_node,
BNode end_node,
BArc arc,
int  group 
) [static]
static void flagSubgraph ( BNode node,
int  subgraph 
) [static]

Definition at line 302 of file graph.c.

References BNode::arcs, BLI_otherNode(), BNode::degree, i, and BNode::subgraph_index.

Referenced by BLI_FlagSubgraphs().

static void handleAxialSymmetry ( BGraph graph,
BNode root_node,
int  depth,
float  axis[3],
float  limit 
) [static]
static void handleRadialSymmetry ( BGraph graph,
BNode root_node,
int  depth,
float  axis[3],
float  limit 
) [static]
void* IT_head ( void *  arg)

Definition at line 1095 of file graph.c.

References BArcIterator::head.

Referenced by subdivideArcBy().

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

Definition at line 1131 of file graph.c.

References BArcIterator::nextN.

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

Definition at line 1137 of file graph.c.

References BArcIterator::previous.

int IT_stopped ( void *  arg)

Definition at line 1143 of file graph.c.

References BArcIterator::stopped.

Referenced by ExtendArcBuckets().

void* IT_tail ( void *  arg)

Definition at line 1101 of file graph.c.

References BArcIterator::tail.

static void markdownSecondarySymmetry ( BGraph graph,
BNode node,
int  depth,
int  level,
float  limit 
) [static]
static void markdownSymmetryArc ( BGraph graph,
BArc arc,
BNode node,
int  level,
float  limit 
) [static]
static int subtreeShape ( BNode node,
BArc rootArc,
int  include_root 
) [static]

Definition at line 431 of file graph.c.

References BNode::arcs, BLI_otherNode(), BNode::degree, BNode::flag, i, NULL, and SHAPE_RADIX.

Referenced by BLI_subtreeShape().

static void testAxialSymmetry ( BGraph graph,
BNode root_node,
BNode node1,
BNode node2,
BArc arc1,
BArc arc2,
float  axis[3],
float  limit,
int  group 
) [static]
static void testRadialSymmetry ( BGraph graph,
BNode root_node,
RadialArc ring,
int  total,
float  axis[3],
float  limit,
int  group 
) [static]