Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoArray.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**=======================================================================*/
26/*=======================================================================
27 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
28 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
29 *** ***
30 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
31 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
32 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
33 *** ***
34 *** RESTRICTED RIGHTS LEGEND ***
35 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
36 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
37 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
38 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
39 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
40 *** ***
41 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, ***
42 *** BORDEAUX, FRANCE ***
43 *** ALL RIGHTS RESERVED ***
44**=======================================================================*/
45/*=======================================================================
46** Modified by : VSG (MMM YYYY)
47**=======================================================================*/
48
49
50#ifndef _SO_ARRAY_
51#define _SO_ARRAY_
52
53#include <Inventor/fields/SoSFEnum.h>
54#include <Inventor/fields/SoSFShort.h>
55#include <Inventor/fields/SoSFVec3f.h>
56#include <Inventor/nodes/SoGroup.h>
57#include <Inventor/nodes/SoTranslation.h>
58
60//
61// Class: SoArray
62//
63// Array group node: creates an IxJxK array. Each element in the
64// array is drawn by traversing all of the children of this node,
65// saving and restoring state before and after each element. I, J,
66// and K are given by the numElements1, numElements2, and
67// numElements3 fields. The 3D vector separating the centers of
68// adjacent elements in each of the three directions is given by
69// separation1, separation2, and separation3. The origin field
70// indicates whether the array is positioned with the current
71// object-space origin at the center of the first element, the last
72// element, or at the center of all elements.
73//
75
127class SoArray : public SoGroup {
128
129 SO_NODE_HEADER(SoArray);
130
131 public:
132
133 // Fields
138
143
148
153
158
163
181
187
192
197 virtual SbBool affectsState() const;
198
199 private:
200 // Implement actions
201 virtual void doAction(SoAction *action);
202 virtual void callback(SoCallbackAction *action);
203 virtual void GLRender(SoGLRenderAction *action);
204 virtual void pick(SoPickAction *action);
205 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
206 virtual void handleEvent(SoHandleEventAction *action);
207 virtual void getMatrix(SoGetMatrixAction *action);
208 virtual void search(SoSearchAction *action);
209 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
210
211 private:
212 static void initClass();
213 static void exitClass();
214 virtual void notify( SoNotList* list );
215
216 private:
217 virtual ~SoArray();
218
219private:
220 SoRef<SoTranslation> m_globalTranslation;
221 std::vector<SoRef<SoTranslation> > m_translations;
222};
223
224#endif /* _SO_ARRAY_ */
225
Abstract base class for all actions.
Definition SoAction.h:132
Group node that creates a regular IxJxK array of copies of its children.
Definition SoArray.h:127
SoSFVec3f separation3
Separation vector in the 3rd dimension.
Definition SoArray.h:162
SoSFShort numElements3
Number of elements in the 3rd dimension.
Definition SoArray.h:147
SoSFShort numElements2
Number of elements in the 2nd dimension.
Definition SoArray.h:142
SoSFVec3f separation2
Separation vector in the 2nd dimension.
Definition SoArray.h:157
SoSFVec3f separation1
Separation vector in the 1st dimension.
Definition SoArray.h:152
virtual SbBool affectsState() const
Overrides default method on SoNode to return FALSE since arrays are effectively separators.
SoArray()
Creates an array node with default settings.
SoSFShort numElements1
Number of elements in the 1st dimension.
Definition SoArray.h:137
Origin
Array origin.
Definition SoArray.h:165
@ LAST
Last copy is rendered at the current local origin; all other copies are distributed relative to it.
Definition SoArray.h:179
@ CENTER
Copies are distributed relative to the center of the array.
Definition SoArray.h:174
@ FIRST
First copy is rendered at the current local origin; all other copies are distributed relative to it.
Definition SoArray.h:170
SoSFEnum origin
Defines the base point from which copies are distributed.
Definition SoArray.h:186
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.
Abstract base class for picking objects in a scene.
Smart pointer for any class inheriting SoRefCounter.
Definition SoRef.h:90
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a short integer.
Definition SoSFShort.h:81
Field containing a three-dimensional vector.
Definition SoSFVec3f.h:80
Searches for nodes in a scene graph.
int SbBool
Boolean type.
Definition SbBase.h:87