#include <MFnWireDeformer.h>
MFnWireDeformer is the function set for wire deformers. Wire deformers modify geometry based on its proximity to controlling wire curves. As the wire curves are modified, the parts of the geometry close to the curve will follow.
The wire deformer is actually a small network of dependency nodes in the dependency graph. This function set is provided to make manipulation of the network easier. The main deformer node should be given to this function set as its object.
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. | |
virtual | ~MFnWireDeformer () |
Destructor. | |
MFnWireDeformer () | |
Default constructor. | |
MFnWireDeformer (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
MObject | create (MStatus *ReturnStatus=NULL) |
MStatus | addGeometry (const MObject &object) |
MStatus | removeGeometry (const MObject &object) |
MStatus | getAffectedGeometry (MObjectArray &objects) |
unsigned int | numWires (MStatus *ReturnStatus=NULL) const |
MStatus | addWire (const MObject &object) |
MObject | wire (unsigned int wireIndex, MStatus *ReturnStatus=NULL) |
float | wireDropOffDistance (unsigned int wireIndex, MStatus *ReturnStatus=NULL) const |
MStatus | setWireDropOffDistance (unsigned int wireIndex, float dropOff) |
float | wireScale (unsigned int wireIndex, MStatus *ReturnStatus=NULL) const |
MStatus | setWireScale (unsigned int wireIndex, float scale) |
MObject | holdingShape (unsigned int wireIndex, MStatus *ReturnStatus=NULL) const |
MStatus | setHoldingShape (unsigned int wireIndex, MObject holdingCurve) |
float | envelope (MStatus *ReturnStatus=NULL) const |
MStatus | setEnvelope (float envelope) |
float | rotation (MStatus *ReturnStatus=NULL) const |
MStatus | setRotation (float rotation) |
float | localIntensity (MStatus *ReturnStatus=NULL) const |
MStatus | setLocalIntensity (float localIntensity) |
float | crossingEffect (MStatus *ReturnStatus=NULL) const |
MStatus | setCrossingEffect (float crossingEffect) |
unsigned int | numDropoffLocators (unsigned int wireIndex, MStatus *ReturnStatus=NULL) const |
MStatus | setDropoffLocator (unsigned int wireIndex, unsigned int locatorIndex, float param, float percentage) |
MStatus | getDropoffLocator (unsigned int wireIndex, unsigned int locatorIndex, float ¶m, float &percentage) |
MFnWireDeformer (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
Protected Member Functions | |
virtual const char * | className () const |
Class name. |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFn::Type MFnWireDeformer::type | ( | ) | const [virtual] |
const char * MFnWireDeformer::className | ( | ) | const [protected, virtual] |
Creates a new wire deformer. This function set's object is set to be the new wire deformer node.
[out] | ReturnStatus | return status |
Adds a piece of geometry to the deformation.
After adding new geometry to the deformation. The new geometry will then be deformed by the existing wires.
[in] | object | the geometry |
Removes a piece of geometry from the deformation.
[in] | object | the geometry |
MStatus MFnWireDeformer::getAffectedGeometry | ( | MObjectArray & | objects | ) |
The geometry affected by this deformer is packed into the provided list of MObjects. Each of the MObjects will be a DAG node that has geometry.
[out] | objects | storage for the returned array |
unsigned int MFnWireDeformer::numWires | ( | MStatus * | ReturnStatus = NULL |
) | const |
returns the number of wire curves connected to this deformer.
[out] | ReturnStatus | return status |
Adds a new wire curve to the deformation.
[in] | object | the new wire |
Return the wire at the given index. The returned object will be a nurbs curve shape suitable for use with the MFnNurbsCurve function set.
[in] | wireIndex | index of wire to return |
[out] | ReturnStatus | return status |
float MFnWireDeformer::wireDropOffDistance | ( | unsigned int | wireIndex, | |
MStatus * | ReturnStatus = NULL | |||
) | const |
Return the drop off distance of the wire at the given index. Increasing this value will give the wire a greater area of influence.
[in] | wireIndex | index of wire to return the drop off distance for |
[out] | ReturnStatus | return status |
MStatus MFnWireDeformer::setWireDropOffDistance | ( | unsigned int | wireIndex, | |
float | dropOff | |||
) |
Sets the drop off distance of the wire at the given index. Increasing this value will give the wire a greater area of influence.
[in] | wireIndex | index of wire to set the drop off distance for |
[in] | dropOff | new drop off value |
float MFnWireDeformer::wireScale | ( | unsigned int | wireIndex, | |
MStatus * | ReturnStatus = NULL | |||
) | const |
Return the radial scale of the wire at the given index. The scale value affects how the wire modifies the geometry in its area of influence. A value of between 0.0 and 1.0 causes the wire to pull the surrounding geometry points towards itself. A value of greater than one causes the wire to repulse the geometry points around it. A value of exactly 1.0 causes the wire to neither pull nor push the points around it.
The surrounding points will always deform with the wire, The scale factor just allows the points around the wire to be radially scaled closer to or further from the wire.
[in] | wireIndex | index of wire to return the scale value for |
[out] | ReturnStatus | return status |
MStatus MFnWireDeformer::setWireScale | ( | unsigned int | wireIndex, | |
float | scale | |||
) |
Sets the radial scale value of the wire at the given index. The scale value affects how the wire modifies the geometry in its area of influence. A value of between 0.0 and 1.0 causes the wire to pull the surrounding geometry points towards itself. A value of greater than one causes the wire to repulse the geometry points around it. A value of exactly 1.0 causes the wire to neither pull nor push the points around it.
The surrounding points will always deform with the wire, The scale factor just allows the points around the wire to be radially scaled closer to or further from the wire.
[in] | wireIndex | index of wire to set the drop off distance for |
[in] | scale | new scale value |
MObject MFnWireDeformer::holdingShape | ( | unsigned int | wireIndex, | |
MStatus * | ReturnStatus = NULL | |||
) | const |
Returns the holding shape for the given wire. The holding shape may be a nurbs curve or a nurbs surface. If the given wire does not have a holding shape, then a null MObject handle will be returned.
A holding shape pins down the deforming shapes when the associated wire is moved. One possible application is to use a curve to limit the area that a wire affects.
[in] | wireIndex | index of wire to get the holding shape for |
[out] | ReturnStatus | return status |
Sets the holding shape for the given wire. The holding shape may be a nurbs curve or a nurbs surface.
A holding shape pins down the deforming shapes when the associated wire is moved. One possible application is to use a curve to limit the area that a wire affects.
[in] | wireIndex | index of wire to set the holding shape for |
[in] | holdingShape | nurbs curve or surface to use as holding shape |
float MFnWireDeformer::envelope | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the envelope for this deformer.
The envelope is a scale factor that affects the dropoff distances of all wires that belong to this deformer.
[in] | ReturnStatus | return status |
MStatus MFnWireDeformer::setEnvelope | ( | float | envelope | ) |
Sets the envelope for this deformer.
The envelope is a scale factor that affects the dropoff distances of all wires that belong to this deformer.
[in] | envelope | envelope value |
float MFnWireDeformer::rotation | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the rotation value for this deformer.
The rotation value determines how much the tangency of the wire curve affects the deformation. When the rotation value is 0.0, the deformation will be linear. The geometry will pull straight towards the wire. When the rotation value is 1.0, the tangency of the wire curve is taken into effect. This will provide more natural deformations when the wire curve is twisted with respect to its original position. The surface will pull towards the wire in an arc rather than in a straight line.
[out] | ReturnStatus | return status |
MStatus MFnWireDeformer::setRotation | ( | float | rotation | ) |
Sets the rotation value for this deformer.
The rotation value determines how much the tangency of the wire curve affects the deformation. When the rotation value is 0.0, the deformation will be linear. The geometry will pull straight towards the wire. When the rotation value is 1.0, the tangency of the wire curve is taken into effect. This will provide more natural deformations when the wire curve is twisted with respect to its original position. The surface will pull towards the wire in an arc rather than in a straight line.
[in] | rotation | new rotation value |
float MFnWireDeformer::localIntensity | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the local intensity for this wire deformer.
The local intensity has an effect when two wire curves are positioned close to each other. Normally, only the most deformed of the two curves will affect the surface. When the local intensity is increased, the less deformed curve will start to pull the surface back towards itself.
[out] | ReturnStatus | return status |
MStatus MFnWireDeformer::setLocalIntensity | ( | float | localIntensity | ) |
Sets the local intensity for this wire deformer.
The local intensity has an effect when two wire curves are positioned close to each other. Normally, only the most deformed of the two curves will affect the surface. When the local intensity is increased, the less deformed curve will start to pull the surface back towards itself.
float MFnWireDeformer::crossingEffect | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the crossing effect for this wire deformer.
The crossing effect applies when two wire curves cross each other. Normally, the deformation is dampened so that the surface is only affected by the most deformed curve at the intersection point. When the crossing effect is increased, the effect of the wires becomes additive. So, the object will be deform more near crossing wires.
[out] | ReturnStatus | return status |
MStatus MFnWireDeformer::setCrossingEffect | ( | float | crossingEffect | ) |
Sets the local intensity for this wire deformer.
The local intensity has an effect when two wire curves are positioned close to each other. Normally, only the most deformed of the two curves will affect the surface. When the local intensity is increased, the less deformed curve will start to pull the surface back towards itself.
unsigned int MFnWireDeformer::numDropoffLocators | ( | unsigned int | wireIndex, | |
MStatus * | ReturnStatus = NULL | |||
) | const |
Returns the number of drop off locators.
A drop off locator allows the modification the wire curve drop off distance at a specific point on the wire curve.
[in] | wireIndex | the index of the wire curve to query |
[out] | ReturnStatus | return status |
MStatus MFnWireDeformer::setDropoffLocator | ( | unsigned int | wireIndex, | |
unsigned int | locatorIndex, | |||
float | param, | |||
float | percentage | |||
) |
Sets the parameters of a drop off locator.
A drop off locator allows the modification the wire curve drop off distance at a specific point on the wire curve.
[in] | wireIndex | index of the wire curve |
[in] | locatorIndex | index of the locator on the given wire |
[in] | param | new param value along the curve at which to position the locator |
[in] | percentage | percentage of the drop off distance applied |
MStatus MFnWireDeformer::getDropoffLocator | ( | unsigned int | wireIndex, | |
unsigned int | locatorIndex, | |||
float & | param, | |||
float & | percentage | |||
) |
Gets the parameters of a drop off locator.
A drop off locator allows the modification the wire curve drop off distance at a specific point on the wire curve.
[in] | wireIndex | index of the wire curve |
[in] | locatorIndex | index of the locator on the given wire |
[in] | param | storage for the param value along the curve that the locator is positioned at |
[in] | percentage | storage for the percentage value of the locator |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |