00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 #ifndef _SO_VRMLPARENT_
00052 #define _SO_VRMLPARENT_
00053
00054 #include <Inventor/nodes/SoGroup.h>
00055 #include <Inventor/misc/SoChildList.h>
00056 #include <Inventor/fields/SoMFNode.h>
00057 #include <Inventor/fields/SoSFNode.h>
00058 #include <Inventor/fields/SoSFVec3f.h>
00059
00060 #if defined(OIV_IGNORE_VRML_DEPRECATED)
00061 #include <SoDeprecationRules.h>
00062 #pragma push_macro("SoDEPRECATED_CLASS")
00063 #pragma push_macro("SoDEPRECATED_TYPEDEF")
00064 #undef SoDEPRECATED_CLASS
00065 #undef SoDEPRECATED_TYPEDEF
00066 #define SoDEPRECATED_CLASS(x,y)
00067 #define SoDEPRECATED_TYPEDEF(x,y)
00068 #endif
00069
00071
00072
00073
00074
00075
00077
00078 class SoDEPRECATED SoVRMLParent : public SoGroup {
00117
00118 SO_NODE_ABSTRACT_HEADER(SoVRMLParent);
00119
00120 public:
00125 SoMFNode children;
00130 SoSFNode metadata;
00140 SoSFVec3f bboxCenter;
00145 SoSFVec3f bboxSize;
00146
00147
00148
00149 virtual SbBool affectsState() const;
00150
00154 virtual void addChild(SoNode *child);
00155
00159 virtual void insertChild(SoNode *child, int newChildIndex);
00160
00164 virtual SoNode * getChild(int index) const;
00165
00169 virtual int findChild(const SoNode *child) const;
00170
00174 virtual int getNumChildren() const;
00175
00179 virtual void removeChild(int index);
00180
00184 virtual void removeChild(SoNode *child)
00185 { removeChild(findChild(child)); }
00186
00190 virtual void removeAllChildren();
00191
00195 virtual void replaceChild(int index, SoNode *newChild);
00196
00200 virtual void replaceChild(SoNode *oldChild, SoNode *newChild)
00201 { replaceChild(findChild(oldChild), newChild); }
00202
00203
00204 virtual SoChildList *getChildren() const;
00205
00206 private:
00207
00208 virtual void search(SoSearchAction *action);
00209 virtual void doAction(SoAction *action);
00210 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
00211
00212 private:
00213 static void initClass();
00214 static void exitClass();
00215
00216
00217 virtual SbBool validateNewFieldValue(SoField *pField,
00218 void *newValue);
00219
00220
00221 virtual void internalRemoveChild( int index ) { removeChild(index); }
00222 virtual void internalRemoveChild( SoNode *child ) { removeChild(findChild(child)); }
00223 virtual void internalRemoveAllChildren() { removeAllChildren(); }
00224 virtual void internalAddChild( SoNode *child ) { addChild(child); }
00225 virtual int internalFindChild( const SoNode *child ) const { return findChild(child); }
00226 virtual void internalInsertChild( SoNode *child, int newChildIndex ) { insertChild(child, newChildIndex); }
00227 virtual SoNode *internalGetChild( int index) const { return getChild(index); }
00228 virtual void internalReplaceChild( int index, SoNode *newChild) { replaceChild(index, newChild); }
00229 virtual void internalReplaceChild( SoNode *oldChild, SoNode *newChild) { replaceChild(oldChild,newChild); }
00230
00231
00232 virtual void copyContents(const SoFieldContainer *fromFC,
00233 SbBool copyConnections);
00234
00235 private:
00236 SoMFNode addChildren;
00237 SoMFNode removeChildren;
00238 void processAddChildren();
00239 void processRemoveChildren();
00240
00241 SoVRMLParent();
00242
00243 SoVRMLParent(int nChildren);
00244 virtual ~SoVRMLParent();
00245
00246 virtual void notify(SoNotList *);
00247
00248
00249 virtual SbBool readInstance(SoInput *in, unsigned short flags);
00250
00251 int internalSetValue;
00252
00253 };
00254
00255
00256
00257 #if defined(OIV_IGNORE_VRML_DEPRECATED)
00258 #pragma pop_macro("SoDEPRECATED_TYPEDEF")
00259 #pragma pop_macro("SoDEPRECATED_CLASS")
00260 #endif
00261
00262 #endif
00263