MnSolver Class Reference
[OpenMayaFX - API module for effects]

#include <MnSolver.h>

List of all members.


Detailed Description

Class for wrapping N solver objects.

This class wraps the internal Maya representation of a Nucleus solver suitable for use with the Nucleus objects such as nCloth or nParticles


Public Member Functions

  MnSolver ()
virtual  ~MnSolver ()
MStatus  createNSolver ()
MStatus  addNObject (MnObject *obj)
MStatus  removeNObject (MnObject *obj)
MStatus  setGravity (float grav)
MStatus  setGravityDir (float gravX, float gravY, float gravZ)
MStatus  setAirDensity (float dens)
MStatus  setWindSpeed (float speed)
MStatus  setWindDir (float windX, float windY, float windZ)
MStatus  setWindNoiseIntensity (float noise)
MStatus  setDisabled (bool disabled)
MStatus  setSubsteps (int substeps)
MStatus  setMaxIterations (int maxIter)
MStatus  setStartTime (float startTime)
MStatus  makeAllCollide ()
MStatus  removeAllCollisions ()
MStatus  solve (float solveTime)

Friends

class  MFnNObjectData

Constructor & Destructor Documentation

MnSolver::MnSolver (  ) 

Default constructor. The instance is set to contain nothing.

MnSolver::~MnSolver (  )  [virtual]

The class destructor.


Member Function Documentation

MStatus MnSolver::createNSolver (  ) 

Creates the underlying Maya solver object and sets this class to wrap it.

Returns:

MStatus MnSolver::addNObject ( MnObject obj  ) 

Assign the nucleus object to be solved by this solver.

Returns:

MStatus MnSolver::removeNObject ( MnObject obj  ) 

Remove the nucleus object from being solved by this solver.

Returns:
  • MS::kSuccess the object was removed from the solver successfully
  • MS::kFailure the object could not be removed from the solver

MStatus MnSolver::setGravity ( float  grav  ) 

Sets the gravity magnitude for the objects being solved. Note the the objects should already be added to the solver when applying gravity

Returns:

MStatus MnSolver::setGravityDir ( float  gravX,
float  gravY,
float  gravZ  
)

Sets the gravity direction for the underlying Maya solver object.

Returns:

MStatus MnSolver::setAirDensity ( float  dens  ) 

Sets the air Density for the solver

Returns:

MStatus MnSolver::setWindSpeed ( float  speed  ) 

Sets the wind magnitude for the underlying Maya solver object.

Returns:

MStatus MnSolver::setWindDir ( float  windX,
float  windY,
float  windZ  
)

Sets the wind direction for the underlying Maya solver object.

Returns:

MStatus MnSolver::setWindNoiseIntensity ( float  noise  ) 

Sets the wind noise intensity for the underlying Maya solver object.

Returns:

MStatus MnSolver::setDisabled ( bool  disabled  ) 

Disables the solver - or re-enables it again

Returns:

MStatus MnSolver::setSubsteps ( int  substeps  ) 

Set the number of substeps used by the solver

Returns:

MStatus MnSolver::setMaxIterations ( int  maxIter  ) 

Set the max number of collision iterations used by the solver

Returns:

MStatus MnSolver::setStartTime ( float  startTime  ) 

Sets the start Time in seconds for the solver

Returns:

MStatus MnSolver::makeAllCollide (  ) 

Allow all the objects assigned to the Maya solver object to collide.

Returns:

MStatus MnSolver::removeAllCollisions (  ) 

Remove the collisions between all the objects assigned to the Maya solver object.

Returns:

MStatus MnSolver::solve ( float  solveTime  ) 

Solve from the last eval time until the specified time (in seconds).

Returns:

Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6