Public Member Functions | Static Public Member Functions

MTrimBoundaryArray Class Reference

Search for all occurrences

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.

#include <MTrimBoundaryArray.h>

List of all members.

Public Member Functions

  MTrimBoundaryArray ()
  Default constructor.
  MTrimBoundaryArray (const MTrimBoundaryArray &other)
  Copy Constructor.
  ~MTrimBoundaryArray ()
  Class destructor.
MStatus  reserve (unsigned int length)
  This method is used to reserve the capacity of the array.
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.
const MObjectArray operator[] (unsigned int index) const
  The index operator.
const MObjectArray get (unsigned int index) const
  The method returns the MObjectArray specified by the index.
MStatus  set (const MObjectArray &boundary, unsigned int index)
  This method is used to replace an existing boundary array.
MStatus  insert (const MObjectArray &boundary, unsigned int index)
  This method adds a new boundary into the "index" position.
MStatus  append (const MObjectArray &boundary)
  Add a new boundary array at the end of the list.
MStatus  remove (unsigned int index)
  This method removes an existing boundary from the list.
MStatus  clear ()
  This method clears the trim boundary array.
MObject  getMergedBoundary (unsigned int index, MStatus *status=NULL) const
  This function create a curve that represent all curves of the boundary.

Static Public Member Functions

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

Constructor & Destructor Documentation

Default constructor.

The instance is set to contain no elements.

Copy Constructor.

Parameters:
[in] other the 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] reserveLength the 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] index value 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] index value indicating which array to return
Returns:
The MObjectArray requested
MStatus set ( const MObjectArray boundary,
unsigned int  index 
)

This method is used to replace an existing boundary array.

Parameters:
[in] boundary the boundary object array to set
[in] index the 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] boundary the object array to add
[in] index the index to add the boundary array at
Returns:
MStatus append ( const MObjectArray boundary )

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

Parameters:
[in] boundary the boundary array to append
Returns:
MStatus remove ( unsigned int  index )

This method removes an existing boundary from the list.

Parameters:
[in] index the index of the array to remove
Returns:
MStatus clear ( )

This method clears the trim boundary array.

Returns:
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] index the index to the boundary array that should be used to create the curve
[out] status return status of the method
Returns:
const char * className ( ) [static]

Returns the name of this class.

Returns:
The name of this class.

MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray
MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray MTrimBoundaryArray