Open Inventor Release 2025.1.0
 
Loading...
Searching...
No Matches
SoSeparator.h
1/*=======================================================================
2 * Copyright 1991-1996, Silicon Graphics, Inc.
3 * ALL RIGHTS RESERVED
4 *
5 * UNPUBLISHED -- Rights reserved under the copyright laws of the United
6 * States. Use of a copyright notice is precautionary only and does not
7 * imply publication or disclosure.
8 *
9 * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
10 * Use, duplication or disclosure by the Government is subject to restrictions
11 * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
12 * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
13 * in similar or successor clauses in the FAR, or the DOD or NASA FAR
14 * Supplement. Contractor/manufacturer is Silicon Graphics, Inc.,
15 * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
16 *
17 * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
18 * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
19 * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
20 * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
21 * GRAPHICS, INC.
22**=======================================================================*/
23/*=======================================================================
24** Author : Paul S. Strauss (MMM yyyy)
25** Modified by : Nick Thompson (MMM yyyy)
26**=======================================================================*/
27/*=======================================================================
28 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
29 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
30 *** ***
31 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
32 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
33 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
34 *** ***
35 *** RESTRICTED RIGHTS LEGEND ***
36 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
37 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
38 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
39 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
40 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
41 *** ***
42 *** COPYRIGHT (C) 1996-2024 BY FEI S.A.S, ***
43 *** BORDEAUX, FRANCE ***
44 *** ALL RIGHTS RESERVED ***
45**=======================================================================*/
46/*=======================================================================
47** Modified by : VSG (MMM YYYY)
48**=======================================================================*/
49
50
51#ifndef _SO_SEPARATOR_
52#define _SO_SEPARATOR_
53
54#include <Inventor/nodes/SoGroup.h>
55#include <Inventor/fields/SoSFEnum.h>
56#include <Inventor/fields/SoSFInt32.h>
57#include <Inventor/fields/SoMFInt32.h>
58#include <Inventor/SbPImpl.h>
59
60class SoBoundingBoxCache;
61class SoPrimitiveCountCache;
62
63#ifdef _MSC_VER
64#pragma warning( push )
65#pragma warning(disable:4251)
66#endif
67
69//
70// Class: SoSeparator
71//
72// Separator group node: state is saved before traversing children
73// and restored afterwards.
74//
76
77#include <Inventor/fields/SoSFBitMask.h>
78#include <Inventor/SbRenderUnitID.h>
79
80SO_PIMPL_PUBLIC_DECLARATION(SoSeparator)
81
82
178class SoSeparator : public SoGroup
179{
180 SO_NODE_HEADER(SoSeparator);
181 SO_PIMPL_PUBLIC_HEADER(SoSeparator)
182
183 public:
184
200
201#if 1 SoDEPRECATED
208#endif
209
215
221
227
233 DISABLE = 0x01,
234
239
244 };
245
253
280
285
289 SoSeparator(int nChildren);
290
291 private:
292 // Overrides default method on SoNode
293 virtual SbBool affectsState() const;
294
295 // Implement actions
296 virtual void doAction(SoAction *action);
297 virtual void callback(SoCallbackAction *action);
298 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
299 virtual void getMatrix(SoGetMatrixAction *action);
300 virtual void GLRender(SoGLRenderAction *action);
301 virtual void handleEvent(SoHandleEventAction *action);
302 virtual void rayPick(SoRayPickAction *action);
303 virtual void search(SoSearchAction *action);
304 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
305 virtual void clearCacheList();
306
307 // These methods make render traversal faster by implementing
308 // different rendering paths corresponding to different action
309 // path codes.
310 virtual void GLRenderBelowPath(SoGLRenderAction *action);
311 virtual void GLRenderInPath(SoGLRenderAction *action);
312 virtual void GLRenderOffPath(SoGLRenderAction *action);
313
314 private:
315 static void initClass();
316 static void exitClass();
317
318 SB_THREAD_TLS_HEADER();
319
320 virtual void notify(SoNotList *list);
321
327 SoBoundingBoxCache* getBoundingBoxCache() const
328 { return bboxCache; }
329
330#ifdef ADD_MFIELD_DEPLIST
331 SoMFInt32 renderUnitDependencies;
332#endif
333
335 void invalidateAllParentCaches();
336
338 void invalidateAllChildrenCaches();
339
340private:
341 // Returns TRUE if this separator can be culled because it is
342 // outside the cull volume. The cullResults flags come from the
343 // GLRenderAction->getCullTestResults() method, and track the
344 // results of previous cull tests to save work when we know we're
345 // completely inside the view volume.
346 virtual SbBool cullTest(SoGLRenderAction *action, int &cullResults);
347
348 virtual SbBool readInstance(SoInput *in, unsigned short flags);
349
350 virtual ~SoSeparator();
351
352private:
353
354 SoBoundingBoxCache* bboxCache; // Cache for bounding boxes
355
356 SoPrimitiveCountCache *primCountCache; // Cache for primitive count
357
358 SbBool bboxCacheIsOpen;
359
360 // bba is in thread local storage now.
361 struct MTstruct {
363 };
364
365 void commonConstructor();
366
367 float m_depthOffsetCachedValue;
368
369#if 1 SoDEPRECATED
378 SoSFEnum directVizCaching;
379#endif
380};
381
382#ifdef _MSC_VER
383#pragma warning( pop )
384#endif
385
386#endif /* _SO_SEPARATOR_ */
387
388
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
Computes transformation matrix for a subgraph.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
SoGroup()
Creates an empty group node.
Allows nodes in a graph to receive input events.
Used to read Open Inventor data files.
Definition SoInput.h:363
Multiple-value field containing any number of int32_t integers.
Definition SoMFInt32.h:88
friend class SoAction
Definition SoNode.h:472
friend class SoCallbackAction
Definition SoNode.h:478
Intersects objects with a ray cast into scene.
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a int32_t integer.
Definition SoSFInt32.h:80
Searches for nodes in a scene graph.
Group node that saves and restores traversal state.
SoSFEnum boundingBoxCaching
Whether to cache during bounding box traversal.
CacheEnabled
Possible values for caching.
@ ON
Always try to build a cache.
@ OFF
Never build a cache.
@ AUTO
Decide whether to cache based on some heuristic.
SoSFEnum renderCulling
Whether to cull during rendering traversal.
FastEditing
Fast editing policy enumeration values.
@ KEEP_ZBUFFER
This SoSeparator node has a Fast Edit behavior and the children nodes are drawn considering the depth...
@ CLEAR_ZBUFFER
This SoSeparator node has a Fast Edit behavior and the children nodes are drawn after the depth Buffe...
@ DISABLE
This SoSeparator node doesn't have Fast Edit behavior.
SoSFEnum fastEditing
Specifies the fast edit mode of the separator node.
SoDEPRECATED SoSFEnum renderCaching
Whether to cache during rendering traversal.
SoSeparator()
Creates a separator node with default settings.
SoSFEnum pickCulling
Whether to cull during picking traversal.
SoSFInt32 renderUnitId
Used during the ScaleViz depth compositing process, this field specifies which render unit (OIRU) wil...
SoSeparator(int nChildren)
Constructor that takes approximate number of children.
int SbBool
Boolean type.
Definition SbBase.h:87