1SoWWWInline(3IV)() SoWWWInline(3IV)()
2
3
4
6 SoWWWInline — node that refers to children through a URL
7
9 SoBase > SoFieldContainer > SoNode > SoWWWInline
10
12 #include <Inventor/nodes/SoWWWInline.h>
13
14 typedef void SoWWWInlineFetchURLCB(const SbString &url, void
15 *userData, SoWWWInline *node)
16
17 enum BboxVisibility {
18 SoWWWInline::NEVER Do not show bounding box
19 SoWWWInline::UNTIL_LOADED Show bounding box (if specified) until
20 data is loaded
21 SoWWWInline::ALWAYS Show bounding box along with data
22 }
23
24 Fields from class SoWWWInline:
25
26 SoSFString name
27 SoSFVec3f bboxCenter
28 SoSFVec3f bboxSize
29 SoSFNode alternateRep
30
31 Methods from class SoWWWInline:
32
33 SoWWWInline()
34 static SoType getClassTypeId()
35 void setFullURLName(const SbString &url)
36 const SbString & getFullURLName()
37 SoGroup * copyChildren() const
38 void requestURLData()
39 SbBool isURLDataRequested() const
40 SbBool isURLDataHere() const
41 void cancelURLDataRequest()
42 void setChildData(SoNode *urlData)
43 SoNode * getChildData() const
44 static void setFetchURLCallBack(SoWWWInlineFetchURLCB *f,
45 void *userData)
46 static void setBoundingBoxVisibility(BboxVisibility b)
47 static BboxVisibility getBoundingBoxVisibility()
48 static void setBoundingBoxColor(SbColor &c)
49 static const SbColor & getBoundingBoxColor()
50
51 Methods from class SoNode:
52
53 void setOverride(SbBool state)
54 SbBool isOverride() const
55 SoNode * copy(SbBool copyConnections = FALSE) const
56 virtual SbBool affectsState() const
57 static SoNode * getByName(const SbName &name)
58 static int getByName(const SbName &name, SoNodeList &list)
59
60 Methods from class SoFieldContainer:
61
62 void setToDefaults()
63 SbBool hasDefaultValues() const
64 SbBool fieldsAreEqual(const SoFieldContainer *fc) const
65 void copyFieldValues(const SoFieldContainer *fc, SbBool
66 copyConnections = FALSE)
67 SbBool set(const char *fieldDataString)
68 void get(SbString &fieldDataString)
69 virtual int getFields(SoFieldList &resultList) const
70 virtual SoField * getField(const SbName &fieldName) const
71 SbBool getFieldName(const SoField *field, SbName &fieldName)
72 const
73 SbBool isNotifyEnabled() const
74 SbBool enableNotify(SbBool flag)
75
76 Methods from class SoBase:
77
78 void ref()
79 void unref() const
80 void unrefNoDelete() const
81 void touch()
82 virtual SoType getTypeId() const
83 SbBool isOfType(SoType type) const
84 virtual void setName(const SbName &name)
85 virtual SbName getName() const
86
87
89 This node refers to children through a URL (Universal Resource Loca‐
90 tor). The application is responsible for actually fetching data from
91 the URL for an SoWWWInline node to display.
92
94 SoSFString name
95 Specifies the URL which the application should fetch as child data
96 to this node (e.g. "http://bogus.com/homeWorld.wrl.gz").
97
98 SoSFVec3f bboxCenter
99 Defines the center of the bounding box surrounding the URL child
100 data.
101
102 SoSFVec3f bboxSize
103 Defines the size of the bounding box surrounding the URL child data.
104
105 SoSFNode alternateRep
106 Specifies child data that can be used instead of fetching data from
107 the URL. On read, if this field is set and there is no fetch URL
108 callback registered, the alternateRep will be used as the child
109 data. Otherwise, it is the applications responsibility to set the
110 child data (see setChildData()).
111
112
114 SoWWWInline()
115 Creates an inline node with default settings.
116
117 static SoType getClassTypeId()
118 Returns type identifier for this class.
119
120 void setFullURLName(const SbString &url)
121 const SbString & getFullURLName()
122 If the name field contains a relative URL (e.g. "foo.wrl" instead of
123 "http://bogus.com/foo.wrl"), the inline cannot resolve the URL ref‐
124 erence. This method allows the application to tell the anchor what
125 it's full URL should be. getFullURLName() returns the fullURL set
126 here, or if not set, returns the contents of the name field.
127
128 SoGroup * copyChildren() const
129 Return a copy of the hidden children as a Group. The children are
130 set by the application through setChildData().
131
132 void requestURLData()
133 Request that URL data be fetched. This will invoke the application
134 callback to actually fetch the data and can be called before the
135 inline does this for itself (see setFetchURLCallBack()).
136
137 SbBool isURLDataRequested() const
138 SbBool isURLDataHere() const
139 Return whether URL data has been requested and whether that data is
140 here (i.e. whether setChildData() has been called.)
141
142 void cancelURLDataRequest()
143 Cancel the active URL data fetch request.
144
145 void setChildData(SoNode *urlData)
146 SoNode * getChildData() const
147 Set/get the child data the inline should display. The application
148 should set child data after it has fetched data for an inline node.
149
150 static void setFetchURLCallBack(SoWWWInlineFetchURLCB *f,
151 void *userData)
152 Application callbacks invoked when the inline needs its URL data
153 fetched. This happens the first time the inline is rendered, or if
154 it needs to compute a bounding box and the bboxSize field is not
155 set, or when requestURLData() is called.
156
157 static void setBoundingBoxVisibility(BboxVisibility b)
158 static BboxVisibility getBoundingBoxVisibility()
159 This allows the application to specify when bounding boxes are dis‐
160 played. The bounding box can be rendered along with the children
161 (ALWAYS), only until the child data is loaded (UNTIL_LOADED), or not
162 at all (NEVER). Default is UNTIL_LOADED
163
164 static void setBoundingBoxColor(SbColor &c)
165 static const SbColor & getBoundingBoxColor()
166 This allows the application to specify the color of bounding boxes
167 displayed.
168
169
171 SoGLRenderAction
172 This renders the child data if it has been set by the application.
173 It will render a wireframe bounding box as specified by the bboxCen‐
174 ter and bboxSize fields, and the setting passed to setBounding‐
175 BoxVisibility(). If no fetch URL callback is set and the alter‐
176 nateRep is not NULL, the alternateRep will be rendered until child
177 data has been set.
178
179
181 WWWInline {
182 name "<Undefined file>"
183 bboxCenter 0 0 0
184 bboxSize 0 0 0
185 alternateRep NULL
186 }
187
189 SoWWWAnchor, SoFile
190
191
192
193
194 SoWWWInline(3IV)()