#include <MnSolver.h>
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 () | |
Default constructor. More... | |
virtual | ~MnSolver () |
The class destructor. | |
MStatus | createNSolver () |
Creates the underlying Maya solver object and sets this class to wrap it. More... | |
MStatus | addNObject (MnObject *obj) |
Assign the nucleus object to be solved by this solver. More... | |
MStatus | removeNObject (MnObject *obj) |
Remove the nucleus object from being solved by this solver. More... | |
MStatus | setGravity (float grav) |
Sets the gravity magnitude for the objects being solved. More... | |
MStatus | setGravityDir (float gravX, float gravY, float gravZ) |
Sets the gravity direction for the underlying Maya solver object. More... | |
MStatus | setAirDensity (float dens) |
Sets the air Density for the solver. More... | |
MStatus | setWindSpeed (float speed) |
Sets the wind magnitude for the underlying Maya solver object. More... | |
MStatus | setWindDir (float windX, float windY, float windZ) |
Sets the wind direction for the underlying Maya solver object. More... | |
MStatus | setWindNoiseIntensity (float noise) |
Sets the wind noise intensity for the underlying Maya solver object. More... | |
MStatus | setDisabled (bool disabled) |
Disables the solver - or re-enables it again. More... | |
MStatus | setSubsteps (int substeps) |
Set the number of substeps used by the solver. More... | |
MStatus | setMaxIterations (int maxIter) |
Set the max number of collision iterations used by the solver. More... | |
MStatus | setStartTime (float startTime) |
Sets the start Time in seconds for the solver. More... | |
MStatus | makeAllCollide () |
Allow all the objects assigned to the Maya solver object to collide. More... | |
MStatus | removeAllCollisions () |
Remove the collisions between all the objects assigned to the Maya solver object. More... | |
MStatus | solve (float solveTime) |
Solve from the last eval time until the specified time (in seconds). More... | |
Friends | |
class | MFnNObjectData |
MnSolver | ( | ) |
Default constructor.
The instance is set to contain nothing.
MStatus createNSolver | ( | ) |
Creates the underlying Maya solver object and sets this class to wrap it.
Assign the nucleus object to be solved by this solver.
[in] | obj | Nucleus object. |
Remove the nucleus object from being solved by this solver.
[in] | obj | Nucleus object. |
MStatus 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
[in] | grav | New gravity value. |
MStatus setGravityDir | ( | float | gravX, |
float | gravY, | ||
float | gravZ | ||
) |
Sets the gravity direction for the underlying Maya solver object.
[in] | gravX | X coordinate of new gravity direction. |
[in] | gravY | Y coordinate of new gravity direction. |
[in] | gravZ | Z coordinate of new gravity direction. |
MStatus setAirDensity | ( | float | dens | ) |
Sets the air Density for the solver.
[in] | dens | New density value. |
MStatus setWindSpeed | ( | float | speed | ) |
Sets the wind magnitude for the underlying Maya solver object.
[in] | speed | New wind speed. |
MStatus setWindDir | ( | float | windX, |
float | windY, | ||
float | windZ | ||
) |
Sets the wind direction for the underlying Maya solver object.
[in] | windX | X coordinate of new wind direction. |
[in] | windY | Y coordinate of new wind direction. |
[in] | windZ | Z coordinate of new wind direction. |
MStatus setWindNoiseIntensity | ( | float | noise | ) |
Sets the wind noise intensity for the underlying Maya solver object.
[in] | noise | New wind noise intensity. |
MStatus setDisabled | ( | bool | disabled | ) |
Disables the solver - or re-enables it again.
[in] | disabled | True to disable the solver, false to re-enable it. |
MStatus setSubsteps | ( | int | substeps | ) |
Set the number of substeps used by the solver.
[in] | substeps | New number of substeps to use. |
MStatus setMaxIterations | ( | int | maxIter | ) |
Set the max number of collision iterations used by the solver.
[in] | maxIter | New maximum number of iterations to use. |
MStatus setStartTime | ( | float | startTime | ) |
Sets the start Time in seconds for the solver.
[in] | startTime | New start time. |
MStatus makeAllCollide | ( | ) |
Allow all the objects assigned to the Maya solver object to collide.
MStatus removeAllCollisions | ( | ) |
Remove the collisions between all the objects assigned to the Maya solver object.
MStatus solve | ( | float | solveTime | ) |
Solve from the last eval time until the specified time (in seconds).
[in] | solveTime | Time to solve up to. |