C++ API Reference
MTrimBoundaryArray Class Reference

An array class for trim boundaries. More...

#include <MTrimBoundaryArray.h>

Public Member Functions

 MTrimBoundaryArray ()
 Default constructor. More...
 
 MTrimBoundaryArray (const MTrimBoundaryArray &other)
 Copy Constructor. More...
 
 ~MTrimBoundaryArray ()
 Class destructor.
 
MStatus reserve (unsigned int length)
 This method is used to reserve the capacity of the array. More...
 
unsigned int length () const
 This method returns the length of the trim boundary array.
 
unsigned int size () const
 This method returns the size of the trim boundary array. More...
 
const MObjectArrayoperator[] (unsigned int index) const
 The index operator. More...
 
const MObjectArrayget (unsigned int index) const
 The method returns the MObjectArray specified by the index. More...
 
MStatus set (const MObjectArray &boundary, unsigned int index)
 This method is used to replace an existing boundary array. More...
 
MStatus insert (const MObjectArray &boundary, unsigned int index)
 This method adds a new boundary into the "index" position. More...
 
MStatus append (const MObjectArray &boundary)
 Add a new boundary array at the end of the list. More...
 
MStatus remove (unsigned int index)
 This method removes an existing boundary from the list. More...
 
MStatus clear ()
 This method clears the trim boundary array. More...
 
MObject getMergedBoundary (unsigned int index, MStatus *status=NULL) const
 This function create a curve that represent all curves of the boundary. More...
 
Iterator begin ()
 Returns an iterator object pointed to the beginning of the array. More...
 
Iterator end ()
 Returns an iterator object pointed to the end of the array. More...
 
ConstIterator begin () const
 Returns a const iterator object pointed to the beginning of the array. More...
 
ConstIterator end () const
 Returns a const iterator object pointed to the end of the array. More...
 
ConstIterator cbegin () const
 Returns a const iterator object pointed to the beginning of the array. More...
 
ConstIterator cend () const
 Returns a const iterator object pointed to the end of the array. More...
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 

Detailed Description

An array class for trim boundaries.

This class implements an array of MObjectArray objects. Each MObjectArray is a collection of curves (edges, in fact) that represent a trim boundary.

This class owns all of the MObjectArrays in the class. It doesn't hold a reference to any other MObjectArray.

Examples:
AbcExport/MayaNurbsSurfaceWriter.cpp, AbcImport/NurbsSurfaceHelper.cpp, and gpuCache/CacheReaderAlembic.cpp.

Constructor & Destructor Documentation

OPENMAYA_MAJOR_NAMESPACE_OPEN MTrimBoundaryArray ( )

Default constructor.

The instance is set to contain no elements.

Copy Constructor.

Parameters
[in]otherthe array with which to initialize this instance

Member Function Documentation

MStatus reserve ( unsigned int  reserveLength)

This method is used to reserve the capacity of the array.

Parameters
[in]reserveLengththe number of items to reserve
Returns
MS::kSuccess if the reserve worked and MS::kFailure otherwise
unsigned int size ( ) const

This method returns the size of the trim boundary array.

The size and the length are the same.

const MObjectArray & operator[] ( unsigned int  index) const

The index operator.

NOTE: no bounds are checked by this method.

Parameters
[in]indexvalue indicating which array to return
Returns
The MObjectArray requested
const MObjectArray & get ( unsigned int  index) const

The method returns the MObjectArray specified by the index.

NOTE: no bounds are checked by this method.

Parameters
[in]indexvalue indicating which array to return
Returns
The MObjectArray requested
Examples:
gpuCache/CacheReaderAlembic.cpp.
MStatus set ( const MObjectArray boundary,
unsigned int  index 
)

This method is used to replace an existing boundary array.

Parameters
[in]boundarythe boundary object array to set
[in]indexthe index to place the boundary array at
Returns
MS::kSuccess if the set worked and MS::kFailure otherwise
MStatus insert ( const MObjectArray boundary,
unsigned int  index 
)

This method adds a new boundary into the "index" position.

Parameters
[in]boundarythe object array to add
[in]indexthe index to add the boundary array at
Returns
  • MS::kSuccess if the insert worked and MS::kFailure otherwise
MStatus append ( const MObjectArray boundary)

Add a new boundary array at the end of the list.

Parameters
[in]boundarythe boundary array to append
Returns
  • MS::kSuccess if the append worked and MS::kFailure otherwise
Examples:
AbcImport/NurbsSurfaceHelper.cpp, and gpuCache/CacheReaderAlembic.cpp.
MStatus remove ( unsigned int  index)

This method removes an existing boundary from the list.

Parameters
[in]indexthe index of the array to remove
Returns
  • MS::kSuccess if the remove worked and MS::kFailure otherwise
MStatus clear ( )

This method clears the trim boundary array.

Returns
  • MS::kSuccess if the clear worked and MS::kFailure otherwise
Examples:
AbcImport/NurbsSurfaceHelper.cpp, and gpuCache/CacheReaderAlembic.cpp.
MObject getMergedBoundary ( unsigned int  index,
MStatus status = NULL 
) const

This function create a curve that represent all curves of the boundary.

The original boundary edges are not changed. Note that the resulting curve is not added to the current model but is owned by an MObject which is of type kNurbsCurveData.

Parameters
[in]indexthe index to the boundary array that should be used to create the curve
[out]statusreturn status of the method
Returns
  • MS::kSuccess if the curve creation worked and MS::kFailure otherwise
Examples:
AbcImport/NurbsSurfaceHelper.cpp, and gpuCache/CacheReaderAlembic.cpp.
MTrimBoundaryArray::Iterator begin ( )

Returns an iterator object pointed to the beginning of the array.

Returns
Iterator object pointed to the beginning of the array.
MTrimBoundaryArray::Iterator end ( )

Returns an iterator object pointed to the end of the array.

Returns
Iterator object pointed to the end of the array.
MTrimBoundaryArray::ConstIterator begin ( ) const

Returns a const iterator object pointed to the beginning of the array.

Returns
Iterator object pointed to the beginning of the array.
MTrimBoundaryArray::ConstIterator end ( ) const

Returns a const iterator object pointed to the end of the array.

Returns
Iterator object pointed to the end of the array.
MTrimBoundaryArray::ConstIterator cbegin ( ) const

Returns a const iterator object pointed to the beginning of the array.

Returns
Iterator object pointed to the beginning of the array.
MTrimBoundaryArray::ConstIterator cend ( ) const

Returns a const iterator object pointed to the end of the array.

Returns
Iterator object pointed to the end of the array.
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

The documentation for this class was generated from the following files: