Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoNodeKitPath.h
1#ifndef COIN_SONODEKITPATH_H
2#define COIN_SONODEKITPATH_H
3
4/**************************************************************************\
5 *
6 * This file is part of the Coin 3D visualization library.
7 * Copyright (C) by Kongsberg Oil & Gas Technologies.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * ("GPL") version 2 as published by the Free Software Foundation.
12 * See the file LICENSE.GPL at the root directory of this source
13 * distribution for additional information about the GNU GPL.
14 *
15 * For using Coin with software that can not be combined with the GNU
16 * GPL, and for taking advantage of the additional benefits of our
17 * support services, please contact Kongsberg Oil & Gas Technologies
18 * about acquiring a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24 *
25\**************************************************************************/
26
27#include <Inventor/SoPath.h>
28
29class SoNode;
30class SoBaseKit;
31class SoSearchAction;
32
34 typedef SoPath inherited;
35
36public:
37 int getLength(void) const;
38 SoNode * getTail(void) const;
39 SoNode * getNode(const int idx) const;
40 SoNode * getNodeFromTail(const int idx) const;
41 void truncate(const int length);
42 void pop(void);
44 void append(const SoNodeKitPath * fromPath);
45 SbBool containsNode(SoBaseKit * node) const;
46 int findFork(const SoNodeKitPath * path) const;
47
48 friend COIN_DLL_API int operator==(const SoNodeKitPath & p1, const SoNodeKitPath & p2);
49
50protected:
51 SoNodeKitPath(const int approxLength);
52 virtual ~SoNodeKitPath();
53
54private:
55
56 static void clean(void);
57 static SoSearchAction *searchAction;
58 SoSearchAction *getSearchAction(void);
59
60 // these methods should not be used on an SoNodeKitPath
61 void append(const int childIndex);
62 void append(SoNode *childNode);
63 void append(const SoPath *fromPath);
64 void push(const int childIndex);
65 int getIndex(const int i) const;
66 int getIndexFromTail(const int i) const;
67 void insertIndex(SoNode *parent,const int newIndex);
68 void removeIndex(SoNode *parent,const int oldIndex);
69 void replaceIndex(SoNode *parent,const int index,SoNode *newChild);
70};
71
72COIN_DLL_API int operator==(const SoNodeKitPath & p1, const SoNodeKitPath & p2);
73
74#endif // !COIN_SONODEKITPATH_H
The SbList class is a template container class for lists.
Definition SbList.h:61
void truncate(const int length, const int dofit=0)
Definition SbList.h:163
int getLength(void) const
Definition SbList.h:159
Type pop(void)
Definition SbList.h:175
int operator==(const SbList< Type > &l) const
Definition SbList.h:200
void append(const Type item)
Definition SbList.h:112
void push(const Type item)
Definition SbList.h:171
The SoBaseKit class is the toplevel superclass for nodekits.
Definition SoBaseKit.h:57
The SoNodeKitPath class is a path that contains only nodekit nodes.
Definition SoNodeKitPath.h:33
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:47
The SoPath class is a container class for traversal path descriptions.
Definition SoPath.h:43
The SoSearchAction class provides methods for searching through scene graphs.
Definition SoSearchAction.h:35

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Mon Jan 22 2024 for Coin by Doxygen 1.10.0.