1SoMFVec2f(3IV)()                                              SoMFVec2f(3IV)()
2
3
4

NAME

6       SoMFVec2f  —  multiple-value  field containing any number of two-dimen‐
7       sional vectors
8

INHERITS FROM

10       SoField > SoMField > SoMFVec2f
11

SYNOPSIS

13       #include <Inventor/fields/SoMFVec2f.h>
14
15          Methods from class SoMFVec2f:
16
17     void                setValues(int start, int num, const float xy[][2])
18     void                set1Value(int index, float x, float y)
19     void                set1Value(int index, const float xy[2])
20     void                setValue(float x, float y)
21     void                setValue(const float xy[2])
22     static SoType       getClassTypeId()
23     virtual void        getTypeId() const
24     const SbVec2f &     operator [](int i) const
25     const SbVec2f *     getValues(int start) const
26     int                 find(const SbVec2f &  targetValue,  SbBool  addIfNot‐
27                              Found = FALSE)
28     void                setValues(int  start, int num, const SbVec2f *newVal‐
29                              ues)
30     void                set1Value(int index, const SbVec2f & newValue)
31     const SbVec2f &     operator =(const SbVec2f & newValue)
32     void                setValue(const SbVec2f & newValue)
33     int                 operator ==(const SoMFVec2f &f) const
34     int                 operator !=(const SoMFVec2f &f) const
35     SbVec2f *           startEditing()
36     void                finishEditing()
37
38          Methods from class SoMField:
39
40     int                 getNum() const
41     void                setNum(int num)
42     virtual void        deleteValues(int start, int num = -1)
43     virtual void        insertSpace(int start, int num)
44     SbBool              set1(int index, const char *valueString)
45     void                get1(int index, SbString &valueString)
46
47          Methods from class SoField:
48
49     void                setIgnored(SbBool ignore)
50     SbBool              isIgnored() const
51     SbBool              isDefault() const
52     virtual SbBool      isOfType(SoType type) const
53     SbBool              set(const char *valueString)
54     void                get(SbString &valueString)
55     void                touch()
56     SbBool              connectFrom(SoField *fromField)
57     SbBool              connectFrom(SoEngineOutput *fromEngine)
58     void                disconnect()
59     SbBool              isConnected() const
60     SbBool              isConnectedFromField() const
61     SbBool              getConnectedField(SoField *&writingField) const
62     SbBool              isConnectedFromEngine() const
63     SbBool              getConnectedEngine(SoEngineOutput     *&engineOutput)
64                              const
65     void                enableConnection(SbBool flag)
66     SbBool              isConnectionEnabled() const
67     int                 getForwardConnections(SoFieldList &list) const
68     SoFieldContainer *  getContainer() const
69
70

DESCRIPTION

72       A multiple-value field that contains any number of two-dimensional vec‐
73       tors.
74
75       SoMFVec2fs are written to file as one or more pairs of  floating  point
76       values  separated  by  whitespace. When more than one value is present,
77       all of the values are enclosed in square brackets and separated by com‐
78       mas; for example:
79
80          [ 0 0, 1.2 3.4, 98.6 -4e1 ]
81
82
83

METHODS

85     void                setValues(int start, int num, const float xy[][2])
86          Sets  num values starting at index start to the given floating point
87          values. There must be num*2 values in the passed array.
88
89     void                set1Value(int index, float x, float y)
90     void                set1Value(int index, const float xy[2])
91          Set the index'th value to the given floating point values.
92
93     void                setValue(float x, float y)
94     void                setValue(const float xy[2])
95          Sets the field to contain the given value and only the  given  value
96          (if the array had multiple values before, they are deleted).
97
98     static SoType       getClassTypeId()
99     virtual void        getTypeId() const
100          Returns  the  type  for  this  class  or a particular object of this
101          class.
102
103     const SbVec2f &     operator [](int i) const
104          Returns the i'th value of the field. Indexing past the  end  of  the
105          field (passing in i greater than getNum()) will return garbage.
106
107     const SbVec2f *     getValues(int start) const
108          Returns a pointer into the array of values in the field, starting at
109          index start. The values are read-only; see  the  startEditing()/fin‐
110          ishEditing() methods for a way of modifying values in place.
111
112     int                 find(const  SbVec2f  &  targetValue, SbBool addIfNot‐
113                              Found = FALSE)
114          Finds the given value in the array and returns  the  index  of  that
115          value  in  the  array. If the value is not found, -1 is returned. If
116          addIfNotFound is set, then targetValue is added to the  end  of  the
117          array (but -1 is still returned).
118
119     void                setValues(int  start, int num, const SbVec2f *newVal‐
120                              ues)
121          Sets num values starting at index start to the values in  newValues.
122          The array will be automatically be made larger to accomodate the new
123          values, if necessary.
124
125     void                set1Value(int index, const SbVec2f & newValue)
126          Sets the index'th value in the array to newValue. The array will  be
127          automatically expanded, if necessary.
128
129     const SbVec2f &     operator =(const SbVec2f & newValue)
130     void                setValue(const SbVec2f & newValue)
131          Sets  the first value in the array to newValue, and deletes the sec‐
132          ond and subsequent values.
133
134     int                 operator ==(const SoMFVec2f &f) const
135     int                 operator !=(const SoMFVec2f &f) const
136          Returns TRUE if all of the values of this field equal (do not equal)
137          those  of  the  given field. If the fields are different types FALSE
138          will always be returned (even if one field is an SoMFFloat with  one
139          value  of  1.0  and  the  other is an SoMFInt with a value of 1, for
140          example).
141
142     SbVec2f *           startEditing()
143     void                finishEditing()
144          startEditing() returns a pointer to the internally-maintained  array
145          that  can  be  modified. The values in the array may be changed, but
146          values cannot be added or removed. It is illegal to call  any  other
147          editing  methods  between  startEditing()  and finishEditing() (e.g.
148          set1Value(), setValue(), etc).
149
150          Fields, engines or sensors connected to this field and  sensors  are
151          not  notified  that  this field has changed until finishEditing() is
152          called. Calling finishEditing() always sets the isDefault() flag  to
153          FALSE  and  informs engines and sensors that the field changed, even
154          if none of the values actually were changed.
155
156
157
158
159                                                              SoMFVec2f(3IV)()
Impressum