class MTrimBoundaryArray

Jump to documentation

An array class for trim boundaries. (OpenMaya) (OpenMaya.py)

public members:

MTrimBoundaryArray ()
MTrimBoundaryArray (const MTrimBoundaryArray & other)
~MTrimBoundaryArray ()
MStatus reserve (unsigned int length )
unsigned int length () const
unsigned int size () const
const MObjectArray & operator[] (unsigned int index) const
const MObjectArray & get ( unsigned int index ) const
MStatus set (const MObjectArray & boundary, unsigned int index)
MStatus insert (const MObjectArray & boundary, unsigned int index)
MStatus append (const MObjectArray & boundary)
MStatus remove (unsigned int index)
MStatus clear ()
MObject getMergedBoundary (unsigned int index, MStatus *status=NULL) const

Documentation

Implement an array of MTrimBoundary data type.

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

Description

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.

Functions

MTrimBoundaryArray:: MTrimBoundaryArray ()

Description

Default constructor. The instance is set to contain no elements.

MTrimBoundaryArray:: MTrimBoundaryArray (const MTrimBoundaryArray & other)

Description

Copy Constructor.

Arguments

  • other the array with which to initialize this instance

MTrimBoundaryArray:: ~MTrimBoundaryArray ()

Description

Class destructor

MStatus MTrimBoundaryArray:: reserve (unsigned int reserveLength)
Description This method is used to reserve the capacity of the array.

Arguments

  • reserveLength the number of items to reserve

Return Value

  • MS::kSuccess if the reserve worked and MS::kFailure otherwise

unsigned int MTrimBoundaryArray:: length () const
Description This method returns the length of the trim boundary array.

unsigned int MTrimBoundaryArray:: size () const
Description This method returns the size of the trim boundary array. The size and the length are the same.

MStatus MTrimBoundaryArray:: setIsUVBoundary (bool state)
Description This method is used to set if the boundary is in UV space or not. The state can only be changed when the array is empty. Once there are boundaries, this cannot be changed.

Arguments

  • state the UV state to set

Return Value

  • MS::kSuccess if the set worked and MS::kFailure otherwise

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

Description

The index operator. NOTE: no bounds are checked by this method.

Arguments

  • index value indicating which array to return

Return Value

  • the MObjectArray requested

const MObjectArray & MTrimBoundaryArray:: get ( unsigned int index ) const

Description

The method returns the MObjectArray specified by the index. NOTE: no bounds are checked by this method.

Arguments

  • index value indicating which array to return

Return Value

  • the MObjectArray requested

MStatus MTrimBoundaryArray:: set ( const MObjectArray & boundary, unsigned int index)
Description This method is used to replace an existing boundary array.

Arguments

  • boundary the boundary object array to set
  • index the index to place the boundary array at

Return Value

  • MS::kSuccess if the set worked and MS::kFailure otherwise

MStatus MTrimBoundaryArray:: insert ( const MObjectArray & boundary, unsigned int index)
Description This method adds a new boundary into the "index" position.

Arguments

  • boundary the object array to add
  • index the index to add the boundary array at

Return Value

  • MS::kSuccess if the insert worked and MS::kFailure otherwise

MStatus MTrimBoundaryArray:: append (const MObjectArray & boundary)
Description Add a new boundary array at the end of the list.

Arguments

  • boundary the boundary array to append

Return Value

  • MS::kSuccess if the append worked and MS::kFailure otherwise

MStatus MTrimBoundaryArray:: remove ( unsigned int index )
Description This method removes an existing boundary from the list.

Arguments

  • index the index of the array to remove

Return Value

  • MS::kSuccess if the remove worked and MS::kFailure otherwise

MStatus MTrimBoundaryArray:: clear ()
Description This method clears the trim boundary array.

Return Value

  • MS::kSuccess if the clear worked and MS::kFailure otherwise

MObject MTrimBoundaryArray:: getMergedBoundary ( unsigned int index, MStatus *status) const
Description 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.

Arguments

  • index the index to the boundary array that should be used to create the curve
  • status return status of the method

Return Value

  • MS::kSuccess if the curve creation worked and MS::kFailure otherwise

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright