- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Friends

# MMeshSmoothOptions Class Reference

# OpenMaya - API module for common classes

Search for all occurrences

## Detailed Description

Options for control of smooth mesh generation.

The MMeshSmoothOptions class encapsulates settings that control the generation of smoothed version of a mesh. Meant for use with MFnMesh::generateSmoothMesh().

`#include <MMeshSmoothOptions.h>`

List of all members.

## Public Types
enum | BoundaryRule { kInvalid = -1, kLegacy = 0, kCreaseAll, kCreaseEdge, kLast }
| Specifies how to apply boundary creasing to subd poly object. More...
## Public Member Functions
| MMeshSmoothOptions (void)
| Constructor.
virtual | ~MMeshSmoothOptions (void)
| Destructor.
void | setDivisions (int numDivisions, MStatus *ReturnStatus=NULL)
| Sets the number of divisions stored in this options object.
int | divisions (MStatus *ReturnStatus=NULL) const
| Retrieves the level of smoothing these options specify to perform on the mesh.
void | setSmoothness (float smoothness, MStatus *ReturnStatus=NULL)
| Sets the the smoothness parameter for this set of smooth options which has range [0,1] where 1 smooths the faces as much as possible.
float | smoothness (MStatus *ReturnStatus=NULL) const
| Retrieves the smoothness parameter for this set of smooth options which has range [0,1] where 1 smooths the faces as much as possible.
void | setSmoothUVs (bool smoothUVs, MStatus *ReturnStatus=NULL)
| Sets whether or not these options specify to smooth UVs as well as geometry.
bool | smoothUVs (MStatus *ReturnStatus=NULL) const
| Retrieves whether or not these options specify to smooth UVs as well as geometry.
void | setPropEdgeHardness (bool propEdgeHardness, MStatus *ReturnStatus=NULL)
| Sets whether or not these options specify that smooth mesh edges which are a result of edges from the base cage will share the hardness value.
bool | propEdgeHardness (MStatus *ReturnStatus=NULL) const
| Retrieves whether or not these options specify that the smooth mesh edges which are a result of edges from the base cage will share the same hardness value.
void | setKeepBorderEdge (bool keepBorderEdge, MStatus *ReturnStatus=NULL)
| Sets whether or not these options specify that border edges will not be smoothed.
bool | keepBorderEdge (MStatus *ReturnStatus=NULL) const
| Retrieves whether or not these options specify that border edges will not be smoothed.
void | setKeepHardEdge (bool keepHardEdge, MStatus *ReturnStatus=NULL)
| Sets whether or not these options specify that hard edges will not be smoothed.
bool | keepHardEdge (MStatus *ReturnStatus=NULL) const
| Retrieves whether or not these options specify that hard edges will not be smoothed.
void | setBoundaryRule (BoundaryRule rule, MStatus *ReturnStatus=NULL)
| Set the rule used to determine how boundary edges and vertices are creased.
BoundaryRule | boundaryRule (MStatus *ReturnStatus=NULL) const
| Returns the current value for the boundary rule.
## Static Public Member Functions
static const char * | className ()
| Returns the name of this class.
## Friends
class | MFnMesh Search for all occurrences

## Member Enumeration Documentation

enum BoundaryRule

Search for all occurrences

Specifies how to apply boundary creasing to subd poly object.

Enumerator:

  kInvalid | Invalid value. Search for all occurrences
  kLegacy | Uses the legacy algorithm, which performed no creasing. Search for all occurrences
  kCreaseAll | Crease boundary edges & vertices with valence of exactly 2. Search for all occurrences
  kCreaseEdge | Crease boundary edges only. Search for all occurrences
  kLast | Last enum value. Search for all occurrences

## Member Function Documentation

void setDivisions | ( | int | numDivisions,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Sets the number of divisions stored in this options object.

Parameters:

  [in] | numDivisions | Number of divisions.
  [out] | ReturnStatus | Status code (see below)

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kInvalidParameter numDivisions was out of range.
  - MS::kFailure An object error has occured.

int divisions | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves the level of smoothing these options specify to perform on the mesh.

Parameters:

  [out] | ReturnStatus | Status code (see below)

Returns:
  The smoothing level

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occured.

void setSmoothness | ( | float | smoothness,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Sets the the smoothness parameter for this set of smooth options which has range [0,1] where 1 smooths the faces as much as possible.

Parameters:

  [in] | smoothness | The smoothness
  [out] | ReturnStatus | Status code (see below)

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kInvalidParameter smoothness was out of range.
  - MS::kFailure An object error has occured.

float smoothness | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves the smoothness parameter for this set of smooth options which has range [0,1] where 1 smooths the faces as much as possible.

Parameters:

  [out] | ReturnStatus | Status code (see below)

Returns:
  The smoothness parameter

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occured.

void setSmoothUVs | ( | bool | smoothUVs,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Sets whether or not these options specify to smooth UVs as well as geometry.

Parameters:

  [in] | smoothUVs | True if UVs should be smoothed
  [out] | ReturnStatus | Status code (see below)

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occured.

bool smoothUVs | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves whether or not these options specify to smooth UVs as well as geometry.

Parameters:

  [out] | ReturnStatus | Status code (see below)

Returns:
  True if UVs are set to be smoothed

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occured.

void setPropEdgeHardness | ( | bool | propEdgeHardness,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Sets whether or not these options specify that smooth mesh edges which are a result of edges from the base cage will share the hardness value.

Parameters:

  [in] | propEdgeHardness | True if smooth edges should share hardness with the base cage
  [out] | ReturnStatus | Status code (see below)

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occured.

bool propEdgeHardness | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves whether or not these options specify that the smooth mesh edges which are a result of edges from the base cage will share the same hardness value.

Parameters:

  [out] | ReturnStatus | Status code (see below)

Returns:
  True if smooth edges share hardness with the base cage

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occured.

void setKeepBorderEdge | ( | bool | keepBorderEdge,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Sets whether or not these options specify that border edges will not be smoothed.

Parameters:

  [in] | keepBorderEdge | True if border edges should not be smoothed
  [out] | ReturnStatus | Status code (see below)

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occured.

bool keepBorderEdge | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves whether or not these options specify that border edges will not be smoothed.

Parameters:

  [out] | ReturnStatus | Status code (see below)

Returns:
  True if border edges will not be smoothed

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occured.

void setKeepHardEdge | ( | bool | keepHardEdge,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Sets whether or not these options specify that hard edges will not be smoothed.

Parameters:

  [in] | keepHardEdge | True if hard edges should not be smoothed
  [out] | ReturnStatus | Status code (see below)

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occured.

bool keepHardEdge | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves whether or not these options specify that hard edges will not be smoothed.

Parameters:

  [out] | ReturnStatus | Status code (see below)

Returns:
  True if hard edges will not be smoothed

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occured.

void setBoundaryRule | ( | MMeshSmoothOptions::BoundaryRule | rule,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Set the rule used to determine how boundary edges and vertices are creased.

By default, creases are automatically applied to all boundary edges and all vertices that have only 2 incident edges prior to being converted to a smooth mesh.

The possible rules are:

- MMeshSmoothOptions::kLegacy - Use the original legacy algorithm, which did not automatically perform creasing.
- MMeshSmoothOptions::kCreaseAll - The default setting. Apply creasing per the description above.
- MMeshSmoothOptions::kCreaseEdge - Apply creasing to boundary edges only.

Parameters:

  [in] | rule | to apply
  [out] | ReturnStatus | Status code

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occurred.
  - MS::kObjectDoesNotExist The base stucture was not initialized properly

MMeshSmoothOptions::BoundaryRule boundaryRule | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the current value for the boundary rule.

See setBoundaryRule() for more details.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  Boundary rule.

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occurred.
  - MS::kObjectDoesNotExist The base stucture was not initialized properly

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  Name of this class.

MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions
MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions MMeshSmoothOptions