![]() |
http://www.sim.no http://www.coin3d.org |
00001 #ifndef COIN_SONODEKITPATH_H 00002 #define COIN_SONODEKITPATH_H 00003 00004 /**************************************************************************\ 00005 * 00006 * This file is part of the Coin 3D visualization library. 00007 * Copyright (C) 1998-2007 by Systems in Motion. All rights reserved. 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * ("GPL") version 2 as published by the Free Software Foundation. 00012 * See the file LICENSE.GPL at the root directory of this source 00013 * distribution for additional information about the GNU GPL. 00014 * 00015 * For using Coin with software that can not be combined with the GNU 00016 * GPL, and for taking advantage of the additional benefits of our 00017 * support services, please contact Systems in Motion about acquiring 00018 * a Coin Professional Edition License. 00019 * 00020 * See http://www.coin3d.org/ for more information. 00021 * 00022 * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY. 00023 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org 00024 * 00025 \**************************************************************************/ 00026 00027 #include <Inventor/SoPath.h> 00028 00029 class SoNode; 00030 class SoBaseKit; 00031 class SoSearchAction; 00032 00033 class COIN_DLL_API SoNodeKitPath : public SoPath { 00034 typedef SoPath inherited; 00035 00036 public: 00037 int getLength(void) const; 00038 SoNode * getTail(void) const; 00039 SoNode * getNode(const int idx) const; 00040 SoNode * getNodeFromTail(const int idx) const; 00041 void truncate(const int length); 00042 void pop(void); 00043 void append(SoBaseKit * childKit); 00044 void append(const SoNodeKitPath * fromPath); 00045 SbBool containsNode(SoBaseKit * node) const; 00046 int findFork(const SoNodeKitPath * path) const; 00047 00048 friend COIN_DLL_API int operator==(const SoNodeKitPath & p1, const SoNodeKitPath & p2); 00049 00050 protected: 00051 SoNodeKitPath(const int approxLength); 00052 virtual ~SoNodeKitPath(); 00053 00054 private: 00055 00056 static void clean(void); 00057 static SoSearchAction *searchAction; 00058 SoSearchAction *getSearchAction(void); 00059 00060 // these methods should not be used on an SoNodeKitPath 00061 void append(const int childIndex); 00062 void append(SoNode *childNode); 00063 void append(const SoPath *fromPath); 00064 void push(const int childIndex); 00065 int getIndex(const int i) const; 00066 int getIndexFromTail(const int i) const; 00067 void insertIndex(SoNode *parent,const int newIndex); 00068 void removeIndex(SoNode *parent,const int oldIndex); 00069 void replaceIndex(SoNode *parent,const int index,SoNode *newChild); 00070 }; 00071 00072 COIN_DLL_API int operator==(const SoNodeKitPath & p1, const SoNodeKitPath & p2); 00073 00074 #endif // !COIN_SONODEKITPATH_H
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Mon Feb 23 16:33:24 2009 for Coin by Doxygen. 1.5.8