osg::NodeGraph::Node Class Reference

List of all members.

Public Member Functions

Constructors


 Node (void)
Construction


void init (int i, int d, int v0, int v1, int v2)
Class Specific


void release (void)
void drop (bool back)
void dropNeighbors (bool back)

Public Attributes

int index
int degree
Nodenext
Nodeprev
NodeListlist
EdgeedgeVec [3]
int vertex [3]


Detailed Description

Definition at line 179 of file OSGNodeGraph.h.


Constructor & Destructor Documentation

osg::NodeGraph::Node::Node ( void   )  [inline]

Definition at line 195 of file OSGNodeGraph.h.

00195                    : index(-1), degree(0), next(0), prev(0), list(0)
00196         {
00197             vertex[0] = vertex[1] = vertex[2] = 0;
00198             edgeVec[0] = edgeVec[1] = edgeVec[2] = 0;
00199         }


Member Function Documentation

void osg::NodeGraph::Node::init ( int  i,
int  d,
int  v0,
int  v1,
int  v2 
) [inline]

Definition at line 206 of file OSGNodeGraph.h.

00207         {
00208             index = i;
00209             degree = d;
00210             vertex[0] = v0;
00211             vertex[1] = v1;
00212             vertex[2] = v2;
00213         }

void osg::NodeGraph::Node::release ( void   )  [inline]

Definition at line 220 of file OSGNodeGraph.h.

References next().

Referenced by osg::NodeGraph::NodeList::push_back(), and osg::NodeGraph::NodeList::push_front().

00221         {
00222             if (list)
00223             {
00224                 if (next)
00225                 {
00226                     if (prev)
00227                     {
00228                         next->prev = prev;
00229                         prev->next = next;
00230                     }
00231                     else
00232                     {
00233                         next->prev = 0;
00234                         list->_first = next;
00235                     }
00236                 }
00237                 else
00238                 {
00239                     if (prev)
00240                     {
00241                         prev->next = 0;
00242                         list->_last = prev;
00243                     }
00244                     else
00245                     {
00246                         list->_first = 0;
00247                         list->_last = 0;
00248                     }
00249                 }
00250                 list->_size--;
00251                 next = prev = 0;
00252                 list = 0;
00253             }
00254         }

void osg::NodeGraph::Node::drop ( bool  back  )  [inline]

Definition at line 255 of file OSGNodeGraph.h.

Referenced by dropNeighbors().

00256         {
00257             if (list && list->_down)
00258                 list->_down->add(*this,back);
00259         }

void osg::NodeGraph::Node::dropNeighbors ( bool  back  )  [inline]

Definition at line 260 of file OSGNodeGraph.h.

References drop(), and osg::NodeGraph::Edge::node.

00261         {
00262             int i;
00263             Edge *edge;
00264             for (i = 0; i < 3; i++)
00265                 if ((edge = edgeVec[i]->brotherEdge))
00266                     edge->node->drop(back);
00267         };


Member Data Documentation

Definition at line 183 of file OSGNodeGraph.h.

Definition at line 184 of file OSGNodeGraph.h.

Referenced by osg::NodeGraph::addEdge().

Definition at line 185 of file OSGNodeGraph.h.

Referenced by osg::NodeGraph::NodeList::push_front().

Definition at line 186 of file OSGNodeGraph.h.

Referenced by osg::NodeGraph::NodeList::push_back().

Definition at line 188 of file OSGNodeGraph.h.

Definition at line 189 of file OSGNodeGraph.h.


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

Generated on Mon Mar 17 12:07:17 2008 for OpenSG by  doxygen 1.5.5