Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoMFInstanceParameter.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2023 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : David Beilloin (Aug 2013)
22**=======================================================================*/
23
24#ifndef _SO_MF_INSTANCE_PARAMETER_
25#define _SO_MF_INSTANCE_PARAMETER_
26
27#include <Inventor/fields/SoSubField.h>
28#include <Inventor/nodes/SoInstanceParameter.h>
29
30
55
56 SO_MFIELD_REQUIRED_HEADER(SoMFInstanceParameter);
57 SO_MFIELD_CONSTRUCTOR_HEADER(SoMFInstanceParameter);
59 SO_MFIELD_SETVALUESPOINTER_HEADER(SoInstanceParameter *);
60
61public:
66
75 size_t nbValues,
76 uint32_t divisor = 1,
78
87 size_t nbValues,
88 uint32_t divisor = 1,
90
100 size_t nbValues,
101 uint32_t divisor = 1,
103
112 size_t nbValues,
113 uint32_t divisor = 1,
115
124 size_t nbValues,
125 uint32_t divisor = 1,
127
136 size_t nbValues,
137 uint32_t divisor = 1,
139
148 size_t nbValues,
149 uint32_t divisor = 1,
151
157
169
172
173 private:
174 static void initClass();
175 static void exitClass();
176
177 // Update a copied field to use the copy of each uniform shader parameter if there is one
178 virtual void fixCopy(SbBool copyConnections);
179
180 // Override this to also check the stored uniform shader parameters
181 virtual SbBool referencesCopy() const;
182
183private:
184 // Override this to maintain write-references in uniform shader parameters
185 virtual void countWriteRefs(SoOutput *out) const;
186
187 // Changes value in field without doing other notification stuff.
188 // Keeps track of references and auditors.
189 void setVal(int index, SoInstanceParameter *newValue);
190
194 static bool hasGivenName(SbString name, const SoShaderParameter* param);
195
196 SoInstanceParameter** m_oldValues;
197 int m_oldNum;
198};
199
200
201#endif /* _SO_MF_INSTANCE_PARAMETER_ */
Color vector class.
Definition SbColor.h:82
Class for representing a rotation.
Definition SbRotation.h:126
Class for smart character strings.
Definition SbString.h:202
3D vector class.
Definition SbVec.h:932
4D vector class.
Definition SbVec.h:2214
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Per-instance par...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Multiple-value f...
SoInstanceParameter * setVisibilities(int32_t *values, size_t nbValues, uint32_t divisor=1, SoMemoryObject::CopyPolicy policy=SoMemoryObject::NO_COPY)
Sets the value of this parameter from the input array.
SoInstanceParameter * setScales(SbVec3f *values, size_t nbValues, uint32_t divisor=1, SoMemoryObject::CopyPolicy policy=SoMemoryObject::NO_COPY)
Sets the value of this parameter from the input array.
SoInstanceParameter * setRotations(SbVec4f *values, size_t nbValues, uint32_t divisor=1, SoMemoryObject::CopyPolicy policy=SoMemoryObject::NO_COPY)
Sets the value of this parameter from the input array.
SoInstanceParameter * setTransparencies(float *values, size_t nbValues, uint32_t divisor=1, SoMemoryObject::CopyPolicy policy=SoMemoryObject::NO_COPY)
Sets the value of this parameter from the input array.
SoInstanceParameter * setTranslations(SbVec3f *values, size_t nbValues, uint32_t divisor=1, SoMemoryObject::CopyPolicy policy=SoMemoryObject::NO_COPY)
Sets the value of this parameter from the input array.
SoInstanceParameter * setColors(SbColor *values, size_t nbValues, uint32_t divisor=1, SoMemoryObject::CopyPolicy policy=SoMemoryObject::NO_COPY)
Sets the value of this parameter from the input array.
SoInstanceParameter * findParameterByName(const SbString &name) const
Returns the first parameter with the specified name.
SoInstanceParameter ** startEditing()
Returns a pointer to the internally maintained array that can be modified.
void finishEditing()
Indicates that batch edits have finished.
SoInstanceParameter * setRotations(SbRotation *values, size_t nbValues, uint32_t divisor=1, SoMemoryObject::CopyPolicy policy=SoMemoryObject::NO_COPY)
Sets the value of this parameter from the input array.
bool removeParameterByName(const SbString &name)
Remove the instance parameter with the specified name.
Base class for all multiple-valued fields.
Definition SoMField.h:134
CopyPolicy
SoMemoryObject may be manipulating large amounts of memory.
@ NO_COPY
Passed buffer used, user will delete.
Used to write Open Inventor data files.
Definition SoOutput.h:186
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
int SbBool
Boolean type.
Definition SbBase.h:87