#include <MassSpringSystem.h>
Inheritance diagram for OpenCAL::MassSpringSystem:
Public Member Functions | |
MassSpringSystem (System *parent) | |
PointMass * | getPoint (unsigned int i) |
const PointMass * | getPoint (unsigned int i) const |
Spring * | getSpring (unsigned int i) |
const Spring * | getSpring (unsigned int i) const |
const TriangleMesh & | getSurface () const |
TriangleMesh * | getSurfaceP () |
void | setMass (float mass) |
void | setMassEach (float mass) |
void | setStiffness (float stiffness) |
void | setDamping (float damping) |
virtual void | step (float deltaSeconds) |
virtual void | initialize () |
virtual void | render () |
virtual void | renderPicking () |
Protected Member Functions | |
void | integrate (float deltaSeconds) |
Protected Attributes | |
TriangleMesh | m_surface |
Definition at line 32 of file MassSpringSystem.h.
|
This function uses a modified Euler integration, which cannot be used using the general state vector method. The integration method is not very physically correct, but ik looks good, and is super stable.
References OpenCAL::Physical::getAccelleration(), OpenCAL::Object::getPositionP(), OpenCAL::Physical::getVelocityP(), OpenCAL::PhysicalObject::isFixed(), and OpenCAL::Physical::resetForce(). Here is the call graph for this function: ![]() |