Open Inventor Release 2024.1.2
 
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-2022 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
198 AUTO
199 };
200
201#if 1 SoDEPRECATED
208#endif
215
221
227
233 DISABLE = 0x01,
234
238 KEEP_ZBUFFER = 0x02,
239
243 CLEAR_ZBUFFER = 0x03
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
337private:
338 // Returns TRUE if this separator can be culled because it is
339 // outside the cull volume. The cullResults flags come from the
340 // GLRenderAction->getCullTestResults() method, and track the
341 // results of previous cull tests to save work when we know we're
342 // completely inside the view volume.
343 virtual SbBool cullTest(SoGLRenderAction *action, int &cullResults);
344
345 virtual SbBool readInstance(SoInput *in, unsigned short flags);
346
347 virtual ~SoSeparator();
348
349private:
350
351 SoBoundingBoxCache* bboxCache; // Cache for bounding boxes
352
353 SoPrimitiveCountCache *primCountCache; // Cache for primitive count
354
355 SbBool bboxCacheIsOpen;
356
357 // bba is in thread local storage now.
358 struct MTstruct {
360 };
361
362 void commonConstructor();
363
364 float m_depthOffsetCachedValue;
365
366#if 1 SoDEPRECATED
375 SoSFEnum directVizCaching;
376#endif
377};
378
379#ifdef _MSC_VER
380#pragma warning( pop )
381#endif
382
383#endif /* _SO_SEPARATOR_ */
384
385
Abstract base class for all actions.
Definition SoAction.h:132
Performs a generic traversal of a scene graph or path.
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...
Base class for all group nodes.
Definition SoGroup.h:122
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
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.
SoSFEnum renderCulling
Whether to cull during rendering traversal.
FastEditing
Fast editing policy enumeration values.
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