| 1 |
NAME SoMFRotation SoMRotation "" { |
| 2 |
Multiple-value field containing any number of SbRotations. |
| 3 |
} |
| 4 |
|
| 5 |
INCLUDE fields/SoMFRotation.h |
| 6 |
|
| 7 |
DESC { |
| 8 |
multiple-value field that contains any number of SbRotations. |
| 9 |
\p |
| 10 |
\cSoMFRotations\. are written to file as one or more sets of four |
| 11 |
floating point values. Each set of 4 values is an axis of rotation |
| 12 |
followed by the amount of right-handed rotation about that axis, in |
| 13 |
radians. |
| 14 |
\p |
| 15 |
When more than one value is present, all of the |
| 16 |
values are enclosed in square brackets and separated by commas; for |
| 17 |
example: |
| 18 |
\b |
| 19 |
[ 1 0 0 0, -.707 -.707 0 1.57 ] |
| 20 |
\. |
| 21 |
} |
| 22 |
METHOD Set1AxisAngle void |
| 23 |
set1Value(int index, const SbVec3f &axis, float angle) { |
| 24 |
Sets the \aindex\.'th value to the given axis/angle. |
| 25 |
} |
| 26 |
METHOD SetAxisAngle void setValue(const SbVec3f &axis, float angle) { |
| 27 |
Makes this field have exactly one value, given by \aaxis\. and \aangle\.. |
| 28 |
} |
| 29 |
METHOD Set1Q_U_A_T void |
| 30 |
set1Value(int index, float q0, float q1, float q2, float q3) {} |
| 31 |
METHOD Set1Quat void set1Value(int index, const float q[4]) { |
| 32 |
Sets the \aindex\.'th value to the given quaternion. |
| 33 |
} |
| 34 |
METHOD SetQ_U_A_T void setValue(float q0, float q1, float q2, float q3) {} |
| 35 |
METHOD SetQuat void setValue(float q[4]) { |
| 36 |
Makes this field have exactly one value, given by the quaternion. |
| 37 |
} |
| 38 |
ALSO { SbRotation } |
| 39 |
METHOD "" static SoType getClassTypeId() {} |
| 40 |
METHOD "" virtual void getTypeId() const { |
| 41 |
Returns the type for this class or a particular object of this class. |
| 42 |
} |
| 43 |
METHOD Get const SbRotation & operator [\|](int i) const { |
| 44 |
Returns the \ai\.'th value of the field. Indexing past the end of the |
| 45 |
field (passing in \ai\. greater than \mgetNum()\.) will return garbage. |
| 46 |
} |
| 47 |
METHOD GetN const SbRotation * getValues(int start) const { |
| 48 |
Returns a pointer into the array of values in the field, starting at |
| 49 |
index \astart\.. The values are read-only; see the |
| 50 |
\mstartEditing()\./\mfinishEditing()\. methods for a way of modifying values |
| 51 |
in place. |
| 52 |
} |
| 53 |
METHOD "" int find(const SbRotation & targetValue, |
| 54 |
SbBool addIfNotFound = FALSE) { |
| 55 |
Finds the given value in the array and returns the index of that value |
| 56 |
in the array. If the value is not found, -1 is returned. If |
| 57 |
\aaddIfNotFound\. is set, then \atargetValue\. is added to the end of the |
| 58 |
array (but -1 is still returned). |
| 59 |
} |
| 60 |
METHOD SetQuats void setValues(int start, int num, |
| 61 |
const SbRotation *newValues) { |
| 62 |
Sets \anum\. values starting at index \astart\. to the values in \anewValues\.. |
| 63 |
The array will be automatically be made larger to accomodate the new |
| 64 |
values, if necessary. |
| 65 |
} |
| 66 |
METHOD Set1 void set1Value(int index, const SbRotation & newValue) { |
| 67 |
Sets the \aindex\.'th value in the array to \anewValue\.. The array will be |
| 68 |
automatically expanded, if necessary. |
| 69 |
} |
| 70 |
METHOD " " const SbRotation & operator =(const SbRotation & newValue) {} |
| 71 |
METHOD Set void setValue(const SbRotation & newValue) { |
| 72 |
Sets the first value in the array to \anewValue\., and deletes the second |
| 73 |
and subsequent values. |
| 74 |
} |
| 75 |
METHOD IsEq int operator ==(const SoMFRotation &f) const {} |
| 76 |
METHOD IsNEq int operator !=(const SoMFRotation &f) const { |
| 77 |
Returns TRUE if all of the values of this field equal (do not |
| 78 |
equal) those of the given field. If the fields are different types FALSE will |
| 79 |
always be returned (even if one field is an \cSoMFFloat\. with one |
| 80 |
value of 1.0 and the other is an \cSoMFInt\. with a value of 1, for |
| 81 |
example). |
| 82 |
} |
| 83 |
METHOD StartEdit SbRotation *startEditing() {} |
| 84 |
METHOD FinishEdit void finishEditing() { |
| 85 |
\mstartEditing()\. returns a pointer to the internally-maintained array that |
| 86 |
can be modified. The values in the array may be changed, but values cannot |
| 87 |
be added or removed. It is illegal to call any other editing methods between |
| 88 |
\+\mstartEditing()\. and \mfinishEditing()\. (e.g. |
| 89 |
\mset1Value()\., \msetValue()\., etc).\.\-\mStartEdit()\. and \mFinishEdit()\. |
| 90 |
(e.g. \mSet1()\., \mSet()\., etc).\. |
| 91 |
\p |
| 92 |
Fields, engines or sensors connected to this field and sensors are not |
| 93 |
notified that this field has changed until |
| 94 |
\+\mfinishEditing()\.\.\-\mFinishEdit()\.\. is called. Calling |
| 95 |
\+\mfinishEditing()\.\.\-\mFinishEdit()\.\. always sets the |
| 96 |
\+\misDefault()\.\.\-\mIsDflt\.\. flag to FALSE and informs |
| 97 |
engines and sensors that the field changed, even if none of the values |
| 98 |
actually were changed. |
| 99 |
} |