![]() |
http://www.sim.no http://www.coin3d.org |
00001 /**************************************************************************\ 00002 * 00003 * This file is part of the Coin 3D visualization library. 00004 * Copyright (C) 1998-2007 by Systems in Motion. All rights reserved. 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * ("GPL") version 2 as published by the Free Software Foundation. 00009 * See the file LICENSE.GPL at the root directory of this source 00010 * distribution for additional information about the GNU GPL. 00011 * 00012 * For using Coin with software that can not be combined with the GNU 00013 * GPL, and for taking advantage of the additional benefits of our 00014 * support services, please contact Systems in Motion about acquiring 00015 * a Coin Professional Edition License. 00016 * 00017 * See http://www.coin3d.org/ for more information. 00018 * 00019 * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY. 00020 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org 00021 * 00022 \**************************************************************************/ 00023 00024 #ifndef COIN_SOVRMLINLINE_H 00025 #define COIN_SOVRMLINLINE_H 00026 00027 #include <Inventor/nodes/SoSubNode.h> 00028 #include <Inventor/nodes/SoNode.h> 00029 #include <Inventor/fields/SoSFVec3f.h> 00030 #include <Inventor/fields/SoMFString.h> 00031 00032 #ifndef COIN_INTERNAL 00033 #include <Inventor/actions/SoCallbackAction.h> 00034 #endif // !COIN_INTERNAL 00035 00036 class SbColor; 00037 class SoVRMLInline; 00038 class SoVRMLInlineP; 00039 class SoGroup; 00040 class SoSensor; 00041 00042 typedef void SoVRMLInlineFetchURLCB(const SbString &, void *, SoVRMLInline *); 00043 00044 class COIN_DLL_API SoVRMLInline : public SoNode 00045 { 00046 typedef SoNode inherited; 00047 SO_NODE_HEADER(SoVRMLInline); 00048 00049 public: 00050 static void initClass(void); 00051 SoVRMLInline(void); 00052 00053 enum BboxVisibility { 00054 NEVER, 00055 UNTIL_LOADED, 00056 ALWAYS 00057 }; 00058 00059 SoSFVec3f bboxCenter; 00060 SoSFVec3f bboxSize; 00061 SoMFString url; 00062 00063 void setFullURLName(const SbString & url); 00064 const SbString & getFullURLName(void); 00065 00066 SoGroup * copyChildren(void) const; 00067 void requestURLData(void); 00068 SbBool isURLDataRequested(void) const; 00069 SbBool isURLDataHere(void) const; 00070 00071 void cancelURLDataRequest(void); 00072 void setChildData(SoNode * urlData); 00073 SoNode * getChildData(void) const; 00074 00075 static void setFetchURLCallBack(SoVRMLInlineFetchURLCB * f, void * closure); 00076 static void setBoundingBoxVisibility(BboxVisibility b); 00077 static BboxVisibility getBoundingBoxVisibility(void); 00078 static void setBoundingBoxColor(SbColor & color); 00079 static SbColor & getBoundingBoxColor(void); 00080 static void setReadAsSoFile(SbBool enable); 00081 static SbBool getReadAsSoFile(void); 00082 00083 virtual void doAction(SoAction * action); 00084 virtual void callback(SoCallbackAction * action); 00085 virtual void GLRender(SoGLRenderAction * action); 00086 virtual void getBoundingBox(SoGetBoundingBoxAction * action); 00087 virtual void getMatrix(SoGetMatrixAction * action); 00088 virtual void handleEvent(SoHandleEventAction * action); 00089 virtual void search(SoSearchAction * action); 00090 virtual void pick(SoPickAction * action); 00091 virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action); 00092 virtual SoChildList * getChildren(void) const; 00093 00094 protected: 00095 virtual ~SoVRMLInline(); 00096 00097 private: 00098 virtual void addBoundingBoxChild(SbVec3f center, SbVec3f size); 00099 virtual SbBool readInstance(SoInput * in, unsigned short flags); 00100 virtual void copyContents(const SoFieldContainer * from, SbBool copyconn); 00101 virtual SbBool readLocalFile(SoInput * in); 00102 00103 static void urlFieldModified(void * userdata, SoSensor * sensor); 00104 00105 SoVRMLInlineP * pimpl; 00106 }; 00107 00108 #endif // ! COIN_SOVRMLINLINE_H
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Mon Feb 23 16:33:36 2009 for Coin by Doxygen. 1.5.8