Array of MFloatPoint data type.
This class implements an array of MFloatPoints. Common convenience functions are available, and the implementation is compatible with the internal Maya implementation so that it can be passed efficiently between plugins and internal maya data structures.
- AbcExport/MayaMeshWriter.cpp, AbcImport/AlembicNode.cpp, AbcImport/MeshHelper.cpp, animCubeNode/animCubeNode.cpp, blindDataShader/blindDataMesh.cpp, gpuCache/CacheReaderAlembic.cpp, gpuCache/gpuCacheDrawOverride.cpp, gpuCache/gpuCacheUtil.h, hairCollisionSolver/hairCollisionSolver.cpp, hwPhongShader/hwPhongShader.cpp, intersectCmd/intersectCmd.cpp, meshOpCmd/meshOpFtyAction.cpp, polyPrimitiveCmd/polyPrimitiveCmd.cpp, sampleCmd/sampleCmd.cpp, sampleParticles/sampleParticles.cpp, shellNode/shellNode.cpp, sseDeformer/sseDeformer.cpp, testNobjectNode/testNobjectNode.cpp, testNpassiveNode/testNpassiveNode.cpp, testNucleusNode/testNucleusNode.cpp, threadedBoundingBox/threadedBoundingBox.cpp, uiDrawManager/uiDrawManager.cpp, and viewRenderOverride/viewRenderOverrideOperations.cpp.
|
| MFloatPointArray () |
| Default constructor. More...
|
|
| MFloatPointArray (const MFloatPointArray &other) |
| Copy constructor. More...
|
|
| MFloatPointArray (const MFloatPoint points[], unsigned int count) |
| NO SCRIPT SUPPORT. More...
|
|
| MFloatPointArray (const float points[][4], unsigned int count) |
| Create a new array of MFloatPoints and initialize it with the given elements. More...
|
|
| MFloatPointArray (const double points[][4], unsigned int count) |
| Create a new array of MFloatPoints and initialize it with the given elements. More...
|
|
| MFloatPointArray (unsigned int initialSize, const MFloatPoint &initialValue=MFloatPoint::origin) |
| Create a new array of MFloatPoints of a specified size and initialize all the elements with the given initial value. More...
|
|
| ~MFloatPointArray () |
| The class destructor.
|
|
const MFloatPoint & | operator[] (unsigned int index) const |
| Index operator. More...
|
|
MFloatPointArray & | operator= (const MFloatPointArray &other) |
| Assignment operator copies all of the elements of the other array into this one. More...
|
|
MStatus | set (const MFloatPoint &element, unsigned int index) |
| Sets the value of the indicated element to the indicated value. More...
|
|
MStatus | set (unsigned int index, float x, float y, float z=0, float w=1) |
| Sets the value of the indicated element to the indicated values. More...
|
|
MStatus | set (float element[4], unsigned int index) |
| Sets the value of the indicated element to the indicated value. More...
|
|
MStatus | set (double element[4], unsigned int index) |
| Sets the value of the indicated element to the indicated value. More...
|
|
MStatus | setLength (unsigned int length) |
| Set the length of the array. More...
|
|
unsigned int | length () const |
| Returns the number of elements in the instance. More...
|
|
MStatus | remove (unsigned int index) |
| Remove the array element at the given index. More...
|
|
MStatus | insert (const MFloatPoint &element, unsigned int index) |
| Inserts a new value into the array at the given index. More...
|
|
MStatus | append (const MFloatPoint &element) |
| Adds a new element to the end of the array. More...
|
|
MStatus | append (float x, float y, float z=0, float w=1) |
| Adds a new element to the end of the array. More...
|
|
MStatus | copy (const MFloatPointArray &source) |
| Copy the contents of the source array to this array. More...
|
|
MStatus | clear () |
| Clear the contents of the array. More...
|
|
MStatus | get (float[][4]) const |
| Copy the elements of the array into the C++ array of float arrays. More...
|
|
MStatus | get (double[][4]) const |
| Copy the elements of the array into the C++ array of double arrays. More...
|
|
void | setSizeIncrement (unsigned int newIncrement) |
| Set the size by which the array will be expanded whenever expansion is necessary. More...
|
|
unsigned int | sizeIncrement () const |
| Return the size by which the array will be expanded whenever expansion is necessary. More...
|
|
MFloatPoint & | operator[] (unsigned int index) |
| NO SCRIPT SUPPORT. More...
|
|
MStatus set |
( |
unsigned int |
index, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z = 0 , |
|
|
float |
w = 1 |
|
) |
| |
Sets the value of the indicated element to the indicated values.
The x component of the element is set to x, the y component to y, the z component to z, and the w component to w.
NOTE: This method does not grow the array if the index is out of bounds. Only a valid index should be used.
- Parameters
-
[in] | index | the index of the element that is to be set to the the new value |
[in] | x | the new value for the x component |
[in] | y | the new value for the y component |
[in] | z | the new value for the z component,defaulted to 0 |
[in] | w | the new value for the w component,defaulted to 1 |
- Returns
- MS::kSuccess if the value was set successfully and MS::kFailure otherwise
MStatus set |
( |
float |
val[4], |
|
|
unsigned int |
index |
|
) |
| |
Sets the value of the indicated element to the indicated value.
The x component of the element is set to val[0], the y component to val[1], the z component to val[2], and the w component to val[3].
NOTE: This method does not grow the array if the index is out of bounds. Only a valid index should be used.
- Parameters
-
[in] | val | the new value for the indicated element |
[in] | index | the index of the element that is to be set to the the new value |
- Returns
- MS::kSuccess if the value was set successfully and MS::kFailure otherwise
MStatus set |
( |
double |
val[4], |
|
|
unsigned int |
index |
|
) |
| |
Sets the value of the indicated element to the indicated value.
The x component of the element is set to val[0], the y component to val[1], the z component to val[2], and the w component to val[3].
NOTE: This method does not grow the array if the index is out of bounds. Only a valid index should be used.
- Parameters
-
[in] | val | the new value for the indicated element |
[in] | index | the index of the element that is to be set to the the new value |
- Returns
- MS::kSuccess if the value was set successfully and MS::kFailure otherwise
MStatus append |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z = 0 , |
|
|
float |
w = 1 |
|
) |
| |
Adds a new element to the end of the array.
The appended element has the indicated values for its x,y,z and w components. The x component of the element is set to x, the y component to y, the z component to z, and the w component to w.
If the array cannot be expanded in size by 1 element, then the append will fail and the existing array will remain unchanged.
- Parameters
-
[in] | x | the value for the x component |
[in] | y | the value for the y component |
[in] | z | the value for the z component, defaulted to 0 |
[in] | w | the value for the w component, defaulted to 1 |
- Returns
- MS::kSuccess if the append was successful and MS::kFailure otherwise
OPENMAYA_EXPORT std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const MFloatPointArray & |
array |
|
) |
| |
|
friend |
NO SCRIPT SUPPORT.
The format used is [0: [x, y, z, w], 1: [x, y, z, w], 2: [x, y, z, w], ...].
- Parameters
-
[in] | os | the ostream to print to |
[in] | array | the MFloatPointArray whose value is to be printed |
- Returns
- The ostream reference, s, provided as the first parameter.