#include <Solver.h>
Public Member Functions | |
virtual void | addCloth (Cloth *cloth)=0 |
Adds cloth object. | |
virtual void | addCloths (Range< Cloth * > cloths)=0 |
Adds an array of cloth objects. | |
virtual bool | beginSimulation (float dt)=0 |
Begins a simulation frame. | |
virtual void | endSimulation ()=0 |
Finishes up the simulation. | |
virtual Cloth *const * | getClothList () const =0 |
Returns the pointer to the first cloth added to the solver. | |
virtual float | getInterCollisionDistance () const =0 |
virtual uint32_t | getInterCollisionNbIterations () const =0 |
virtual float | getInterCollisionStiffness () const =0 |
virtual int | getNumCloths () const =0 |
Returns the numer of cloths added to the solver. | |
virtual int | getSimulationChunkCount () const =0 |
Returns the number of chunks that need to be simulated this frame. | |
virtual bool | hasError () const =0 |
Returns true if an unrecoverable error has occurred. | |
virtual void | removeCloth (Cloth *cloth)=0 |
Removes cloth object. | |
virtual void | setInterCollisionDistance (float distance)=0 |
virtual void | setInterCollisionFilter (InterCollisionFilter filter)=0 |
virtual void | setInterCollisionNbIterations (uint32_t nbIterations)=0 |
virtual void | setInterCollisionStiffness (float stiffness)=0 |
virtual void | simulateChunk (int idx)=0 |
Do the computationally heavy part of the simulation. | |
virtual | ~Solver () |
Protected Member Functions | |
Solver & | operator= (const Solver &) |
Solver (const Solver &) | |
Solver () |
nv::cloth::Solver::Solver | ( | ) | [inline, protected] |
nv::cloth::Solver::Solver | ( | const Solver & | ) | [protected] |
virtual nv::cloth::Solver::~Solver | ( | ) | [inline, virtual] |
virtual void nv::cloth::Solver::addCloth | ( | Cloth * | cloth | ) | [pure virtual] |
Adds cloth object.
Adds an array of cloth objects.
virtual bool nv::cloth::Solver::beginSimulation | ( | float | dt | ) | [pure virtual] |
Begins a simulation frame.
Returns false if there is nothing to simulate. Use simulateChunk() after calling this function to do the computation.
dt | The delta time for this frame. |
virtual void nv::cloth::Solver::endSimulation | ( | ) | [pure virtual] |
Finishes up the simulation.
This function can be expensive if inter-collision is enabled.
virtual Cloth* const* nv::cloth::Solver::getClothList | ( | ) | const [pure virtual] |
Returns the pointer to the first cloth added to the solver.
virtual float nv::cloth::Solver::getInterCollisionDistance | ( | ) | const [pure virtual] |
virtual uint32_t nv::cloth::Solver::getInterCollisionNbIterations | ( | ) | const [pure virtual] |
virtual float nv::cloth::Solver::getInterCollisionStiffness | ( | ) | const [pure virtual] |
virtual int nv::cloth::Solver::getNumCloths | ( | ) | const [pure virtual] |
Returns the numer of cloths added to the solver.
virtual int nv::cloth::Solver::getSimulationChunkCount | ( | ) | const [pure virtual] |
Returns the number of chunks that need to be simulated this frame.
virtual bool nv::cloth::Solver::hasError | ( | ) | const [pure virtual] |
Returns true if an unrecoverable error has occurred.
virtual void nv::cloth::Solver::removeCloth | ( | Cloth * | cloth | ) | [pure virtual] |
Removes cloth object.
virtual void nv::cloth::Solver::setInterCollisionDistance | ( | float | distance | ) | [pure virtual] |
virtual void nv::cloth::Solver::setInterCollisionFilter | ( | InterCollisionFilter | filter | ) | [pure virtual] |
virtual void nv::cloth::Solver::setInterCollisionNbIterations | ( | uint32_t | nbIterations | ) | [pure virtual] |
virtual void nv::cloth::Solver::setInterCollisionStiffness | ( | float | stiffness | ) | [pure virtual] |
virtual void nv::cloth::Solver::simulateChunk | ( | int | idx | ) | [pure virtual] |
Do the computationally heavy part of the simulation.
Call this function getSimulationChunkCount() times to do the entire simulation. This function can be called from multiple threads in parallel. All Chunks need to be simulated before ending the frame.