ShapeOp  0.1.0
Public Member Functions | List of all members
ShapeOp::Solver Class Reference

ShapeOp Solver. This class implements the main ShapeOp solver based on [1] and [2]. More...

#include <Solver.h>

Public Member Functions

int addConstraint (const std::shared_ptr< Constraint > &c)
 Add a constraint to the solver and get back its id.
 
std::shared_ptr< Constraint > & getConstraint (int id)
 Get a constraint using its id.
 
int addForces (const std::shared_ptr< Force > &f)
 Add a force to the solver and get back its id.
 
std::shared_ptr< Force > & getForce (int id)
 Get a force using its id.
 
void setPoints (const Matrix3X &p)
 Set the points.
 
void setTimeStep (Scalar timestep)
 Set the timestep for the dynamics.
 
void setDamping (Scalar damping)
 Set the velocity damping for the dynamics.
 
const Matrix3XgetPoints ()
 Get the points.
 
bool initialize (bool dynamic=false, Scalar masses=1.0, Scalar damping=1.0, Scalar timestep=1.0)
 Initialize the ShapeOp linear system and the different parameters. More...
 
bool solve (unsigned int iteration)
 Solve the constraint problem by projecting and merging. More...
 

Detailed Description

ShapeOp Solver. This class implements the main ShapeOp solver based on [1] and [2].

Member Function Documentation

SHAPEOP_INLINE bool ShapeOp::Solver::initialize ( bool  dynamic = false,
Scalar  masses = 1.0,
Scalar  damping = 1.0,
Scalar  timestep = 1.0 
)

Initialize the ShapeOp linear system and the different parameters.

Returns
true if successfull
SHAPEOP_INLINE bool ShapeOp::Solver::solve ( unsigned int  iteration)

Solve the constraint problem by projecting and merging.

Returns
true if successfull

The documentation for this class was generated from the following files: